Interface proposal

Katila Matti matti.katila at ixonos.com
Fri Dec 7 01:10:30 CET 2007


Hi,

As I said in my previous email I will post an interface proposal for
discussion. The interface is designed mostly by Jukka Honkela who is
my workmate.

All methods are called by applications and signals are called by the
daemon as in bluez.

We have used non-blocking design as we want not to block GUI.


<?xml version="1.0" encoding="UTF-8" ?>

<node name="/xyz">
    <interface name="xyz.modemctrl">
        <annotation name="org.freedesktop.DBus.GLib.CSymbol"
                    value="dbus_modemctrl"/>
        <!-- response: pinStatus -->
        <method name="setupPin">
            <arg name="pinCode" type="s"/>
        </method>
        <!-- response: pinStatus -->
        <method name="queryPinStatus"/>

        <method name="queryCurrentOperator"/>
        <method name="queryAvailableOperators"/>
        <method name="setOperator">
            <arg name="operator" type="s"/>
            <arg name="locked" type="b"/>
        </method>

        <method name="queryNetworkRegistration"/>

        <!-- query the modem status -->
        <method name="queryModemStatus"/>

        <!-- signals -->

        <signal name="pinStatus">
            <!-- values: -1 error/no sim card,
                         0 ready,
                         1 waiting for pin,
                         2 waiting for something else -->
            <arg name="status" type="i"/>
        </signal>

        <signal name="currentOperator">
            <arg name="operator" type="s"/>
            <arg name="locked" type="b"/>
        </signal>
        <signal name="availableOperators">
            <arg name="operators" type="as"/>
        </signal>
        <signal name="modemStatus">
            <!-- possible values:
                 -1 error,
                 0 idle,
                 1 busy,
                 2 unknown,
                 3 incoming call,
                 4 call in progress -->
            <arg name="status" type="i"/>
        </signal>
        <!-- this signal will be emitted automaticly every N seconds -->
        <signal name="signalStrength">
            <!-- values: 0-30 poor-very good, 31 max, 99 unknown -->
            <arg name="strength" type="i"/>
        </signal>
        <!-- 0: stopped,
             1: registered to home network,
             2: no network but searching,
             3: registration denied,
             4: unknown, 5: registered, but roaming -->
        <signal name="networkRegistrationStatus">
            <arg name="status" type="i"/>
        </signal>
    </interface>
    <interface name="xyz.voicecall">
        <annotation name="org.freedesktop.DBus.GLib.CSymbol"
                    value="dbus_voicecall"/>

        <!-- possible responses: callEnded or callStarted -->
        <method name="acceptCall"/>

        <!-- shall be used for anything that requires the call
             to be terminated or rejected -->
        <method name="hangupCall"/>

        <!-- possible resonces: dialFailed or callStarted -->
        <method name="dial">
            <arg name="phoneNo" type="s"/>
        </method>

        <method name="sendDtmf">
            <arg name="char" type="s"/>
        </method>

        <method name="queryMuteStatus"/>
        <method name="setMuteStatus">
            <arg name="muted" type="b"/>
        </method>

        <!-- This signal will only be emitted if there was a call ongoing -->
        <signal name="callEnded">
            <!-- valid reasons are: ? -->
            <arg name="reason" type="s"/>
        </signal>

        <!-- A call has been started, either by acceptCall or by
             dialing a number -->
        <signal name="callStarted"/>

        <!-- A dial attempt has failed. Unlike callEnded,
             this will be emitted when there is no call
             estastablished yet -->
        <signal name="dialFailed">
            <arg name="reason" type="s"/>
        </signal>

        <!-- a call is incoming -->
        <signal name="callIncoming">
            <arg name="phoneNo" type="s"/>
        </signal>

        <signal name="muteStatus">
            <arg name="muted" type="b"/>
        </signal>

        <signal name="acceptFailed">
            <arg name="reason" type="s"/>
        </signal>

    </interface>


    <!-- The SMS interface is designed to be used with
         SQLite3 database. Only message id is sent over DBus.
         If SMS slots in the SIM card are used this interface
         shall be redesigned. -->
    <interface name="xyz.sms">
        <annotation name="org.freedesktop.DBus.GLib.CSymbol"
                    value="dbus_sms"/>
        <method name="sendSms">
            <arg name="messageRef" type="i"/>
        </method>
        <signal name="newSms">
            <arg name="messageRef" type="i"/>
        </signal>
        <signal name="smsSent">
            <arg name="success" type="b"/>
            <arg name="reason" type="s"/>
        </signal>
    </interface>

    <!-- A one interface may be reserved for audio interface.
         The interface could encapsulate mute, speaker level and other
         audio volume adjustments. -->
</node>


   -Matti



More information about the Smartphones-standards mailing list