rygel r161 - in trunk: . src/media-providers/tracker



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

Log:
Refactor: Put plugin stuff into a separate module.

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

Modified: trunk/src/media-providers/tracker/Makefile.am
==============================================================================
--- trunk/src/media-providers/tracker/Makefile.am	(original)
+++ trunk/src/media-providers/tracker/Makefile.am	Tue Oct 28 21:01:51 2008
@@ -12,13 +12,18 @@
 		gupnp-media-tracker.c \
 		gupnp-tracker-container.h \
 		gupnp-tracker-container.c
+		gupnp-tracker-plugin.h \
+		gupnp-tracker-plugin.c
 
 libgupnp_media_tracker_la_SOURCES = gupnp-media-tracker.h \
 			            gupnp-media-tracker.c \
 				    gupnp-media-tracker.vala \
 				    gupnp-tracker-container.h \
 			            gupnp-tracker-container.c \
-				    gupnp-tracker-container.vala
+				    gupnp-tracker-container.vala \
+				    gupnp-tracker-plugin.h \
+			            gupnp-tracker-plugin.c \
+				    gupnp-tracker-plugin.vala
 
 gupnp-media-tracker.stamp: $(filter %.vala,$(libgupnp_media_tracker_la_SOURCES))
 	$(VALAC) -C --vapidir=$(top_srcdir)/src/media-server \

Modified: trunk/src/media-providers/tracker/gupnp-media-tracker.vala
==============================================================================
--- trunk/src/media-providers/tracker/gupnp-media-tracker.vala	(original)
+++ trunk/src/media-providers/tracker/gupnp-media-tracker.vala	Tue Oct 28 21:01:51 2008
@@ -528,12 +528,3 @@
     }
 }
 
-[ModuleInit]
-public MediaProvider register_media_provider (string        root_id,
-                                              string        root_parent_id,
-                                              GUPnP.Context context) {
-    return new MediaTracker (root_id,
-                             root_parent_id,
-                             context);
-}
-

Added: trunk/src/media-providers/tracker/gupnp-tracker-plugin.vala
==============================================================================
--- (empty file)
+++ trunk/src/media-providers/tracker/gupnp-tracker-plugin.vala	Tue Oct 28 21:01:51 2008
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+using GUPnP;
+
+[ModuleInit]
+public MediaProvider register_media_provider (string        root_id,
+                                              string        root_parent_id,
+                                              GUPnP.Context context) {
+    return new MediaTracker (root_id,
+                             root_parent_id,
+                             context);
+}
+



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