2008-08-02 Zeeshan Ali Khattak <zeenix@gmail.com>
+ * src/gupnp-content-directory.vala:
+
+ Use MediaManager rather than MediaTracker. This also means that
+ system_update_id doesn't need to be handled by ContentDirectory
+ anymore.
+
+2008-08-02 Zeeshan Ali Khattak <zeenix@gmail.com>
+
* src/Makefile.am:
* src/gupnp-media-manager.vala:
using GUPnP;
public class GUPnP.ContentDirectory: Service {
- uint32 system_update_id;
string feature_list;
- MediaTracker tracker;
+ MediaManager media_manager;
construct {
- this.tracker = new MediaTracker ("0", this.context);
- this.system_update_id = 0;
+ this.media_manager = new MediaManager ("0", this.context);
this.feature_list =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
}
if (browse_metadata) {
- didl = this.tracker.get_metadata (object_id,
- filter,
- sort_criteria,
- out update_id);
+ didl = this.media_manager.get_metadata (object_id,
+ filter,
+ sort_criteria,
+ out update_id);
num_returned = 1;
total_matches = 1;
} else {
- didl = this.tracker.browse (object_id,
- filter,
- starting_index,
- requested_count,
- sort_criteria,
- out num_returned,
- out total_matches,
- out update_id);
+ didl = this.media_manager.browse (object_id,
+ filter,
+ starting_index,
+ requested_count,
+ sort_criteria,
+ out num_returned,
+ out total_matches,
+ out update_id);
}
if (didl == null) {
return;
}
- if (update_id == uint32.MAX)
- update_id = this.system_update_id;
-
/* Set action return arguments */
action.set ("Result", typeof (string), didl,
"NumberReturned", typeof (uint), num_returned,
private void get_system_update_id_cb (ContentDirectory content_dir,
ServiceAction action) {
/* Set action return arguments */
- action.set ("Id", typeof (uint32), this.system_update_id);
+ action.set ("Id", typeof (uint32), this.media_manager.system_update_id);
action.return ();
}
ref GLib.Value value) {
/* Set action return arguments */
value.init (typeof (uint32));
- value.set_uint (this.system_update_id);
+ value.set_uint (this.media_manager.system_update_id);
}
/* action GetSearchCapabilities implementation */