Expose call objects on DBus

This exports call objects on the session bus:

 $ gdbus monitor --session -d sm.puri.Calls
 …
 /sm/puri/Calls: org.freedesktop.DBus.ObjectManager.InterfacesAdded (objectpath '/sm/puri/Calls/Call/1', {'sm.puri.Calls.Call': {'Inbound': <false>, 'State': <uint32 0>, 'Id': <''>, 'Party': <''>}})
 /sm/puri/Calls/Call/1: org.freedesktop.DBus.Properties.PropertiesChanged ('sm.puri.Calls.Call', {'Id': <'0987654321'>, 'Inbound': <true>, 'State': <uint32 5>}, @as [])
 /sm/puri/Calls: org.freedesktop.DBus.ObjectManager.InterfacesRemoved (objectpath '/sm/puri/Calls/Call/1', ['sm.puri.Calls.Call'])
 $ gdbus call --session --dest sm.puri.Calls --object-path /sm/puri/Calls/Call/1 --method sm.puri.Calls.Call.Hangup

Currenty hangup and accept methods are implemented as well as exposing
the current call state.
This commit is contained in:
Guido Günther
2021-04-02 09:52:14 +02:00
committed by Evangelos Ribeiro Tzaras
parent 8d937bedf6
commit 6f93b48ef4
8 changed files with 325 additions and 72 deletions

View File

@@ -1,14 +1,9 @@
generated_dbus_sources = []
# DBus server protocols
generated_dbus_sources += gnome.gdbus_codegen('calls-dbus',
'sm.puri.Calls.xml',
docbook: 'calls',
interface_prefix: 'sm.puri',
namespace: 'CallsDBus')
generated_dbus_sources += gnome.gdbus_codegen('calls-call-dbus',
'sm.puri.Calls.Call.xml',
docbook: 'calls',
interface_prefix: 'sm.puri',
namespace: 'CallsCallDBus')
object_manager: true,
namespace: 'CallsDBus')