From 8592922c2c377d1b5d96aecf5ef840a0471d528f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 29 Sep 2013 20:17:18 -0400 Subject: [PATCH] core: Make ostree_get_relative_object_path() private I plan to rename all of these APIs to use the term 'loose', so that it makes more sense after pack files are introduced. External users should not use them; instead use _load_variant() or _read_commit(). --- doc/ostree-sections.txt | 1 - src/libostree/ostree-core-private.h | 5 +++++ src/libostree/ostree-core.c | 10 +++++----- src/libostree/ostree-core.h | 4 ---- src/libostree/ostree-repo-commit.c | 2 +- src/libostree/ostree-repo-pull.c | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/ostree-sections.txt b/doc/ostree-sections.txt index 428c69f2..dcdf40bf 100644 --- a/doc/ostree-sections.txt +++ b/doc/ostree-sections.txt @@ -28,7 +28,6 @@ ostree_object_name_serialize ostree_object_name_deserialize ostree_object_to_string ostree_object_from_string -ostree_get_relative_object_path ostree_get_xattrs_for_file ostree_set_xattrs ostree_content_stream_parse diff --git a/src/libostree/ostree-core-private.h b/src/libostree/ostree-core-private.h index 548a3d68..8145cc33 100644 --- a/src/libostree/ostree-core-private.h +++ b/src/libostree/ostree-core-private.h @@ -95,6 +95,11 @@ _ostree_make_temporary_symlink_at (int tmp_dirfd, */ #define _OSTREE_LOOSE_PATH_MAX (256) +char * +_ostree_get_relative_object_path (const char *checksum, + OstreeObjectType type, + gboolean compressed); + void _ostree_loose_path (char *buf, const char *checksum, diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 6d2b661c..1c87009c 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -1497,8 +1497,8 @@ _ostree_loose_path_with_suffix (char *buf, suffix); } -/** - * ostree_get_relative_object_path: +/* + * _ostree_get_relative_object_path: * @checksum: ASCII checksum string * @type: Object type * @compressed: Whether or not the repository object is compressed @@ -1506,9 +1506,9 @@ _ostree_loose_path_with_suffix (char *buf, * Returns: (transfer full): Relative path for a loose object */ char * -ostree_get_relative_object_path (const char *checksum, - OstreeObjectType type, - gboolean compressed) +_ostree_get_relative_object_path (const char *checksum, + OstreeObjectType type, + gboolean compressed) { GString *path; diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h index 743ca8f1..0e06048f 100644 --- a/src/libostree/ostree-core.h +++ b/src/libostree/ostree-core.h @@ -167,10 +167,6 @@ void ostree_object_from_string (const char *str, gchar **out_checksum, OstreeObjectType *out_objtype); -char *ostree_get_relative_object_path (const char *checksum, - OstreeObjectType type, - gboolean compressed); - gboolean ostree_get_xattrs_for_file (GFile *f, GVariant **out_xattrs, GCancellable *cancellable, diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 02f27e27..eb09532b 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -1012,7 +1012,7 @@ _ostree_repo_get_object_path (OstreeRepo *self, compressed = (type == OSTREE_OBJECT_TYPE_FILE && ostree_repo_get_mode (self) == OSTREE_REPO_MODE_ARCHIVE_Z2); - relpath = ostree_get_relative_object_path (checksum, type, compressed); + relpath = _ostree_get_relative_object_path (checksum, type, compressed); ret = g_file_resolve_relative_path (self->repodir, relpath); g_free (relpath); diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 763ab5b1..58cef3f4 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -994,7 +994,7 @@ enqueue_one_object_request (OtPullData *pull_data, } else { - objpath = ostree_get_relative_object_path (checksum, objtype, TRUE); + objpath = _ostree_get_relative_object_path (checksum, objtype, TRUE); obj_uri = suburi_new (pull_data->base_uri, objpath, NULL); }