[rygel] tests: Avoid some warnings



commit d217069ff79639016196df7818dd9c41850a1ac8
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 6 16:29:01 2012 +0100

    tests: Avoid some warnings

 tests/rygel-http-post-test.vala    |    2 +-
 tests/rygel-item-creator-test.vala |   12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/tests/rygel-http-post-test.vala b/tests/rygel-http-post-test.vala
index 8097840..af8acdd 100644
--- a/tests/rygel-http-post-test.vala
+++ b/tests/rygel-http-post-test.vala
@@ -254,7 +254,7 @@ public class Rygel.HTTPServer : GLib.Object {
 
     public string uri {
         owned get {
-			var item = new MediaItem (this.root_container.ITEM_ID, this.root_container);
+			var item = new MediaItem (MediaContainer.ITEM_ID, this.root_container);
 			var item_uri = new HTTPItemURI (item, this);
             return item_uri.to_string ();
         }
diff --git a/tests/rygel-item-creator-test.vala b/tests/rygel-item-creator-test.vala
index 21d8e1b..b5547ca 100644
--- a/tests/rygel-item-creator-test.vala
+++ b/tests/rygel-item-creator-test.vala
@@ -147,7 +147,7 @@ public class Rygel.MediaItem : Rygel.MediaObject {
 }
 
 public class Rygel.MusicItem : Rygel.AudioItem {
-    public const string UPNP_CLASS = "object.item.audioItem.musicTrack";
+    public new const string UPNP_CLASS = "object.item.audioItem.musicTrack";
 
     public MusicItem (string id, MediaContainer parent, string title) {
         base (id, parent, title);
@@ -164,7 +164,7 @@ public class Rygel.AudioItem : Rygel.MediaItem {
     }
 }
 public class Rygel.ImageItem : Rygel.MediaItem {
-    public const string UPNP_CLASS = "object.item.imageItem";
+    public new const string UPNP_CLASS = "object.item.imageItem";
     public ImageItem (string id, MediaContainer parent, string title) {
         base (id, parent, title);
     }
@@ -210,7 +210,8 @@ public class Rygel.MediaContainer : Rygel.MediaObject {
     public MediaObject found_object = null;
 
     public async MediaObject? find_object (string       id,
-                                           Cancellable? cancellable = null) {
+                                           Cancellable? cancellable = null)
+                                           throws Error {
         Idle.add (() => { find_object.callback (); return false; });
         yield;
 
@@ -246,6 +247,7 @@ public class Rygel.SearchableContainer : Rygel.MediaContainer {
                                       out int          total_matches,
                                       string           soer_criteria,
                                       Cancellable?     cancellable = null) {
+        total_matches = 0;
         Idle.add (() => { search.callback (); return false; });
         yield;
 
@@ -265,8 +267,10 @@ public class Rygel.Transcoder {
 }
 
 public class Rygel.TestMediaEngine : Rygel.MediaEngine {
+    private GLib.List<DLNAProfile> dlna_profiles = new GLib.List<DLNAProfile>();
+
     public override unowned GLib.List<DLNAProfile> get_dlna_profiles () {
-        return null;
+        return dlna_profiles;
     }
 
     public override unowned GLib.List<Transcoder>? get_transcoders () {



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