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 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_SMS_H__
24 #define __SAMSUNG_IPC_SMS_H__
30 #define IPC_SMS_SEND_MSG 0x0401
31 #define IPC_SMS_INCOMING_MSG 0x0402
32 #define IPC_SMS_READ_MSG 0x0403
33 #define IPC_SMS_SAVE_MSG 0x0404
34 #define IPC_SMS_DEL_MSG 0x0405
35 #define IPC_SMS_DELIVER_REPORT 0x0406
36 #define IPC_SMS_DEVICE_READY 0x0407
37 #define IPC_SMS_SEL_MEM 0x0408
38 #define IPC_SMS_STORED_MSG_COUNT 0x0409
39 #define IPC_SMS_SVC_CENTER_ADDR 0x040A
40 #define IPC_SMS_SVC_OPTION 0x040B
41 #define IPC_SMS_MEM_STATUS 0x040C
42 #define IPC_SMS_CBS_MSG 0x040D
43 #define IPC_SMS_CBS_CFG 0x040E
44 #define IPC_SMS_STORED_MSG_STATUS 0x040F
45 #define IPC_SMS_PARAM_COUNT 0x0410
46 #define IPC_SMS_PARAM 0x0411
52 #define IPC_SMS_TYPE_POINT_TO_POINT 0x01
53 #define IPC_SMS_TYPE_STATUS_REPORT 0x02
54 #define IPC_SMS_TYPE_OUTGOING 0x02
56 #define IPC_SMS_MSG_TYPE_MULTIPLE 0x01
57 #define IPC_SMS_MSG_TYPE_SINGLE 0x02
59 #define IPC_SMS_ACK_NO_ERROR 0x0000
60 #define IPC_SMS_ACK_PDA_FULL_ERROR 0x8080
61 #define IPC_SMS_ACK_MALFORMED_REQ_ERROR 0x8061
62 #define IPC_SMS_ACK_UNSPEC_ERROR 0x806F
64 #define IPC_SMS_STATUS_REC_UNREAD 0x01
65 #define IPC_SMS_STATUS_REC_READ 0x02
66 #define IPC_SMS_STATUS_STO_UNSENT 0x03
67 #define IPC_SMS_STATUS_STO_SENT 0x04
73 struct ipc_sms_send_msg_request_header {
74 unsigned char type; // IPC_SMS_TYPE
75 unsigned char msg_type; // IPC_SMS_MSG_TYPE
76 unsigned char unknown;
78 } __attribute__((__packed__));
80 struct ipc_sms_send_msg_response_data {
81 unsigned char type; // IPC_SMS_TYPE
82 unsigned short ack; // IPC_SMS_ACK
84 unsigned char unknown;
85 } __attribute__((__packed__));
87 struct ipc_sms_incoming_msg_header {
88 unsigned char msg_type; // IPC_SMS_MSG_TYPE
89 unsigned char type; // IPC_SMS_TYPE
90 unsigned short sim_index;
93 } __attribute__((__packed__));
95 struct ipc_sms_deliver_report_request_data {
96 unsigned char type; // IPC_SMS_TYPE
97 unsigned short ack; // IPC_SMS_ACK
99 unsigned char unknown;
100 } __attribute__((__packed__));
102 struct ipc_sms_deliver_report_response_data {
103 unsigned short ack; // IPC_SMS_ACK
104 } __attribute__((__packed__));
106 struct ipc_sms_del_msg_request_data {
108 unsigned short index;
109 } __attribute__((__packed__));
111 struct ipc_sms_del_msg_response_data {
113 unsigned short error;
114 unsigned short index;
115 } __attribute__((__packed__));
117 struct ipc_sms_save_msg_request_data {
119 unsigned short index;
120 unsigned char status; // IPC_SMS_STATUS
121 unsigned char length;
122 } __attribute__((__packed__));
124 struct ipc_sms_save_msg_response_data {
126 unsigned short error;
127 unsigned short index;
128 } __attribute__((__packed__));
134 unsigned char *ipc_sms_send_msg_pack(struct ipc_sms_send_msg_request_header *msg, char *smsc,
135 unsigned char *pdu, int pdu_length);
139 // vim:ts=4:sw=4:expandtab