Implement a Lock/Unlock Queue API calls.
[Feature] Calls that make it possible to lock a queue exclusively
to one client (IPC/DBUS) which can then order few calls
in a row with a guarantee that no other client will
interrupt.
[Cause] n/a
[Solution] n/a
[Verification] Built, installed, run tests. Also see below.
Additional features implemented in this commit to support the above:
- DBus client disconnected notification. Adds a new callback to
registerObject() that's called when a client that previously talked to
the server gets disconnected.
- ZoneManager level client disconnect notification using the
aforementioned DBus and already implemented IPC functionalities.
- Changed SwitchToDefault from signal to a method so we can return an
error code when the queue is locked.
- MethodResultBuilder's getID() call that returns ipc independent
identifier that client connections can be identified with (using
getPeerID and getPeerName from IPC and DBus specific classes
respectively).
- mGuard fixed in the DbusConnection class. Now it really does protect
mConnection and mNameID as well as newly introduced mWatchedClients.
- Various half-related fixes/changes here and there (whitespaces,
duplicate definition of PROXY_CALL in the DBus interface, etc).
There are no tests in this commit for the DBus features and the
Lock/Unlock queue. They will follow in the later commits.
To somewhat test the disconnect notifications (both, DBus level and
ZoneManager level) one can connect to the server using appropriate APIs
and watch the DEBUG/TRACE logs. This can be achieved using the following
commands:
$ dbus-send --system --dest=org.tizen.vasum.host \
--type=method_call --print-reply \
/org/tizen/vasum/host \
org.tizen.vasum.host.manager.GetZoneIds
$ vasum-cli get_zone_ids
WARNING: this commit breaks API/ABI of libSimpleDbus
Change-Id: Ic0ed2371e563c34340ad41d66dd943a1abc8eb48
25 files changed: