libostree: Make the format of file objects private

It's now isolated almost entirely to ostree-core.c, except
ostree-repo.c needs to know how to create archive-z2 file headers.  So
give it a private API for that.
This commit is contained in:
Colin Walters committed 2013-09-03 18:43:42 -04:00
1 parent 356de33b49
commit 0d72168961
5 files changed
+114 -78

No files matched your search

-41
View File
@@ -72,26 +72,6 @@ typedef enum {
*/
#define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_COMMIT
/**
* OSTREE_FILE_HEADER_GVARIANT_FORMAT:
*
* File objects are stored as a stream, with one #GVariant header,
* followed by content.
*
* The file header is of the following form:
*
* <BE guint32 containing variant length>
* u - uid
* u - gid
* u - mode
* u - rdev
* s - symlink target
* a(ayay) - xattrs
*
* Then the rest of the stream is data.
*/
#define OSTREE_FILE_HEADER_GVARIANT_FORMAT G_VARIANT_TYPE ("(uuuusa(ayay))")
/**
* OSTREE_DIRMETA_GVARIANT_FORMAT:
*
@@ -124,25 +104,6 @@ typedef enum {
*/
#define OSTREE_COMMIT_GVARIANT_FORMAT G_VARIANT_TYPE ("(a{sv}aya(say)sstayay)")
/**
* OSTREE_ZLIB_FILE_HEADER_GVARIANT_FORMAT:
*
* This is a variation on %OSTREE_FILE_HEADER_GVARIANT_FORMAT, used for
* storing zlib-compressed content objects.
*
* <BE guint32 containing variant length>
* t - size
* u - uid
* u - gid
* u - mode
* u - rdev
* s - symlink target
* a(ayay) - xattrs
* ---
* zlib-compressed data
*/
#define OSTREE_ZLIB_FILE_HEADER_GVARIANT_FORMAT G_VARIANT_TYPE ("(tuuuusa(ayay))")
const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype);
gboolean ostree_validate_checksum_string (const char *sha256,
@@ -220,8 +181,6 @@ gboolean ostree_write_variant_with_size (GOutputStream *output,
GVariant *ostree_file_header_new (GFileInfo *file_info,
GVariant *xattrs);
GVariant *ostree_zlib_file_header_new (GFileInfo *file_info,
GVariant *xattrs);
gboolean ostree_file_header_parse (GVariant *metadata,
GFileInfo **out_file_info,