Refactor: Put plugin stuff into a separate module.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Wed, 10 Sep 2008 21:21:35 +0000 (21:21 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Wed, 10 Sep 2008 21:21:35 +0000 (21:21 +0000)
svn path=/trunk/; revision=272

ChangeLog
src/media-providers/tracker/Makefile.am
src/media-providers/tracker/gupnp-media-tracker.vala
src/media-providers/tracker/gupnp-tracker-plugin.vala [new file with mode: 0644]

index 5f64921..5ed92ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,14 @@
 
        * src/media-providers/tracker/Makefile.am:
        * src/media-providers/tracker/gupnp-media-tracker.vala:
+       * src/media-providers/tracker/gupnp-tracker-plugin.vala:
+
+       Refactor: Put plugin stuff into a separate module.
+
+2008-09-08  Zeeshan Ali (Khattak)  <zeeshanak@gnome.org>
+
+       * src/media-providers/tracker/Makefile.am:
+       * src/media-providers/tracker/gupnp-media-tracker.vala:
        * src/media-providers/tracker/gupnp-tracker-container.vala:
 
        Refactor: Put TrackerContainer class into a separate module.
index f9e7a86..6943d9d 100644 (file)
@@ -12,13 +12,18 @@ BUILT_SOURCES = gupnp-media-tracker.stamp \
                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 \
index c0cf37f..e0c126d 100644 (file)
@@ -528,12 +528,3 @@ public class GUPnP.MediaTracker : MediaProvider {
     }
 }
 
-[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);
-}
-
diff --git a/src/media-providers/tracker/gupnp-tracker-plugin.vala b/src/media-providers/tracker/gupnp-tracker-plugin.vala
new file mode 100644 (file)
index 0000000..26d0f3d
--- /dev/null
@@ -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);
+}
+