~morphis/phablet-extras/ofono-sms-status-report

« back to all changes in this revision

Viewing changes to include/sim.h

  • Committer: Martin Pitt
  • Date: 2011-02-21 14:08:48 UTC
  • mfrom: (18.1.7 ofono)
  • Revision ID: martin@piware.de-20110221140848-9v2jbu09zvxib74l
* New upstream release.
* debian/control: explicitly Conflicts with modemmanager: having both
  installed / running at the same time causes issues causes issues with both
  claiming modem devices. (LP: #688472)
* debian/patches/02-dont-handle-stacktraces.patch: stop catching stacktraces
  and printing the information internally, so apport can catch and report
  the possible bugs. (LP: #691450)
* debian/ofono.postinst: on configure, notify the user that a reboot is
  required (so ofono can get started by upstart). (LP: #600501)
* debian/control: add new Build-Depends on libbluetooth-dev to build with
  bluetooth support.
* debian/rules: drop override_dh_strip, not needed for debug symbols with
  cdbs.
* debian/rules: pass --no-restart-on-upgrade so ofono isn't automatically
  restarted when upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <ofono/types.h>
30
30
 
31
31
struct ofono_sim;
 
32
struct ofono_sim_context;
32
33
 
33
34
/* 51.011 Section 9.3 */
34
35
enum ofono_sim_file_structure {
108
109
                                        enum ofono_sim_password_type type,
109
110
                                        void *data);
110
111
 
 
112
typedef void (*ofono_sim_pin_retries_cb_t)(const struct ofono_error *error,
 
113
                        int retries[OFONO_SIM_PASSWORD_INVALID], void *data);
 
114
 
111
115
typedef void (*ofono_sim_lock_unlock_cb_t)(const struct ofono_error *error,
112
116
                                        void *data);
113
117
 
144
148
                        ofono_sim_passwd_cb_t cb, void *data);
145
149
        void (*send_passwd)(struct ofono_sim *sim, const char *passwd,
146
150
                        ofono_sim_lock_unlock_cb_t cb, void *data);
 
151
        void (*query_pin_retries)(struct ofono_sim *sim,
 
152
                                ofono_sim_pin_retries_cb_t cb, void *data);
147
153
        void (*reset_passwd)(struct ofono_sim *sim, const char *puk,
148
154
                        const char *passwd,
149
155
                        ofono_sim_lock_unlock_cb_t cb, void *data);
150
156
        void (*change_passwd)(struct ofono_sim *sim,
151
157
                        enum ofono_sim_password_type type,
152
 
                        const char *old, const char *new,
 
158
                        const char *old_passwd, const char *new_passwd,
153
159
                        ofono_sim_lock_unlock_cb_t cb, void *data);
154
160
        void (*lock)(struct ofono_sim *sim, enum ofono_sim_password_type type,
155
161
                        int enable, const char *passwd,
173
179
void *ofono_sim_get_data(struct ofono_sim *sim);
174
180
 
175
181
const char *ofono_sim_get_imsi(struct ofono_sim *sim);
 
182
const char *ofono_sim_get_mcc(struct ofono_sim *sim);
 
183
const char *ofono_sim_get_mnc(struct ofono_sim *sim);
176
184
enum ofono_sim_phase ofono_sim_get_phase(struct ofono_sim *sim);
177
185
 
178
186
enum ofono_sim_cphs_phase ofono_sim_get_cphs_phase(struct ofono_sim *sim);
188
196
 
189
197
void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted);
190
198
 
 
199
struct ofono_sim_context *ofono_sim_context_create(struct ofono_sim *sim);
 
200
void ofono_sim_context_free(struct ofono_sim_context *context);
 
201
 
191
202
/* This will queue an operation to read all available records with id from the
192
203
 * SIM.  Callback cb will be called every time a record has been read, or once
193
204
 * if an error has occurred.  For transparent files, the callback will only
195
206
 *
196
207
 * Returns 0 if the request could be queued, -1 otherwise.
197
208
 */
198
 
int ofono_sim_read(struct ofono_sim *sim, int id,
 
209
int ofono_sim_read(struct ofono_sim_context *context, int id,
199
210
                        enum ofono_sim_file_structure expected,
200
211
                        ofono_sim_file_read_cb_t cb, void *data);
201
212
 
202
 
int ofono_sim_write(struct ofono_sim *sim, int id,
 
213
int ofono_sim_write(struct ofono_sim_context *context, int id,
203
214
                        ofono_sim_file_write_cb_t cb,
204
215
                        enum ofono_sim_file_structure structure, int record,
205
216
                        const unsigned char *data, int length, void *userdata);
206
217
 
207
 
int ofono_sim_read_bytes(struct ofono_sim *sim, int id,
 
218
int ofono_sim_read_bytes(struct ofono_sim_context *context, int id,
208
219
                        unsigned short offset, unsigned short num_bytes,
209
220
                        ofono_sim_file_read_cb_t cb, void *data);
210
221
#ifdef __cplusplus