2 * This file is part of libsamsung-ipc.
4 * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
5 * Copyright (C) 2011-2014 Paul Kocialkowski <contact@paulk.fr>
7 * libsamsung-ipc is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 2 of the License, or
10 * (at your option) any later version.
12 * libsamsung-ipc is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
21 #include <samsung-ipc.h>
23 #ifndef __SAMSUNG_IPC_CALL_H__
24 #define __SAMSUNG_IPC_CALL_H__
30 #define IPC_CALL_OUTGOING 0x0201
31 #define IPC_CALL_INCOMING 0x0202
32 #define IPC_CALL_RELEASE 0x0203
33 #define IPC_CALL_ANSWER 0x0204
34 #define IPC_CALL_STATUS 0x0205
35 #define IPC_CALL_LIST 0x0206
36 #define IPC_CALL_BURST_DTMF 0x0207
37 #define IPC_CALL_CONT_DTMF 0x0208
38 #define IPC_CALL_WAITING 0x0209
39 #define IPC_CALL_LINE_ID 0x020A
45 #define IPC_CALL_TYPE_VOICE 0x01
46 #define IPC_CALL_TYPE_DATA 0x03
48 #define IPC_CALL_IDENTITY_DEFAULT 0x00
49 #define IPC_CALL_IDENTITY_HIDE 0x01
50 #define IPC_CALL_IDENTITY_SHOW 0x02
52 #define IPC_CALL_PREFIX_NONE 0x00
53 #define IPC_CALL_PREFIX_INTL 0x11
55 #define IPC_CALL_STATUS_DIALING 0x01
56 #define IPC_CALL_STATUS_IGNORING_INCOMING_STATUS 0x02
57 #define IPC_CALL_STATUS_CONNECTED 0x03
58 #define IPC_CALL_STATUS_RELEASED 0x04
59 #define IPC_CALL_STATUS_CONNECTING 0x05
61 #define IPC_CALL_END_CAUSE_NORMAL 0x05
62 #define IPC_CALL_END_CAUSE_REJECTED 0x2F
63 #define IPC_CALL_END_CAUSE_UNSPECIFIED 0x10
65 #define IPC_CALL_TERM_MO 0x01
66 #define IPC_CALL_TERM_MT 0x02
68 #define IPC_CALL_LIST_ENTRY_STATUS_ACTIVE 0x01
69 #define IPC_CALL_LIST_ENTRY_STATUS_HOLDING 0x02
70 #define IPC_CALL_LIST_ENTRY_STATUS_DIALING 0x03
71 #define IPC_CALL_LIST_ENTRY_STATUS_ALERTING 0x04
72 #define IPC_CALL_LIST_ENTRY_STATUS_INCOMING 0x05
73 #define IPC_CALL_LIST_ENTRY_STATUS_WAITING 0x06
75 #define IPC_CALL_DTMF_STATE_START 0x01
76 #define IPC_CALL_DTMF_STATE_STOP 0x02
82 struct ipc_call_outgoing_data {
83 unsigned char unknown;
84 unsigned char type; // IPC_CALL_TYPE
85 unsigned char identity; // IPC_CALL_IDENTITY
86 unsigned char number_length;
87 unsigned char prefix; // IPC_CALL_PREFIX
88 unsigned char number[86];
89 } __attribute__((__packed__));
91 struct ipc_call_incoming_data {
92 unsigned char unknown;
93 unsigned char type; // IPC_CALL_TYPE_...
96 } __attribute__((__packed__));
98 struct ipc_call_status_data {
99 unsigned char unknown;
100 unsigned char type; // IPC_CALL_TYPE
102 unsigned char status; // IPC_CALL_STATUS
103 unsigned char reason;
104 unsigned char end_cause; // IPC_CALL_END_CAUSE
105 } __attribute__((__packed__));
107 struct ipc_call_list_header {
109 } __attribute__((__packed__));
111 struct ipc_call_list_entry {
112 unsigned char unknown1;
113 unsigned char type; // IPC_CALL_TYPE
115 unsigned char term; // IPC_CALL_TERM
116 unsigned char status; // IPC_CALL_LIST_ENTRY_STATUS
117 unsigned char unknown2;
118 unsigned char number_length;
119 unsigned char unknown3;
120 } __attribute__((__packed__));
122 struct ipc_call_burst_dtmf_header {
124 } __attribute__((__packed__));
126 struct ipc_call_burst_dtmf_entry {
129 } __attribute__((__packed__));
131 struct ipc_call_cont_dtmf_data {
134 } __attribute__((__packed__));
140 int ipc_call_outgoing_setup(struct ipc_call_outgoing_data *data,
141 unsigned char type, unsigned char identity, unsigned char prefix,
143 unsigned char ipc_call_list_count_extract(const void *data, size_t size);
144 struct ipc_call_list_entry *ipc_call_list_entry_extract(const void *data,
145 size_t size, unsigned int index);
146 char *ipc_call_list_entry_number_extract(const struct ipc_call_list_entry *entry);
147 void *ipc_call_burst_dtmf_setup(const struct ipc_call_burst_dtmf_entry *entries,
148 unsigned char count);
152 // vim:ts=4:sw=4:expandtab