[rygel] test: Make use of nested namespaces



commit b8b77034d94669975130316c1b484bc655bf0782
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Jul 9 17:40:44 2010 +0300

    test: Make use of nested namespaces

 src/plugins/test/rygel-test-audio-item.vala     |    6 ++----
 src/plugins/test/rygel-test-content-dir.vala    |    4 ++--
 src/plugins/test/rygel-test-item.vala           |   12 ++++++------
 src/plugins/test/rygel-test-plugin.vala         |    2 +-
 src/plugins/test/rygel-test-root-container.vala |   12 ++++--------
 src/plugins/test/rygel-test-video-item.vala     |    6 ++----
 6 files changed, 17 insertions(+), 25 deletions(-)
---
diff --git a/src/plugins/test/rygel-test-audio-item.vala b/src/plugins/test/rygel-test-audio-item.vala
index 56f1563..69bba43 100644
--- a/src/plugins/test/rygel-test-audio-item.vala
+++ b/src/plugins/test/rygel-test-audio-item.vala
@@ -27,13 +27,11 @@ using Gst;
 /**
  * Represents Test audio item.
  */
-public class Rygel.TestAudioItem : Rygel.TestItem {
+public class Rygel.Test.AudioItem : Item {
     private const string TEST_MIMETYPE = "audio/x-wav";
     private const string PIPELINE = "audiotestsrc is-live=1 ! wavenc";
 
-    public TestAudioItem (string         id,
-                          MediaContainer parent,
-                          string         title) {
+    public AudioItem (string id, MediaContainer parent, string title) {
         base (id,
               parent,
               title,
diff --git a/src/plugins/test/rygel-test-content-dir.vala b/src/plugins/test/rygel-test-content-dir.vala
index a1513f0..2aac724 100644
--- a/src/plugins/test/rygel-test-content-dir.vala
+++ b/src/plugins/test/rygel-test-content-dir.vala
@@ -28,11 +28,11 @@ using Gee;
 /**
  * Implementation of ContentDirectory service, meant for testing purposes only.
  */
-public class Rygel.TestContentDir : Rygel.ContentDirectory {
+public class Rygel.Test.ContentDir : Rygel.ContentDirectory {
     /* Pubic methods */
     public override MediaContainer? create_root_container () {
         string friendly_name = this.root_device.get_friendly_name ();
-        return new TestRootContainer (friendly_name);
+        return new RootContainer (friendly_name);
     }
 }
 
diff --git a/src/plugins/test/rygel-test-item.vala b/src/plugins/test/rygel-test-item.vala
index 47a22d8..f4bb394 100644
--- a/src/plugins/test/rygel-test-item.vala
+++ b/src/plugins/test/rygel-test-item.vala
@@ -28,14 +28,14 @@ using Gst;
 /**
  * Represents Test item.
  */
-public abstract class Rygel.TestItem : Rygel.MediaItem {
+public abstract class Rygel.Test.Item : Rygel.MediaItem {
     const string TEST_AUTHOR = "Zeeshan Ali (Khattak)";
 
-    public TestItem (string         id,
-                     MediaContainer parent,
-                     string         title,
-                     string         mime,
-                     string         upnp_class) {
+    public Item (string         id,
+                 MediaContainer parent,
+                 string         title,
+                 string         mime,
+                 string         upnp_class) {
         base (id, parent, title, upnp_class);
 
         this.mime_type = mime;
diff --git a/src/plugins/test/rygel-test-plugin.vala b/src/plugins/test/rygel-test-plugin.vala
index bb0860b..12e8a41 100644
--- a/src/plugins/test/rygel-test-plugin.vala
+++ b/src/plugins/test/rygel-test-plugin.vala
@@ -28,7 +28,7 @@ using Gee;
 public void module_init (PluginLoader loader) {
     var plugin = new Plugin.MediaServer ("Test",
                                          "Test Streams",
-                                         typeof (TestContentDir));
+                                         typeof (Rygel.Test.ContentDir));
     loader.add_plugin (plugin);
 }
 
diff --git a/src/plugins/test/rygel-test-root-container.vala b/src/plugins/test/rygel-test-root-container.vala
index 7b28d18..fb7bb58 100644
--- a/src/plugins/test/rygel-test-root-container.vala
+++ b/src/plugins/test/rygel-test-root-container.vala
@@ -29,16 +29,12 @@ using Gst;
 /**
  * Represents the root container for Test media content hierarchy.
  */
-public class Rygel.TestRootContainer : Rygel.SimpleContainer {
-    public TestRootContainer (string title) {
+public class Rygel.Test.RootContainer : Rygel.SimpleContainer {
+    public RootContainer (string title) {
         base.root (title);
 
-        this.add_child (new TestAudioItem ("sinewave",
-                                           this,
-                                           "Sine Wave"));
-        this.add_child (new TestVideoItem ("smtpe",
-                                           this,
-                                           "SMTPE"));
+        this.add_child (new AudioItem ("sinewave", this, "Sine Wave"));
+        this.add_child (new VideoItem ("smtpe", this, "SMTPE"));
     }
 }
 
diff --git a/src/plugins/test/rygel-test-video-item.vala b/src/plugins/test/rygel-test-video-item.vala
index 22ce267..c43498c 100644
--- a/src/plugins/test/rygel-test-video-item.vala
+++ b/src/plugins/test/rygel-test-video-item.vala
@@ -27,15 +27,13 @@ using Gst;
 /**
  * Represents Test video item.
  */
-public class Rygel.TestVideoItem : Rygel.TestItem {
+public class Rygel.Test.VideoItem : Item {
     private const string TEST_MIMETYPE = "video/mpeg";
     private const string PIPELINE = "videotestsrc is-live=1 ! " +
                                     "ffenc_mpeg2video ! " +
                                     "mpegtsmux";
 
-    public TestVideoItem (string         id,
-                          MediaContainer parent,
-                          string         title) {
+    public VideoItem (string id, MediaContainer parent, string title) {
         base (id,
               parent,
               title,



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