rygel r115 - in trunk: . src



Author: zeeshanak
Date: Tue Oct 28 21:00:42 2008
New Revision: 115
URL: http://svn.gnome.org/viewvc/rygel?rev=115&view=rev

Log:
Introduce MediaProvider interface that MediaTracker implements.

Added:
   trunk/src/gupnp-media-provider.vala
Modified:
   trunk/ChangeLog
   trunk/src/Makefile.am
   trunk/src/gupnp-media-tracker.vala

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Tue Oct 28 21:00:42 2008
@@ -24,7 +24,9 @@
 		gupnp-media-receiver-registrar.h \
 		gupnp-media-receiver-registrar.c \
 		gupnp-media-tracker.h \
-		gupnp-media-tracker.c
+		gupnp-media-tracker.c \
+		gupnp-media-provider.h \
+		gupnp-media-provider.c
 
 gupnp_media_server_SOURCES = cstuff.c \
 			     cstuff.h \
@@ -43,6 +45,9 @@
 			     gupnp-media-tracker.h \
 			     gupnp-media-tracker.c \
 			     gupnp-media-tracker.vala \
+			     gupnp-media-provider.h \
+			     gupnp-media-provider.c \
+			     gupnp-media-provider.vala \
 			     gupnp-metadata-extractor.c \
 			     gupnp-metadata-extractor.h \
 			     gupnp-metadata-extractor.vala

Added: trunk/src/gupnp-media-provider.vala
==============================================================================
--- (empty file)
+++ trunk/src/gupnp-media-provider.vala	Tue Oct 28 21:00:42 2008
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
+ *
+ * Author: Zeeshan Ali <zeenix gmail com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ */
+
+public interface MediaProvider : GLib.Object {
+    /* Properties */
+    public abstract string# root_id { get; construct; }
+    public abstract GUPnP.Context context { get; construct; }
+
+    public abstract string? browse (string   container_id,
+                                    string   filter,
+                                    uint     starting_index,
+                                    uint     requested_count,
+                                    string   sort_criteria,
+                                    out uint number_returned,
+                                    out uint total_matches,
+                                    out uint update_id);
+
+    public abstract string get_metadata (string  object_id,
+                                         string  filter,
+                                         string  sort_criteria,
+                                         out uint update_id);
+}
+

Modified: trunk/src/gupnp-media-tracker.vala
==============================================================================
--- trunk/src/gupnp-media-tracker.vala	(original)
+++ trunk/src/gupnp-media-tracker.vala	Tue Oct 28 21:00:42 2008
@@ -44,7 +44,7 @@
     }
 }
 
-public class GUPnP.MediaTracker : GLib.Object {
+public class GUPnP.MediaTracker : GLib.Object, MediaProvider {
     /* class-wide constants */
     public static const string TRACKER_SERVICE = "org.freedesktop.Tracker";
     public static const string TRACKER_PATH = "/org/freedesktop/tracker";
@@ -70,7 +70,7 @@
     private SearchCriteriaParser search_parser;
 
     /* Properties */
-    public string root_id { get; construct; }
+    public string# root_id { get; construct; }
     public GUPnP.Context context { get; construct; }
 
     construct {



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