1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 20:07:36 +00:00

Initial DBus API

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-02-05 01:41:33 +01:00
parent 17f684db5e
commit 8d937bedf6
6 changed files with 114 additions and 1 deletions

View file

@ -35,4 +35,10 @@
<xi:include href="xml/calls-call.xml"/>
</chapter>
<chapter id="dbus">
<title>DBus interfaces</title>
<xi:include href="../src/dbus/calls-sm.puri.Calls.xml"/>
<xi:include href="../src/dbus/calls-sm.puri.Calls.Call.xml"/>
</chapter>
</book>

View file

@ -27,6 +27,7 @@ gnome.gtkdoc('calls',
src_dir: [
join_paths(meson.source_root(), 'src'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src/dbus'),
join_paths(meson.build_root(), 'plugins/ofono/libgdbofono'),
],
dependencies: calls_doc_deps,

14
src/dbus/meson.build Normal file
View file

@ -0,0 +1,14 @@
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')

View file

@ -0,0 +1,36 @@
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!--
Copyright (C) 2021 Purism SPC
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<node>
<interface name="sm.puri.Calls.Call">
<method name="AcceptCall"/>
<method name="EndCall"/>
<method name="HoldCall"/>
<method name="UnholdCall"/>
<method name="SendDtmf">
<arg direction="in" type="s" name="tones"/>
</method>
<property name="CallParty" type="as" access="read"/>
<property name="CallIsConference" type="b" access="read"/>
<property name="CallState" type="u" access="read"/>
<property name="Origin" type="s" access="read"/>
</interface>
</node>

View file

@ -0,0 +1,53 @@
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!--
Copyright (C) 2021 Purism SPC
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<node>
<interface name="sm.puri.Calls">
<method name="Dial">
<arg type="s" direction="in" name="number"/>
<arg type="b" direction="out" name="success"/>
</method>
<method name="GetCalls">
<arg type="ao" direction="out" name="calls">
<doc:doc>
<doc:summary>an array of ongoing calls</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>This gets a list of all <doc:ref type="interface" to="sm.puri.Calls.Call">Calls</doc:ref>
that are currently ongoing.</doc:para>
<doc:para>Each Call is an D-Bus object path for the object that implements the
<doc:ref type="interface" to="sm.puri.Calls.Call">Call</doc:ref> interface.</doc:para>
</doc:description>
</doc:doc>
</method>
<property name="HasOngoingCall" type="b" access="read"/>
<signal name="CallAdded">
<arg name="id" type="u"/>
<arg name="parameters" type="a{sv}"/>
</signal>
<signal name="CallRemoved">
<arg name="id" type="u"/>
<arg name="parameters" type="a{sv}"/>
</signal>
</interface>
</node>

View file

@ -21,10 +21,12 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
subdir('wayland')
gnome = import('gnome')
subdir('wayland')
subdir('dbus')
src_include = include_directories('.')
calls_includes = [ top_include, src_include ]
@ -82,6 +84,7 @@ calls_resources = gnome.compile_resources(
calls_generated_sources = [
calls_enum_sources,
calls_resources,
generated_dbus_sources,
wl_proto_sources,
]