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().
This commit is contained in:
Colin Walters 2013-09-29 20:17:18 -04:00
parent 7f9eefb62d
commit 8592922c2c
6 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,6 @@ ostree_object_name_serialize
ostree_object_name_deserialize ostree_object_name_deserialize
ostree_object_to_string ostree_object_to_string
ostree_object_from_string ostree_object_from_string
ostree_get_relative_object_path
ostree_get_xattrs_for_file ostree_get_xattrs_for_file
ostree_set_xattrs ostree_set_xattrs
ostree_content_stream_parse ostree_content_stream_parse

View File

@ -95,6 +95,11 @@ _ostree_make_temporary_symlink_at (int tmp_dirfd,
*/ */
#define _OSTREE_LOOSE_PATH_MAX (256) #define _OSTREE_LOOSE_PATH_MAX (256)
char *
_ostree_get_relative_object_path (const char *checksum,
OstreeObjectType type,
gboolean compressed);
void void
_ostree_loose_path (char *buf, _ostree_loose_path (char *buf,
const char *checksum, const char *checksum,

View File

@ -1497,8 +1497,8 @@ _ostree_loose_path_with_suffix (char *buf,
suffix); suffix);
} }
/** /*
* ostree_get_relative_object_path: * _ostree_get_relative_object_path:
* @checksum: ASCII checksum string * @checksum: ASCII checksum string
* @type: Object type * @type: Object type
* @compressed: Whether or not the repository object is compressed * @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 * Returns: (transfer full): Relative path for a loose object
*/ */
char * char *
ostree_get_relative_object_path (const char *checksum, _ostree_get_relative_object_path (const char *checksum,
OstreeObjectType type, OstreeObjectType type,
gboolean compressed) gboolean compressed)
{ {
GString *path; GString *path;

View File

@ -167,10 +167,6 @@ void ostree_object_from_string (const char *str,
gchar **out_checksum, gchar **out_checksum,
OstreeObjectType *out_objtype); OstreeObjectType *out_objtype);
char *ostree_get_relative_object_path (const char *checksum,
OstreeObjectType type,
gboolean compressed);
gboolean ostree_get_xattrs_for_file (GFile *f, gboolean ostree_get_xattrs_for_file (GFile *f,
GVariant **out_xattrs, GVariant **out_xattrs,
GCancellable *cancellable, GCancellable *cancellable,

View File

@ -1012,7 +1012,7 @@ _ostree_repo_get_object_path (OstreeRepo *self,
compressed = (type == OSTREE_OBJECT_TYPE_FILE compressed = (type == OSTREE_OBJECT_TYPE_FILE
&& ostree_repo_get_mode (self) == OSTREE_REPO_MODE_ARCHIVE_Z2); && 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); ret = g_file_resolve_relative_path (self->repodir, relpath);
g_free (relpath); g_free (relpath);

View File

@ -994,7 +994,7 @@ enqueue_one_object_request (OtPullData *pull_data,
} }
else 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); obj_uri = suburi_new (pull_data->base_uri, objpath, NULL);
} }