[PATCH 12/15] core: Add ref() functions to GrlMetadataSourceFooSpec
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 12/15] core: Add ref() functions to GrlMetadataSourceFooSpec
- Date: Mon, 19 Jul 2010 20:34:01 +0200
Add grl_metadata_source_foo_spec_ref() to increment reference.
---
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 d14e56a..1ed29a5 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -517,6 +517,28 @@ grl_metadata_source_set_metadata_spec_new ()
return sms;
}
+GrlMetadataSourceResolveSpec *
+grl_metadata_source_resolve_spec_ref (GrlMetadataSourceResolveSpec *rs)
+{
+ g_return_val_if_fail (rs, NULL);
+ g_return_val_if_fail (rs->ref_count > 0, rs);
+
+ g_atomic_int_inc (&rs->ref_count);
+
+ return rs;
+}
+
+GrlMetadataSourceSetMetadataSpec *
+grl_metadata_source_set_metadata_spec_ref (GrlMetadataSourceSetMetadataSpec *sms)
+{
+ g_return_val_if_fail (sms, NULL);
+ g_return_val_if_fail (sms->ref_count > 0, sms);
+
+ g_atomic_int_inc (&sms->ref_count);
+
+ 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 917c745..ef6913c 100644
--- a/src/grl-metadata-source.h
+++ b/src/grl-metadata-source.h
@@ -259,6 +259,10 @@ GrlMetadataSourceResolveSpec *grl_metadata_source_resolve_spec_new (void);
GrlMetadataSourceSetMetadataSpec *grl_metadata_source_set_metadata_spec_new (void);
+GrlMetadataSourceResolveSpec *grl_metadata_source_resolve_spec_ref (GrlMetadataSourceResolveSpec *rs);
+
+GrlMetadataSourceSetMetadataSpec *grl_metadata_source_set_metadata_spec_ref (GrlMetadataSourceSetMetadataSpec *sms);
+
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]