[grilo-plugins] bookmarks: updated for the new caps and options APIs
- From: Guillaume JÃrÃme Emont <guijemont src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] bookmarks: updated for the new caps and options APIs
- Date: Wed, 14 Dec 2011 13:57:45 +0000 (UTC)
commit 211d42aefbfa3787bd58f25cc3c2823ab73df9dc
Author: Guillaume Emont <guijemont igalia com>
Date: Tue Aug 30 15:18:24 2011 +0200
bookmarks: updated for the new caps and options APIs
src/media/bookmarks/grl-bookmarks.c | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/src/media/bookmarks/grl-bookmarks.c b/src/media/bookmarks/grl-bookmarks.c
index 67ee41d..b937b0d 100644
--- a/src/media/bookmarks/grl-bookmarks.c
+++ b/src/media/bookmarks/grl-bookmarks.c
@@ -178,6 +178,9 @@ static gboolean grl_bookmarks_source_notify_change_start (GrlMediaSource *source
static gboolean grl_bookmarks_source_notify_change_stop (GrlMediaSource *source,
GError **error);
+static GrlCaps * grl_bookmarks_source_get_caps (GrlMetadataSource *source,
+ GrlSupportedOps operation);
+
/* =================== Bookmarks Plugin =============== */
static gboolean
@@ -256,6 +259,7 @@ static gboolean grl_bookmarks_source_notify_change_stop (GrlMediaSource *source,
source_class->notify_change_stop = grl_bookmarks_source_notify_change_stop;
metadata_class->supported_keys = grl_bookmarks_source_supported_keys;
+ metadata_class->get_caps = grl_bookmarks_source_get_caps;
g_type_class_add_private (klass, sizeof (GrlBookmarksPrivate));
}
@@ -753,8 +757,8 @@ grl_bookmarks_source_browse (GrlMediaSource *source,
os->source = bs->source;
os->operation_id = bs->browse_id;
os->media_id = grl_media_get_id (bs->container);
- os->count = bs->count;
- os->skip = bs->skip;
+ os->count = grl_operation_options_get_count (bs->options);
+ os->skip = grl_operation_options_get_skip (bs->options);
os->callback = bs->callback;
os->user_data = bs->user_data;
os->error_code = GRL_CORE_ERROR_BROWSE_FAILED;
@@ -786,8 +790,8 @@ grl_bookmarks_source_search (GrlMediaSource *source,
os = g_slice_new0 (OperationSpec);
os->source = ss->source;
os->operation_id = ss->search_id;
- os->count = ss->count;
- os->skip = ss->skip;
+ os->count = grl_operation_options_get_count (ss->options);
+ os->skip = grl_operation_options_get_skip (ss->options);
os->callback = ss->callback;
os->user_data = ss->user_data;
os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
@@ -818,8 +822,8 @@ grl_bookmarks_source_query (GrlMediaSource *source,
os = g_slice_new0 (OperationSpec);
os->source = qs->source;
os->operation_id = qs->query_id;
- os->count = qs->count;
- os->skip = qs->skip;
+ os->count = grl_operation_options_get_count (qs->options);
+ os->skip = grl_operation_options_get_skip (qs->options);
os->callback = qs->callback;
os->user_data = qs->user_data;
os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
@@ -908,3 +912,15 @@ grl_bookmarks_source_notify_change_stop (GrlMediaSource *source,
return TRUE;
}
+
+static GrlCaps *
+grl_bookmarks_source_get_caps (GrlMetadataSource *source,
+ GrlSupportedOps operation)
+{
+ static GrlCaps *caps = NULL;
+
+ if (caps == NULL)
+ caps = grl_caps_new ();
+
+ return caps;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]