6 OFONO_API_SIM = (1 << 0),
7 OFONO_API_NETREG = (1 << 1),
8 OFONO_API_VOICE = (1 << 2),
9 OFONO_API_MSG = (1 << 3),
10 OFONO_API_MSG_WAITING = (1 << 4),
11 OFONO_API_SMART_MSG = (1 << 5),
12 OFONO_API_STK = (1 << 6),
13 OFONO_API_CALL_FW = (1 << 7),
14 OFONO_API_CALL_VOL = (1 << 8),
15 OFONO_API_CALL_METER = (1 << 9),
16 OFONO_API_CALL_SET = (1 << 10),
17 OFONO_API_CALL_BAR = (1 << 11),
18 OFONO_API_SUPPL_SERV = (1 << 12),
19 OFONO_API_TXT_TEL = (1 << 13),
20 OFONO_API_CELL_BROAD = (1 << 14),
21 OFONO_API_CONNMAN = (1 << 15),
22 OFONO_API_PUSH_NOTIF = (1 << 16),
23 OFONO_API_PHONEBOOK = (1 << 17),
24 OFONO_API_ASN = (1 << 18)
31 OFONO_ERROR_DOES_NOT_EXIST,
32 OFONO_ERROR_IN_PROGRESS,
34 OFONO_ERROR_INVALID_ARGS,
35 OFONO_ERROR_INVALID_FORMAT,
36 OFONO_ERROR_ACCESS_DENIED,
37 OFONO_ERROR_ATTACH_IN_PROGRESS,
38 OFONO_ERROR_INCORRECT_PASSWORD,
39 OFONO_ERROR_NOT_ACTIVE,
40 OFONO_ERROR_NOT_ALLOWED,
41 OFONO_ERROR_NOT_ATTACHED,
42 OFONO_ERROR_NOT_AVAILABLE,
43 OFONO_ERROR_NOT_FOUND,
44 OFONO_ERROR_NOT_IMPLEMENTED,
45 OFONO_ERROR_NOT_RECOGNIZED,
46 OFONO_ERROR_NOT_REGISTERED,
47 OFONO_ERROR_NOT_SUPPORTED,
48 OFONO_ERROR_SIM_NOT_READY,
56 OFONO_CALL_STATE_DISCONNECTED = 0,
57 OFONO_CALL_STATE_ACTIVE,
58 OFONO_CALL_STATE_HELD,
59 OFONO_CALL_STATE_DIALING,
60 OFONO_CALL_STATE_ALERTING,
61 OFONO_CALL_STATE_INCOMING,
62 OFONO_CALL_STATE_WAITING
65 typedef struct _OFono_Call OFono_Call;
66 typedef struct _OFono_Pending OFono_Pending;
68 typedef void (*OFono_Simple_Cb)(void *data, OFono_Error error);
69 typedef void (*OFono_String_Cb)(void *data, OFono_Error error, const char *str);
70 typedef void (*OFono_Call_Cb)(void *data, OFono_Error error, OFono_Call *call);
74 OFono_Pending *ofono_call_hangup(OFono_Call *c, OFono_Simple_Cb cb,
76 OFono_Pending *ofono_call_answer(OFono_Call *c, OFono_Simple_Cb cb,
79 OFono_Call_State ofono_call_state_get(const OFono_Call *c);
80 const char *ofono_call_name_get(const OFono_Call *c);
81 const char *ofono_call_line_id_get(const OFono_Call *c);
83 #define ofono_call_state_valid_check(c) \
84 (ofono_call_state_get(c) != OFONO_CALL_STATE_DISCONNECTED)
86 void ofono_call_added_cb_set(void (*cb)(void *data, OFono_Call *call),
88 void ofono_call_removed_cb_set(void (*cb)(void *data, OFono_Call *call),
90 void ofono_call_changed_cb_set(void (*cb)(void *data, OFono_Call *call),
92 void ofono_call_disconnected_cb_set(void (*cb)(void *data, OFono_Call *call, const char *reason),
95 OFono_Pending *ofono_tones_send(const char *tones, OFono_Simple_Cb cb,
98 OFono_Pending *ofono_multiparty_create(OFono_Simple_Cb cb, const void *data);
101 const char *ofono_modem_serial_get(void);
103 OFono_Pending *ofono_modem_change_pin(const char *what, const char *old, const char *new,
104 OFono_Simple_Cb cb, const void *data);
105 OFono_Pending *ofono_modem_reset_pin(const char *what, const char *puk, const char *new,
106 OFono_Simple_Cb cb, const void *data);
108 OFono_Pending *ofono_ss_initiate(const char *command, OFono_String_Cb cb, const void *data);
110 OFono_Pending *ofono_dial(const char *number, const char *hide_callerid,
111 OFono_Call_Cb cb, const void *data);
115 OFono_Pending *ofono_mute_set(Eina_Bool mute, OFono_Simple_Cb cb, const void *data);
116 Eina_Bool ofono_mute_get(void);
118 OFono_Pending *ofono_volume_speaker_set(unsigned char volume, OFono_Simple_Cb cb, const void *data);
119 unsigned char ofono_volume_speaker_get(void);
122 OFono_Pending *ofono_volume_microphone_set(unsigned char volume, OFono_Simple_Cb cb, const void *data);
123 unsigned char ofono_volume_microphone_get(void);
126 void ofono_modem_api_require(unsigned int api_mask);
127 void ofono_modem_path_wanted_set(const char *path);
129 /* TODO: unique listener or multiple? set x add */
130 void ofono_connected_cb_set(void (*cb)(void *data), const void *data);
131 void ofono_disconnected_cb_set(void (*cb)(void *data), const void *data);
132 void ofono_changed_cb_set(void (*cb)(void *data), const void *data);
134 void ofono_pending_cancel(OFono_Pending *pending);
136 Eina_Bool ofono_init(void);
137 void ofono_shutdown(void);