[PATCH 10/15] core: Add constructors to GrlMetadataSourceFooSpec



Add grl_metadata_source_foo_spec_new() functions.
---
 src/grl-metadata-source.c |   22 ++++++++++++++++++++++
 src/grl-metadata-source.h |    4 ++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 8a50b45..e0f28e2 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -495,6 +495,28 @@ analyze_keys_to_write (GrlMetadataSource *source,
 
 /* ================ API ================ */
 
+GrlMetadataSourceResolveSpec *
+grl_metadata_source_resolve_spec_new ()
+{
+  GrlMetadataSourceResolveSpec *rs;
+
+  rs = g_new0 (GrlMetadataSourceResolveSpec, 1);
+  rs->ref_count = 1;
+
+  return rs;
+}
+
+GrlMetadataSourceSetMetadataSpec *
+grl_metadata_source_set_metadata_spec_new ()
+{
+  GrlMetadataSourceSetMetadataSpec *sms;
+
+  sms = g_new0 (GrlMetadataSourceSetMetadataSpec, 1);
+  sms->ref_count = 1;
+
+  return sms;
+}
+
 /**
  * grl_metadata_source_supported_keys:
  * @source: a metadata source
diff --git a/src/grl-metadata-source.h b/src/grl-metadata-source.h
index b55a6c1..917c745 100644
--- a/src/grl-metadata-source.h
+++ b/src/grl-metadata-source.h
@@ -255,6 +255,10 @@ G_BEGIN_DECLS
 
 GType grl_metadata_source_get_type (void);
 
+GrlMetadataSourceResolveSpec *grl_metadata_source_resolve_spec_new (void);
+
+GrlMetadataSourceSetMetadataSpec *grl_metadata_source_set_metadata_spec_new (void);
+
 GrlSupportedOps grl_metadata_source_supported_operations (GrlMetadataSource *source);
 
 const GList *grl_metadata_source_supported_keys (GrlMetadataSource *source);
-- 
1.7.0.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]