build: Whitespace & keep vim happy
[platform/upstream/ofono.git] / doc / sim-api.txt
1 SimManager hierarchy
2 ===============
3
4 Service         org.ofono
5 Interface       org.ofono.SimManager
6 Object path     [variable prefix]/{modem0,modem1,...}
7
8 Methods         dict GetProperties()
9
10                         Returns SIM properties for the modem object.  See
11                         the properties section for available properties.
12
13                 void ChangePin(string type, string oldpin, string newpin)
14
15                         Changes the pin given by string type.
16
17                         Possible Errors: [service].Error.NotImplemented
18                                          [service].Error.InProgress
19                                          [service].Error.InvalidArguments
20                                          [service].Error.InvalidFormat
21                                          [service].Error.Failed
22
23                 void EnterPin(string type, string pin)
24
25                         Enters the currently pending pin.  The type value must
26                         match the pin type being asked in the PinRequired
27                         property.
28
29                         Possible Errors: [service].Error.NotImplemented
30                                          [service].Error.InProgress
31                                          [service].Error.InvalidArguments
32                                          [service].Error.InvalidFormat
33                                          [service].Error.Failed
34
35                 void ResetPin(string type, string puk, string newpin)
36
37                         Provides the unblock key to the modem and if correct
38                         resets the pin to the new value of newpin.
39
40                         Possible Errors: [service].Error.NotImplemented
41                                          [service].Error.InProgress
42                                          [service].Error.InvalidArguments
43                                          [service].Error.InvalidFormat
44                                          [service].Error.Failed
45
46                 void LockPin(string type, string pin)
47
48                         Activates the lock for the particular pin type.  The
49                         device will ask for a PIN automatically next time the
50                         device is turned on or the SIM is removed and
51                         re-inserted.  The current PIN is required for the
52                         operation to succeed.
53
54                         Possible Errors: [service].Error.NotImplemented
55                                          [service].Error.InProgress
56                                          [service].Error.InvalidArguments
57                                          [service].Error.InvalidFormat
58                                          [service].Error.Failed
59
60                 void UnlockPin(string type, string pin)
61
62                         Deactivates the lock for the particular pin type.  The
63                         current PIN is required for the operation to succeed.
64
65                         Possible Errors: [service].Error.NotImplemented
66                                          [service].Error.InProgress
67                                          [service].Error.InvalidArguments
68                                          [service].Error.InvalidFormat
69                                          [service].Error.Failed
70
71                 array{byte} GetIcon(byte id)
72
73                         Obtain the icon given by id.  Only ids greater than 1
74                         are valid.  XPM format is currently used to return the
75                         icon data.
76
77                         Possible Errors: [service].Error.NotImplemented
78                                          [service].Error.InProgress
79                                          [service].Error.InvalidArguments
80                                          [service].Error.Failed
81
82 Signals         PropertyChanged(string name, variant value)
83
84                         This signal indicates a changed value of the given
85                         property.
86
87 Properties      boolean Present [readonly]
88
89                         True if a SIM card is detected.  There are
90                         no other properties if false.
91
92                 string SubscriberIdentity [readonly, optional]
93
94                         Contains the IMSI of the SIM, if available.
95
96                 string MobileCountryCode [readonly, optional]
97
98                         Contains the Mobile Country Code (MCC) of the home
99                         network (not to be confused with the currently
100                         registered network reported on NetworkRegistration
101                         interface) and is read directly from the SIM if
102                         available.
103
104                 string MobileNetworkCode [readonly, optional]
105
106                         Contains the Mobile Network Code (MNC) of the home
107                         network (not to be confused with the currently
108                         registered network reported on NetworkRegistration
109                         interface) and is read directly from the SIM if
110                         available.
111
112                 array{string} SubscriberNumbers [readwrite]
113
114                         Contains the list of subscriber numbers.  This is
115                         usually stored in the EFmsisdn sim file.
116
117                 array{string} PreferredLanguages [readonly, optional]
118
119                         Contains the list of preferred languages from the SIM,
120                         if available.
121
122                 dict{string,string} ServiceNumbers [readonly, optional]
123
124                         Contains a dictionary of service dialing numbers from
125                         the SIM, if available.
126
127                 string PinRequired [readonly]
128
129                         Contains the string type of the pin required by the
130                         modem.  The possible values are:
131                                 "none" - Nothing is required
132                                 "pin" - SIM PIN is required
133                                 "phone" - Phone-to-SIM PIN is required
134                                 "firstphone" - Phone-to-very-first SIM
135                                                 PIN is required
136                                 "pin2" - SIM PIN2 is required
137                                 "network" - Network Personalization password is
138                                                 required
139                                 "netsub" - Network subset personalization
140                                                 password is required
141                                 "service" - Service Provider personalization
142                                                 password is required
143                                 "corp" - Corporate personalization password
144                                                 is required
145                                 "puk" - SIM PUK is required
146                                 "firstphonepuk" - Phone-to-very-first SIM PUK is
147                                                 required
148                                 "puk2" - SIM PUK2 is required
149                                 "networkpuk" - Network personalization unblocking
150                                                 password is required
151                                 "netsubpuk" - Network subset personalization
152                                                 unblocking password is required
153                                 "servicepuk" - Service provider personalization
154                                                 unblocking password is required
155                                 "corppuk" - Corporate personalization unblocking
156                                                 password is required
157
158                 array{string} LockedPins [readonly]
159
160                         Contains the pins that are currently locked and will
161                         require the user to enter the password at startup.
162                         Using LockPin and UnlockPin will result in changes to
163                         this property.
164
165                         The list contains elements of the same format as the
166                         PinRequired property.
167
168                 string CardIdentifier [readonly]
169
170                         Contains the Integrated Circuit Card Identifer (ICCID)
171                         which is read directly from the SIM.
172
173                 boolean FixedDialing [readonly]
174
175                         True if Fixed Dialing service is enabled in SIM card.
176
177                         If FDN is enabled, oFono halts the SIM initialization
178                         procedure and only emergency calls are allowed.
179
180                 boolean BarredDialing [readonly]
181
182                         True if Barred Dialing service is enabled in SIM card.
183
184                         If BDN is enabled, oFono halts the SIM initialization
185                         procedure and only emergency calls are allowed.
186
187                 dict{string,byte} Retries [readonly]
188
189                         Contains all the retry counters available. The possible
190                         values for the first field are the same as in
191                         PinRequired property. The second field contains is the
192                         counter for that pin type.
193
194                         This property is updated after each operation that
195                         might have changed the retry counters, i.e. calls to
196                         ChangePin(), EnterPin(), ResetPin() LockPin(),
197                         UnlockPin().