From abf7a4c7809d1d705e1c0fcee326648b25a783e4 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Wed, 10 Sep 2008 21:21:35 +0000 Subject: [PATCH] Refactor: Put plugin stuff into a separate module. svn path=/trunk/; revision=272 --- ChangeLog | 8 +++++ src/media-providers/tracker/Makefile.am | 7 ++++- .../tracker/gupnp-media-tracker.vala | 9 ------ .../tracker/gupnp-tracker-plugin.vala | 35 ++++++++++++++++++++++ 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 src/media-providers/tracker/gupnp-tracker-plugin.vala diff --git a/ChangeLog b/ChangeLog index 5f64921..5ed92ce 100644 --- 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) + + * 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. diff --git a/src/media-providers/tracker/Makefile.am b/src/media-providers/tracker/Makefile.am index f9e7a86..6943d9d 100644 --- a/src/media-providers/tracker/Makefile.am +++ b/src/media-providers/tracker/Makefile.am @@ -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 \ diff --git a/src/media-providers/tracker/gupnp-media-tracker.vala b/src/media-providers/tracker/gupnp-media-tracker.vala index c0cf37f..e0c126d 100644 --- a/src/media-providers/tracker/gupnp-media-tracker.vala +++ b/src/media-providers/tracker/gupnp-media-tracker.vala @@ -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 index 0000000..26d0f3d --- /dev/null +++ b/src/media-providers/tracker/gupnp-tracker-plugin.vala @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2008 Zeeshan Ali . + * + * Author: Zeeshan Ali + * + * 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); +} + -- 2.7.4