test: Make use of nested namespaces
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 9 Jul 2010 14:40:44 +0000 (17:40 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 9 Jul 2010 14:43:23 +0000 (17:43 +0300)
src/plugins/test/rygel-test-audio-item.vala
src/plugins/test/rygel-test-content-dir.vala
src/plugins/test/rygel-test-item.vala
src/plugins/test/rygel-test-plugin.vala
src/plugins/test/rygel-test-root-container.vala
src/plugins/test/rygel-test-video-item.vala

index 56f1563..69bba43 100644 (file)
@@ -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,
index a1513f0..2aac724 100644 (file)
@@ -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);
     }
 }
 
index 47a22d8..f4bb394 100644 (file)
@@ -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;
index bb0860b..12e8a41 100644 (file)
@@ -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);
 }
 
index 7b28d18..fb7bb58 100644 (file)
@@ -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"));
     }
 }
 
index 22ce267..c43498c 100644 (file)
@@ -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,