[PATCH 7/7] core: Make grl_media_source_notify_change_stop() compulsory
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 7/7] core: Make grl_media_source_notify_change_stop() compulsory
- Date: Tue, 1 Feb 2011 18:09:12 +0100
Plugins must reimplement grl_media_source_notify_change_stop().
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
---
src/grl-media-source.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index b7368f1..3077f60 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -2043,7 +2043,8 @@ grl_media_source_supported_operations (GrlMetadataSource *metadata_source)
if (media_source_class->test_media_from_uri &&
media_source_class->media_from_uri)
caps |= GRL_OP_MEDIA_FROM_URI;
- if (media_source_class->notify_change_start)
+ if (media_source_class->notify_change_start &&
+ media_source_class->notify_change_stop)
caps |= GRL_OP_NOTIFY_CHANGE;
return caps;
@@ -2569,17 +2570,10 @@ grl_media_source_notify_change_start (GrlMediaSource *source,
void grl_media_source_notify_change_stop (GrlMediaSource *source)
{
g_return_if_fail (GRL_IS_MEDIA_SOURCE (source));
+ g_return_if_fail (grl_media_source_supported_operations (GRL_METADATA_SOURCE (source)) &
+ GRL_OP_NOTIFY_CHANGE);
- GrlMediaSourceClass *source_class = GRL_MEDIA_SOURCE_GET_CLASS (source);
-
- if (source_class->notify_change_stop) {
- source_class->notify_change_stop (source);
- } else {
- /* Just stop signal emission */
- g_signal_stop_emission (source,
- registry_signals[SIG_CONTENT_CHANGED],
- 0);
- }
+ return GRL_MEDIA_SOURCE_GET_CLASS (source)->notify_change_stop (source);
}
/**
--
1.7.3.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]