</stateVariable>
<stateVariable>
+ <Optional/>
+ <name>ContainerUpdateIDs</name>
+ <sendEventsAttribute>yes</sendEventsAttribute>
+ <dataType>string</dataType>
+ </stateVariable>
+
+ <stateVariable>
<name>FeatureList</name>
<sendEventsAttribute>no</sendEventsAttribute>
<dataType>string</dataType>
<stateVariable>
<Optional/>
- <name>ContainerUpdateIDs</name>
- <sendEventsAttribute>yes</sendEventsAttribute>
- <dataType>string</dataType>
- </stateVariable>
-
- <stateVariable>
- <Optional/>
<name>TransferIDs</name>
<sendEventsAttribute>yes</sendEventsAttribute>
<dataType>string</dataType>
protected HTTPServer http_server;
public MediaContainer root_container;
+ private ArrayList<MediaContainer> updated_containers;
private ArrayList<Browse> browses;
public uint32 system_update_id;
this.http_server = new HTTPServer (this, this.get_type ().name ());
this.browses = new ArrayList<Browse> ();
+ this.updated_containers = new ArrayList<MediaContainer> ();
this.feature_list =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
this.action_invoked["GetSystemUpdateID"] +=
this.get_system_update_id_cb;
this.query_variable["SystemUpdateID"] += this.query_system_update_id;
+ this.query_variable["ContainerUpdateIDs"] +=
+ this.query_container_update_ids;
/* Connect SearchCapabilities related signals */
this.action_invoked["GetSearchCapabilities"] +=
value.set_uint (this.system_update_id);
}
+ /* Query ContainerUpdateIDs */
+ private void query_container_update_ids (ContentDirectory content_dir,
+ string variable,
+ ref GLib.Value value) {
+ var update_ids = this.create_container_update_ids ();
+
+ /* Set action return arguments */
+ value.init (typeof (string));
+ value.set_string (update_ids);
+ }
+
/* action GetSearchCapabilities implementation */
private void get_search_capabilities_cb (ContentDirectory content_dir,
owned ServiceAction action) {
private void on_browse_completed (Browse browse) {
this.browses.remove (browse);
}
+
+ private string create_container_update_ids () {
+ var update_ids = "";
+
+ foreach (var container in this.updated_containers) {
+ update_ids += "," + container.id + "," +
+ container.update_id.to_string ();
+ }
+
+ return update_ids;
+ }
}