[rygel] server: Query SystemUpdateID from backend
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Query SystemUpdateID from backend
- Date: Tue, 11 Dec 2012 20:09:21 +0000 (UTC)
commit b3d9c78ef5781744a7e938427523204d3191ab9b
Author: Jens Georg <jensg openismus com>
Date: Tue Dec 11 20:39:03 2012 +0100
server: Query SystemUpdateID from backend
src/librygel-server/rygel-content-directory.vala | 2 ++
src/librygel-server/rygel-trackable-container.vala | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-content-directory.vala b/src/librygel-server/rygel-content-directory.vala
index 1cc952c..3834b6b 100644
--- a/src/librygel-server/rygel-content-directory.vala
+++ b/src/librygel-server/rygel-content-directory.vala
@@ -119,8 +119,10 @@ internal class Rygel.ContentDirectory: Service {
if (this.root_container is TrackableContainer) {
var trackable = this.root_container as TrackableContainer;
this.service_reset_token = trackable.get_service_reset_token ();
+ this.system_update_id = trackable.get_system_update_id ();
} else {
this.service_reset_token = UUID.get ();
+ this.system_update_id = 0;
}
this.action_invoked["Browse"].connect (this.browse_cb);
diff --git a/src/librygel-server/rygel-trackable-container.vala b/src/librygel-server/rygel-trackable-container.vala
index dbd6371..431928d 100644
--- a/src/librygel-server/rygel-trackable-container.vala
+++ b/src/librygel-server/rygel-trackable-container.vala
@@ -86,6 +86,15 @@ public interface Rygel.TrackableContainer : Rygel.MediaContainer {
*/
public virtual void set_service_reset_token (string token) {}
+ /**
+ * Query the current system update id.
+ * This should be overriden by the root container of the back-end
+ * implementation.
+ *
+ * @return: the current SystemUpdateID as persisted by the back-end.
+ */
+ public virtual uint32 get_system_update_id () { return 0; }
+
private void thaw_events () {
// Forward events.
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]