aboutsummaryrefslogtreecommitdiffstats
path: root/vapi/samsung-ipc-1.0.vapi
blob: 69c4c28a4c2596141b6b2b2b95c7a48b50c11fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
/*
 * samsung-ipc-1.0.vapi
 *
 * Copyright (C) 2011 Simon Busch <morphis@gravedo.de>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 */

namespace SamsungIpc
{
    [CCode (cname = "int", cprefix = "IPC_CLIENT_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
    public enum ClientType
    {
        CRESPO_FMT,
        CRESPO_RFS,
        H1,
    }

    [CCode (cname = "int", cprefix = "IPC_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
    public enum RequestType
    {
        EXEC,
        GET,
        SET,
        CFRM,
        EVENT,
    }

    [CCode (cname = "int", cprefix = "IPC_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
    public enum ResponseType
    {
        INDICATION,
        RESPONSE,
        NOTIFICATION,
    }

    [CCode (cname = "ipc_response_type", cheader_filename = "radio.h")]
    public string response_type_to_string(ResponseType type);

    [CCode (cname = "int", cprefix = "IPC_GROUP_", has_type_id = false, cheader_filename = "radio.h")]
    public enum MessageGroup
    {
        PWR,
        CALL,
        SMS,
        SEC,
        PB,
        DISP,
        NET,
        SND,
        MISC,
        SVC,
        SS,
        GPRS,
        SAT,
        CFG,
        IMEI,
        GPS,
        SAP,
        GEN
    }

    [CCode (cname = "int", cprefix = "IPC_PWR_", has_type_id = false, cheader_filename = "radio.h")]
    public enum PowerMessageType
    {
        PHONE_PWR_OFF,
        PHONE_PWR_UP,
        PHONE_RESET,
        BATT_STATUS,
        BATT_TYPE,
        BATT_COMP,
        PHONE_ONLINE,
    }

    [CCode (cname = "int", cprefix = "IPC_PB_", has_type_id = false, cheader_filename = "radio.h")]
    public enum PhonebookMessageType
    {
        ACCESS,
        STORAGE,
        STORAGE_LIST,
        ENTRY_INFO,
        CAPABILITY_INFO,
    }

    [CCode (cname = "int", cprefix = "IPC_SS_", has_type_id = false, cheader_filename = "radio.h")]
    public enum SupplementarySevicesMessageType
    {
        WAITING,
        CLI,
        BARRING,
        BARRING_PW,
        FORWARDING,
        INFO,
        MANAGE_CALL,
        USSD,
        AOC,
        RELASE_COMPLETE,
    }

    [CCode (cname = "int", cprefix = "IPC_GPRS_", has_type_id = false, cheader_filename = "radio.h")]
    public enum GprsMessageType
    {
        DEFINE_PDP_CONTEXT,
        QOS,
        PS,
        PDP_CONTEXT,
        SHOW_PDP_ADDR,
        /* 3G_QUAL_SERVICE_PROFILE, */
        IP_CONFIGURATION,
        DEFINE_SEC_PDP_CONTEXT,
        TFT,
        HSDPA_STATUS,
        CURRENT_SESSION_DATA_COUNT,
        DATA_DORMANT,
        DUN_PIN_CTRL,
        CALL_STATUS,
    }

    [CCode (cname = "int", cprefix = "IPC_SAT_", has_type_id = false, cheader_filename = "radio.h")]
    public enum SatMessageType
    {
        PROFILE_DOWNLOAD,
        ENVELOPE_CMD,
        PROACTIVE_CMD,
        TERMINATE_USAT_SESSION,
        EVENT_DOWNLOAD,
        PROVIDE_LOCAL_INFO,
        POLLING,
        REFRESH,
        SETUP_EVENT_LIST,
        CALL_CONTROL_RESULT,
        IMAGE_CLUT,
        CALL_PROCESSING,
    }

    [CCode (cname = "int", cprefix = "IPC_IMEI_", has_type_id = false, cheader_filename = "radio.h")]
    public enum ImeiMessageType
    {
        START,
        CHECK_DEVICE_INFO,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallMessageType
    {
        OUTGOING,
        INCOMING,
        RELEASE,
        ANSWER,
        STATUS,
        LIST,
        BURST_DTMF,
        CONT_DTMF,
        WAITING,
        LINE_ID,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallType
    {
        VOICE,
        DATA,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_IDENTITY_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallIdentity
    {
        DEFAULT,
        HIDE,
        SHOW,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_PREFIX_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallPrefix
    {
        NONE,
        INTL,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_STATE_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallState
    {
        DIALING,
        IGNORING_INCOMING_STATUS,
        CONNECTED,
        RELEASED,
        CONNECTING,
    }

    [CCode (cname = "int", cprefix = "IPC_CALL_TERM_", has_type_id = false, cheader_filename = "radio.h")]
    public enum CallTermination
    {
        MO,
        MT,
    }

    [CCode (cname = "struct ipc_call_outgoing", cheader_filename = "radio.h")]
    public struct CallOutgoingMessage
    {
        public uint8 type;
        public uint8 identity;
        public uint8 length;
        public uint8 prefix;
        public uint8[] number;
    }

    [CCode (cname = "struct ipc_call_incoming", cheader_filename = "radio.h")]
    public struct CallIncomingMessage
    {
        public uint8 type;
        public uint8 id;
        public uint8 line;
    }

    [CCode (cname = "struct ipc_call_list_entry", cheader_filename = "radio.h")]
    public struct CallListEntryMessage
    {
        public uint8 type;
        public uint8 idx;
        public uint8 term;
        public uint8 state;
        public uint8 mpty;
        public uint8 number_len;
        public uint8 unk4;
    }

    [CCode (cname = "struct ipc_call_status", cheader_filename = "radio.h")]
    public struct CallStatusMessage
    {
        public uint8 type;
        public uint8 id;
        public uint8 state;
        public uint8 reason;
        public uint8 end_cause;
    }

    [CCode (cname = "struct ipc_header", cheader_filename = "radio.h")]
    public struct Header
    {
        public uint16 length;
        public uint8 mseq;
        public uint8 aseq;
        public uint8 group;
        public uint8 index;
        public uint8 type;
    }

    [CCode (cname = "struct ipc_request", cheader_filename = "radio.h", destroy_function = "")]
    public struct Request
    {
        public uint8 mseq;
        public uint8 aseq;
        public uint8 group;
        public uint8 index;
        public uint8 type;
        public uint32 length;
        public uint8[] data;
    }

    [Compact]
    [CCode (cname = "struct ipc_response", cheader_filename = "radio.h", destroy_function = "")]
    public struct Response
    {
        public uint8 mseq;
        public uint8 aseq;
        public uint16 command;
        public uint8 type;
        public uint32 data_length;
        [CCode (array_length_cname = "data_length")]
        public uint8[] data;

        [CCode (cname = "ipc_response_type")]
        public string type_to_string();
    }

    public delegate int TransportCb(uint8[] data);

    [Compact]
    [CCode (cname = "struct ipc_client", cprefix = "ipc_client_", cheader_filename = "radio.h")]
    public class Client
    {
        public Client(ClientType type);
        [CCode (delagate_target_pos = 0.9)]
        public int set_delegates(TransportCb write_cb, TransportCb read_cb);
        public int bootstrap_modem();
        public void open();
        public void close();
        public int recv(out Response response);
        public void send(int command, int type, uint8 data, int length, uint8 mseq);
        public void send_get(int command, uint8 aseq);
        public void send_exec(int command, uint8 aseq);
    }
}