On Mo, 2011-12-19 at 11:02 +0100, Chris Kühl wrote:
When looking into why the Session has a GetConfigs dbus method, I
noticed that there are several dbus methods which are not documented
in syncevo-session-full.xml. This includes Attach which is actually
mention but not properly documented in that file.
Is this just a case of the docs being out of sync or are some of
methods not intended to be in the session interface?
The docs are incomplete. In the patch which introduces the
implementation, I added some comments to the documentation, but I missed
completely that the actual documentation for Attach() and Detach() were
What is missing is something like:
Prevents destruction of the session until the client
detaches or quits. Implemented with a counter, so each
Attach() must be matched by a Detach() to free the session.
Meant to be used by clients which want to follow the
progress of a session started by the daemon or some other
client. StartSession() automatically includes one Attach()
call, so typically the client which created a session never
calls Attach() and Detach() only once.
Each Attach() or StartSession() must be matched by one
Detach() call, otherwise the session will not be
destructed. A client that quits without these calls will be
For the record, here's the commit:
Author: Patrick Ohly <patrick.ohly(a)intel.com>
Date: Thu Sep 30 10:32:13 2010 +0200
D-Bus API: added missing Session.Attach() (BMC #7761)
It was always part of the design that multiple clients can use any session.
Somehow we forgot to implement Session.Attach(), the call that allows a client
which hasn't started a session to register it's interest in the session. In
particular, that session won't go away unless the client exits or detaches.
This patch adds that missing call, a corresponding capability
("SessionAttach") and a unit test. The unit test covers recursive
attach/detach, it does not actually verify that the session remains
diff --git a/src/dbus/interfaces/syncevo-server-full.xml
index 861357b..82ba84d 100644
@@ -65,6 +65,12 @@
and Server.EnableNotifications() implemented
diff --git a/src/dbus/interfaces/syncevo-session-full.xml
index d81862b..fb77ecb 100644
@@ -2,8 +2,18 @@
- <doc:para>A Session object is used to do do syncs and to modify the server
configurations. Clients can create
- <doc:para>Commands (other than Detach()) cannot be used before the status
changes to "idle" (see GetStatus() a
+ A Session object is used to do do syncs and to modify
+ the server configurations. Clients can create a Session with
+ Server.StartSession(), attach to a session started by some other
+ client with Session.Attach(), and detach from it with
+ Commands (other than Attach() and Detach()) cannot be used
+ before the status changes to "idle" (see GetStatus() and
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.