[PATCH 2/9] core: Add constructors to GrlMediaSourceFooSpec
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 2/9] core: Add constructors to GrlMediaSourceFooSpec
- Date: Fri, 9 Jul 2010 18:53:59 +0200
Add grl_media_source_foo_spec_new() functions.
---
src/grl-media-source.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
src/grl-media-source.h | 12 ++++++++
2 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index 122b689..de41ea5 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1088,6 +1088,72 @@ metadata_full_resolution_ctl_cb (GrlMediaSource *source,
/* ================ API ================ */
+GrlMediaSourceBrowseSpec *
+grl_media_source_browse_spec_new ()
+{
+ GrlMediaSourceBrowseSpec *bs;
+
+ bs = g_new0 (GrlMediaSourceBrowseSpec, 1);
+ bs->ref_count = 1;
+
+ return bs;
+}
+
+GrlMediaSourceSearchSpec *
+grl_media_source_search_spec_new ()
+{
+ GrlMediaSourceSearchSpec *ss;
+
+ ss = g_new0 (GrlMediaSourceSearchSpec, 1);
+ ss->ref_count = 1;
+
+ return ss;
+}
+
+GrlMediaSourceQuerySpec *
+grl_media_source_query_spec_new ()
+{
+ GrlMediaSourceQuerySpec *qs;
+
+ qs = g_new0 (GrlMediaSourceQuerySpec, 1);
+ qs->ref_count = 1;
+
+ return qs;
+}
+
+GrlMediaSourceMetadataSpec *
+grl_media_source_metadata_spec_new ()
+{
+ GrlMediaSourceMetadataSpec *ms;
+
+ ms = g_new0 (GrlMediaSourceMetadataSpec, 1);
+ ms->ref_count = 1;
+
+ return ms;
+}
+
+GrlMediaSourceStoreSpec *
+grl_media_source_store_spec_new ()
+{
+ GrlMediaSourceStoreSpec *ss;
+
+ ss = g_new0 (GrlMediaSourceStoreSpec, 1);
+ ss->ref_count = 1;
+
+ return ss;
+}
+
+GrlMediaSourceRemoveSpec *
+grl_media_source_remove_spec_new ()
+{
+ GrlMediaSourceRemoveSpec *rs;
+
+ rs = g_new0 (GrlMediaSourceRemoveSpec, 1);
+ rs->ref_count = 1;
+
+ return rs;
+}
+
/**
* grl_media_source_browse:
* @source: a media source
diff --git a/src/grl-media-source.h b/src/grl-media-source.h
index d275876..d085131 100644
--- a/src/grl-media-source.h
+++ b/src/grl-media-source.h
@@ -338,6 +338,18 @@ G_BEGIN_DECLS
GType grl_media_source_get_type (void);
+GrlMediaSourceBrowseSpec *grl_media_source_browse_spec_new (void);
+
+GrlMediaSourceSearchSpec *grl_media_source_search_spec_new (void);
+
+GrlMediaSourceQuerySpec *grl_media_source_query_spec_new (void);
+
+GrlMediaSourceMetadataSpec *grl_media_source_metadata_spec_new (void);
+
+GrlMediaSourceStoreSpec *grl_media_source_store_spec_new (void);
+
+GrlMediaSourceRemoveSpec *grl_media_source_remove_spec_new (void);
+
guint grl_media_source_browse (GrlMediaSource *source,
GrlMedia *container,
const GList *keys,
--
1.7.0.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]