doc: Update SMS API
[platform/upstream/ofono.git] / doc / message-api.txt
1 Message Manager hierarchy
2 ===============
3
4 Service         org.ofono
5 Interface       org.ofono.MessageManager
6 Object path     [variable prefix]/{modem0,modem1,...}
7
8 Methods         dict GetProperties()
9
10                         Returns properties for the manager object. See
11                         the properties section for available properties.
12
13                         Possible Errors: [service].Error.InvalidArguments
14
15                 array{object,dict} GetMessages()
16
17                         Get an array of message object paths and properties
18                         that represents the currently pending messages.
19
20                         This method call should only be used once when an
21                         application starts up.  Further call additions and
22                         removal shall be monitored via MessageAdded and
23                         MessageRemoved signals.
24
25                 void SetProperty(string name, variant value)
26
27                         Changes the value of the specified property. Only
28                         properties that are listed as read-write are
29                         changeable. On success a PropertyChanged signal
30                         will be emitted.
31
32                         Possible Errors: [service].Error.InvalidArguments
33                                          [service].Error.DoesNotExist
34
35                 void SendMessage(string to, string text)
36
37                         Send the message in text to the number in to.
38
39 Signals         PropertyChanged(string name, variant value)
40
41                         This signal indicates a changed value of the given
42                         property.
43
44                 ImmediateMessage(string message, dict info)
45
46                         New immediate (class 0) SMS received. Info has Sender,
47                         LocalSentTime, and SentTime information.  Sender
48                         address is given in string format.  LocalSentTime and
49                         SentTime are given in string form using ISO8601 format.
50
51                 IncomingMessage(string message, dict info)
52
53                         New incoming text SMS received. Info has Sender,
54                         LocalSentTime, and SentTime information.
55
56                 MessageAdded(object path, dict properties)
57
58                         This signal is emitted whenever a new Message object
59                         has been created.
60
61                 MessageRemoved(object path)
62
63                         This signal is emitted whenever a Message object
64                         has been removed, e.g. when it reaches a final state.
65
66 Properties      string ServiceCenterAddress
67
68                         Contains the number of the SMS service center.
69
70                 boolean UseDeliveryReports
71
72                         This property controls whether SMS Status Reports,
73                         sometimes better known as Delivery Reports are to be
74                         used.  If enabled, all outgoing SMS messages will be
75                         flagged to request a status report from the SMSC.
76
77                 string Bearer
78
79                         Contains the bearer to use for SMS messages.  Possible
80                         values are:
81                                 "cs-only" - Circuit Switched only
82                                 "ps-only" - Packet Domain only
83                                 "cs-preferred" - Use PS if CS is unavailable
84                                 "ps-preferred" - Use CS if PS is unavailable
85
86                         By default oFono uses "cs-preferred" setting.
87
88 Message hierarchy
89 ===============
90
91 Service         org.ofono
92 Interface       org.ofono.Message
93 Object path     [variable prefix]/{modem0,modem1,...}/{message_01,...}
94
95 Methods         dict GetProperties()
96
97                         Returns properties for the message object. See
98                         the properties section for available properties.
99
100                         Possible Errors: [service].Error.InvalidArguments
101
102 Signals         PropertyChanged(string name, variant value)
103
104                         This signal indicates a changed value of the given
105                         property.
106
107 Properties      string State
108
109                         Contains the state of the message object.  Possible
110                         values are:
111                                 "pending",
112                                 "sent",
113                                 "failed"