rygel r565 - trunk/src/plugins/tracker



Author: zeeshanak
Date: Sat Feb 14 15:22:27 2009
New Revision: 565
URL: http://svn.gnome.org/viewvc/rygel?rev=565&view=rev

Log:
Separate classes for all categories.

Added:
   trunk/src/plugins/tracker/rygel-tracker-image-container.vala
   trunk/src/plugins/tracker/rygel-tracker-music-container.vala
   trunk/src/plugins/tracker/rygel-tracker-video-container.vala
Modified:
   trunk/src/plugins/tracker/Makefile.am
   trunk/src/plugins/tracker/rygel-tracker-root-container.vala

Modified: trunk/src/plugins/tracker/Makefile.am
==============================================================================
--- trunk/src/plugins/tracker/Makefile.am	(original)
+++ trunk/src/plugins/tracker/Makefile.am	Sat Feb 14 15:22:27 2009
@@ -16,6 +16,12 @@
 		rygel-tracker-root-container.c \
 		rygel-tracker-container.h \
 		rygel-tracker-container.c \
+		rygel-tracker-video-container.h \
+		rygel-tracker-video-container.c \
+		rygel-tracker-music-container.h \
+		rygel-tracker-music-container.c \
+		rygel-tracker-image-container.h \
+		rygel-tracker-image-container.c \
 		rygel-tracker-item.h \
 		rygel-tracker-item.c \
 		rygel-tracker-video-item.h \
@@ -36,6 +42,15 @@
 				    rygel-tracker-container.h \
 			            rygel-tracker-container.c \
 				    rygel-tracker-container.vala \
+				    rygel-tracker-video-container.h \
+				    rygel-tracker-video-container.c \
+				    rygel-tracker-video-container.vala \
+				    rygel-tracker-music-container.h \
+				    rygel-tracker-music-container.c \
+				    rygel-tracker-music-container.vala \
+				    rygel-tracker-image-container.h \
+				    rygel-tracker-image-container.c \
+				    rygel-tracker-image-container.vala \
                                     rygel-tracker-item.h \
                                     rygel-tracker-item.c \
                                     rygel-tracker-item.vala \

Added: trunk/src/plugins/tracker/rygel-tracker-image-container.vala
==============================================================================
--- (empty file)
+++ trunk/src/plugins/tracker/rygel-tracker-image-container.vala	Sat Feb 14 15:22:27 2009
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Author: Zeeshan Ali <zeenix gmail com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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.
+ */
+
+using Rygel;
+
+/**
+ * Represents Tracker Image category.
+ */
+public class Rygel.TrackerImageContainer : Rygel.TrackerContainer {
+    public TrackerImageContainer (string id,
+                                  string parent_id,
+                                  string title) {
+        base (id, parent_id, title, "Images", MediaItem.IMAGE_CLASS);
+    }
+}
+

Added: trunk/src/plugins/tracker/rygel-tracker-music-container.vala
==============================================================================
--- (empty file)
+++ trunk/src/plugins/tracker/rygel-tracker-music-container.vala	Sat Feb 14 15:22:27 2009
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Author: Zeeshan Ali <zeenix gmail com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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.
+ */
+
+using Rygel;
+
+/**
+ * Represents Tracker Music category.
+ */
+public class Rygel.TrackerMusicContainer : Rygel.TrackerContainer {
+    public TrackerMusicContainer (string id,
+                                  string parent_id,
+                                  string title) {
+        base (id, parent_id, title, "Music", MediaItem.MUSIC_CLASS);
+    }
+}
+

Modified: trunk/src/plugins/tracker/rygel-tracker-root-container.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-root-container.vala	(original)
+++ trunk/src/plugins/tracker/rygel-tracker-root-container.vala	Sat Feb 14 15:22:27 2009
@@ -39,23 +39,17 @@
 
         this.containers = new ArrayList<TrackerContainer> ();
         this.containers.add
-                        (new TrackerContainer ("16",
-                                               this.id,
-                                               "All Images",
-                                               "Images",
-                                               MediaItem.IMAGE_CLASS));
+                        (new TrackerImageContainer ("16",
+                                                    this.id,
+                                                    "All Images"));
         this.containers.add
-                        (new TrackerContainer ("14",
-                                               this.id,
-                                               "All Music",
-                                               "Music",
-                                               MediaItem.MUSIC_CLASS));
+                        (new TrackerMusicContainer ("14",
+                                                    this.id,
+                                                    "All Music"));
         this.containers.add
-                        (new TrackerContainer ("15",
-                                               this.id,
-                                               "All Videos",
-                                               "Videos",
-                                               MediaItem.VIDEO_CLASS));
+                        (new TrackerVideoContainer ("15",
+                                                    this.id,
+                                                    "All Videos"));
 
         // Now we know how many top-level containers we have
         this.child_count = this.containers.size;

Added: trunk/src/plugins/tracker/rygel-tracker-video-container.vala
==============================================================================
--- (empty file)
+++ trunk/src/plugins/tracker/rygel-tracker-video-container.vala	Sat Feb 14 15:22:27 2009
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
+ * Copyright (C) 2008 Nokia Corporation, all rights reserved.
+ *
+ * Author: Zeeshan Ali <zeenix gmail com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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.
+ */
+
+using Rygel;
+
+/**
+ * Represents Tracker Video category.
+ */
+public class Rygel.TrackerVideoContainer : Rygel.TrackerContainer {
+    public TrackerVideoContainer (string id,
+                                  string parent_id,
+                                  string title) {
+        base (id, parent_id, title, "Videos", MediaItem.VIDEO_CLASS);
+    }
+}
+



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