libostree: Improve commit filter API

Make the structure private, and document the flags.

https://bugzilla.gnome.org/show_bug.cgi?id=706214
This commit is contained in:
Colin Walters committed 2013-08-25 15:23:23 -04:00
1 parent 94ce562905
commit 6c61b19107
3 files changed
+37 -19

No files matched your search

+14 -12
View File
@@ -250,24 +250,26 @@ typedef OstreeRepoCommitFilterResult (*OstreeRepoCommitFilter) (OstreeRepo *r
GFileInfo *file_info,
gpointer user_data);
/**
* OstreeRepoCommitModifierFlags:
* @OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE: No special flags
* @OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS: Do not process extended attributes
*/
typedef enum {
OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE = 0,
OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS = (1 << 0)
} OstreeRepoCommitModifierFlags;
/**
* OstreeRepoCommitModifier:
*
* A structure allowing control over commits.
*/
typedef struct {
volatile gint refcount;
typedef struct OstreeRepoCommitModifier OstreeRepoCommitModifier;
guint reserved_flags : 31;
guint skip_xattrs : 1;
OstreeRepoCommitFilter filter;
gpointer user_data;
gpointer reserved[3];
} OstreeRepoCommitModifier;
OstreeRepoCommitModifier *ostree_repo_commit_modifier_new (void);
OstreeRepoCommitModifier *ostree_repo_commit_modifier_new (OstreeRepoCommitModifierFlags flags,
OstreeRepoCommitFilter commit_filter,
gpointer user_data);
GType ostree_repo_commit_modifier_get_type (void);