api: added Modem.Voice and Call interfaces for voice call handling
This commit is contained in:

committed by
Aleksander Morgado

parent
0337781ba7
commit
0feb4acef4
@@ -1168,4 +1168,60 @@ typedef enum { /*< underscore_name=mm_oma_session_state_failed_reason >*/
|
||||
MM_OMA_SESSION_STATE_FAILED_REASON_SESSION_CANCELLED = 5
|
||||
} MMOmaSessionStateFailedReason;
|
||||
|
||||
/**
|
||||
* MMCallState:
|
||||
* @MM_CALL_STATE_UNKNOWN: default state for a new outgoing call.
|
||||
* @MM_CALL_STATE_DIALING: outgoing call started. Wait for free channel.
|
||||
* @MM_CALL_STATE_RINGING_IN: outgoing call attached to GSM network, waiting for an answer.
|
||||
* @MM_CALL_STATE_RINGING_OUT: incoming call is waiting for an answer.
|
||||
* @MM_CALL_STATE_ACTIVE: call is active between two peers.
|
||||
* @MM_CALL_STATE_HELD: held call (by +CHLD AT command).
|
||||
* @MM_CALL_STATE_WAITING: waiting call (by +CCWA AT command).
|
||||
* @MM_CALL_STATE_TERMINATED: call is terminated.
|
||||
*
|
||||
* State of Call
|
||||
*/
|
||||
typedef enum { /*< underscore_name=mm_call_state >*/
|
||||
MM_CALL_STATE_UNKNOWN = 0,
|
||||
MM_CALL_STATE_DIALING = 1,
|
||||
MM_CALL_STATE_RINGING_OUT = 2,
|
||||
MM_CALL_STATE_RINGING_IN = 3,
|
||||
MM_CALL_STATE_ACTIVE = 4,
|
||||
MM_CALL_STATE_HELD = 5,
|
||||
MM_CALL_STATE_WAITING = 6,
|
||||
MM_CALL_STATE_TERMINATED = 7
|
||||
} MMCallState;
|
||||
|
||||
/**
|
||||
* MMCallStateReason:
|
||||
* @MM_CALL_STATE_REASON_UNKNOWN: Default value for a new outgoing call.
|
||||
* @MM_CALL_STATE_REASON_OUTGOING_STARTED: Outgoing call is started.
|
||||
* @MM_CALL_STATE_REASON_INCOMING_NEW: Received a new incoming call.
|
||||
* @MM_CALL_STATE_REASON_ACCEPTED: Dialing or Ringing call is accepted.
|
||||
* @MM_CALL_STATE_REASON_TERMINATED: Call is correctly terminated.
|
||||
* @MM_CALL_STATE_REASON_REFUSED_OR_BUSY: Remote peer is busy or refused call
|
||||
* @MM_CALL_STATE_REASON_ERROR: Wrong number or generic network error.
|
||||
*/
|
||||
typedef enum { /*< underscore_name=mm_call_state_reason >*/
|
||||
MM_CALL_STATE_REASON_UNKNOWN = 0,
|
||||
MM_CALL_STATE_REASON_OUTGOING_STARTED = 1,
|
||||
MM_CALL_STATE_REASON_INCOMING_NEW = 2,
|
||||
MM_CALL_STATE_REASON_ACCEPTED = 3,
|
||||
MM_CALL_STATE_REASON_TERMINATED = 4,
|
||||
MM_CALL_STATE_REASON_REFUSED_OR_BUSY = 5,
|
||||
MM_CALL_STATE_REASON_ERROR = 6
|
||||
} MMCallStateReason;
|
||||
|
||||
/**
|
||||
* MMCallDirection:
|
||||
* @MM_CALL_DIRECTION_UNKNOWN: unknown.
|
||||
* @MM_CALL_DIRECTION_INCOMING: call from network.
|
||||
* @MM_CALL_DIRECTION_OUTGOING: call to network.
|
||||
*/
|
||||
typedef enum { /*< underscore_name=mm_call_direction >*/
|
||||
MM_CALL_DIRECTION_UNKNOWN = 0,
|
||||
MM_CALL_DIRECTION_INCOMING = 1,
|
||||
MM_CALL_DIRECTION_OUTGOING = 2
|
||||
} MMCallDirection;
|
||||
|
||||
#endif /* _MODEMMANAGER_ENUMS_H_ */
|
||||
|
@@ -6,7 +6,9 @@
|
||||
<xi:include href="org.freedesktop.ModemManager1.Sim.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Bearer.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Sms.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Call.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Modem.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Modem.Voice.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Modem.Modem3gpp.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml"/>
|
||||
<xi:include href="org.freedesktop.ModemManager1.Modem.ModemCdma.xml"/>
|
||||
|
88
introspection/org.freedesktop.ModemManager1.Call.xml
Normal file
88
introspection/org.freedesktop.ModemManager1.Call.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!--
|
||||
ModemManager 1.0 Interface Specification
|
||||
|
||||
Copyright (C) 2015 Marco Bascetta <marco.bascetta@sadel.it>
|
||||
Copyright (C) 2015 Riccardo Vangelisti <riccardo.vangelisti@sadel.it>
|
||||
-->
|
||||
|
||||
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||
|
||||
<!--
|
||||
org.freedesktop.ModemManager1.Call:
|
||||
@short_description: The ModemManager Call interface.
|
||||
|
||||
The Call interface Defines operations and properties of a single Call.
|
||||
-->
|
||||
<interface name="org.freedesktop.ModemManager1.Call">
|
||||
|
||||
<!--
|
||||
Start:
|
||||
|
||||
If the outgoing call has not yet been started, start it.
|
||||
Applicable only if state is MM_CALL_STATE_UNKNOWN and direction is MM_CALL_DIRECTION_OUTGOING.
|
||||
-->
|
||||
<method name="Start" />
|
||||
|
||||
<!--
|
||||
Accept:
|
||||
|
||||
Accept incoming call (answer).
|
||||
Applicable only if state is MM_CALL_STATE_RINGING and direction is MM_CALL_DIRECTION_INCOMING
|
||||
-->
|
||||
<method name="Accept" />
|
||||
|
||||
<!--
|
||||
Hangup:
|
||||
|
||||
Hangup the active call.
|
||||
Applicable only if states are MM_CALL_STATE_RINGING and MM_CALL_STATE_ACCEPTED
|
||||
-->
|
||||
<method name="Hangup"/>
|
||||
|
||||
<!--
|
||||
StateChanged:
|
||||
@old: Old state MMCallState
|
||||
@new: New state MMCallState
|
||||
@reason: A <link linkend="MMCallStateReason">MMCallStateReason</link> value, specifying the reason for this state change.
|
||||
|
||||
Emitted when call changes state
|
||||
-->
|
||||
<signal name="StateChanged">
|
||||
<arg name="old" type="i" />
|
||||
<arg name="new" type="i" />
|
||||
<arg name="reason" type="u" />
|
||||
</signal>
|
||||
|
||||
<!--
|
||||
State:
|
||||
|
||||
A <link linkend="MMCallState">MMCallState</link> value,
|
||||
describing the state of the call.
|
||||
-->
|
||||
<property name="State" type="i" access="read" />
|
||||
|
||||
<!--
|
||||
StateReason:
|
||||
|
||||
A <link linkend="MMCallStateReason">MMCallStateReason</link> value, describing why the state is changed.
|
||||
-->
|
||||
<property name="StateReason" type="i" access="read" />
|
||||
|
||||
<!--
|
||||
Direction:
|
||||
|
||||
A <link linkend="MMCallDirection">MMCallDirection</link> value,
|
||||
describing the direction of the call.
|
||||
-->
|
||||
<property name="Direction" type="i" access="read" />
|
||||
|
||||
<!--
|
||||
Number:
|
||||
|
||||
The remote phone number.
|
||||
-->
|
||||
<property name="Number" type="s" access="read" />
|
||||
</interface>
|
||||
</node>
|
88
introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
Normal file
88
introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!--
|
||||
ModemManager 1.0 Interface Specification
|
||||
|
||||
Copyright (C) 2015 Marco Bascetta <marco.bascetta@sadel.it>
|
||||
Copyright (C) 2015 Riccardo Vangelisti <riccardo.vangelisti@sadel.it>
|
||||
-->
|
||||
|
||||
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||
|
||||
<!--
|
||||
org.freedesktop.ModemManager1.Modem.Voice:
|
||||
@short_description: The ModemManager Voice interface.
|
||||
|
||||
The Voice interface handles Calls.
|
||||
-->
|
||||
<interface name="org.freedesktop.ModemManager1.Modem.Voice">
|
||||
|
||||
<!--
|
||||
ListCalls:
|
||||
@result: The list of call object paths.
|
||||
|
||||
Retrieve all Calls.
|
||||
|
||||
This method should only be used once and subsequent information
|
||||
retrieved either by listening for the
|
||||
#org.freedesktop.ModemManager1.Modem.Voice::Added signal,
|
||||
or by querying the specific Call object of interest.
|
||||
-->
|
||||
<method name="ListCalls">
|
||||
<arg name="result" type="ao" direction="out" />
|
||||
</method>
|
||||
|
||||
<!--
|
||||
DeleteCall:
|
||||
@path: The object path of the Call to delete.
|
||||
|
||||
Delete a Call from lists of calls.
|
||||
If it is still active, Call.Hangup method is performed
|
||||
-->
|
||||
<method name="DeleteCall">
|
||||
<arg name="path" type="o" direction="in" />
|
||||
</method>
|
||||
|
||||
<!--
|
||||
CreateCall:
|
||||
@properties: Call properties from the <link linkend="gdbus-org.freedesktop.ModemManager1.Call">Call D-Bus interface</link>.
|
||||
@path: The object path of the new call object.
|
||||
|
||||
Creates a new call object.
|
||||
|
||||
The '<link linkend="gdbus-property-org-freedesktop-ModemManager1-Call.Number">Number</link>' is mandatory
|
||||
-->
|
||||
<method name="CreateCall">
|
||||
<arg name="properties" type="a{sv}" direction="in" />
|
||||
<arg name="path" type="o" direction="out" />
|
||||
</method>
|
||||
|
||||
<!--
|
||||
CallAdded:
|
||||
@path: Object path of the new call.
|
||||
|
||||
Emitted when any part of a Call has been received or added.
|
||||
-->
|
||||
<signal name="CallAdded">
|
||||
<arg name="path" type="o" />
|
||||
</signal>
|
||||
|
||||
<!--
|
||||
CallDeleted:
|
||||
@path: Object path of the now deleted Call.
|
||||
|
||||
Emitted when a call has been deleted.
|
||||
-->
|
||||
<signal name="CallDeleted">
|
||||
<arg name="path" type="o" />
|
||||
</signal>
|
||||
|
||||
<!--
|
||||
Calls:
|
||||
|
||||
The list of calls object paths.
|
||||
-->
|
||||
<property name="Calls" type="ao" access="read" />
|
||||
|
||||
</interface>
|
||||
</node>
|
Reference in New Issue
Block a user