org.freesmartphone.GSM.SMS

Vesa Pikki vesa.pikki at ixonos.com
Wed May 14 13:16:36 CEST 2008


Hi

I'm currently integrating gsmd2 to an sms application, but I'm having 
trouble with current api. The application has 3 tabs called Inbox, 
Outbox and Sent. I'd like to be able to retrieve messages to these three 
categories. Also the application should be able to display if a message 
has been read or not and have the ability to set a message read.

I'm thinking that we should first define SMS message as fso API sees it. 
Here is a very simplified example of SMS's variables to get us going. 
Feel free to modify/rename/add/remove fields as you see fit.

SMS:
- string message, contents of the message
- string number, sender's or receiver's phone number
- int timestamp, time the message was received/sent
- string status, message's status: received, sending, sent, draft
- string direction, was message sent or received: received, sent
- boolean read, has the message been read (could also be used with 
SendMessage's want_report parameter)

To support these variables I'd like to modify some 
org.freesmartphone.GSM.SMS's methods. Here are some proposals:

<method name="ListMessages">
    <annotation name="org.freedesktop.DBus.GLib.Async" value="fso_gsm_sms"/>
    <arg type="s" name="status" direction="in"/>
    <arg type="ai" name="indices" direction="out"/>
</method>

Status would have these values:
received
sending
sent
draft
all (ignore status and retrieve all messages)

Status could also be replaced with <arg type="s" name="directory" 
direction="in"/>
which could have values "received", "sending", "sent", "draft", "all". 
With directories we could have inbox with subdirectories such as read 
and unread and so forth.


<method name="RetrieveMessage">
    <annotation name="org.freedesktop.DBus.GLib.Async" value="fso_gsm_sms"/>
    <arg type="i" name="index" direction="in"/>
    <arg type="s" name="number" direction="out"/>
    <arg type="s" name="message" direction="out"/>
    <arg type="s" name="status" direction="out"/>
    <arg type="s" name="direction" direction="out"/>
    <arg type="b" name="read" direction="out"/>
</method>

Add this method support for all SMS's parameter's. Or put them all 
inside <arg type="a{sv}" name="message" direction="out"/> and define the 
key's.
similar to parameters above.

Lastly I'd like to add a method to update message's read variable.
Either just
<method name="SetMessageRead">
    <annotation name="org.freedesktop.DBus.GLib.Async" value="fso_gsm_sms"/>
    <arg type="i" name="index" direction="in"/>
    <arg type="b" name="read" direction="in"/>
</method>

or if RetrieveMessage uses "a{sv}", then with
<method name="SetMessageProperty">
    <annotation name="org.freedesktop.DBus.GLib.Async" value="fso_gsm_sms"/>
    <arg type="i" name="index" direction="in"/>
    <arg type="s" name="key" direction="in"/>
    <arg type="v" name="value" direction="in"/>
</method>

-- 
Vesa Pikki




More information about the smartphones-standards mailing list