diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/device/crespo/sms.h | 35 | ||||
-rw-r--r-- | include/radio.h | 4 | ||||
-rw-r--r-- | include/sec.h | 63 | ||||
-rw-r--r-- | include/sms.h | 50 |
4 files changed, 116 insertions, 36 deletions
diff --git a/include/device/crespo/sms.h b/include/device/crespo/sms.h new file mode 100644 index 0000000..bafd517 --- /dev/null +++ b/include/device/crespo/sms.h @@ -0,0 +1,35 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2011 Paul Kocialkowski <contact@paulk.fr> + * + * libsamsung-ipc 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 3 of the License, or + * (at your option) any later version. + * + * libsamsung-ipc 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 libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef __DEVICE_CRESPO_SMS_H__ +#define __DEVICE_CRESPO_SMS_H__ + +#define IPC_SMS_ACK_NO_ERROR 0x0000 +#define IPC_SMS_ACK_PDA_FULL_ERROR 0x8080 +#define IPC_SMS_ACK_UNSPEC_ERROR 0x806F + +struct ipc_sms_deliv_report_msg { + unsigned char type; + unsigned short error; + unsigned char msg_tpid; + unsigned char unk; +} __attribute__((__packed__)); + +#endif diff --git a/include/radio.h b/include/radio.h index 6615491..1614b98 100644 --- a/include/radio.h +++ b/include/radio.h @@ -81,8 +81,8 @@ int ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response /* Convenience functions for ipc_send */ void ipc_client_send(struct ipc_client *client, const unsigned short command, const char type, unsigned char *data, const int length, unsigned char mseq); -void ipc_client_send_get(struct ipc_client *client, const unsigned short command, unsigned char aseq); -void ipc_client_send_exec(struct ipc_client *client, const unsigned short command, unsigned char aseq); +void ipc_client_send_get(struct ipc_client *client, const unsigned short command, unsigned char mseq); +void ipc_client_send_exec(struct ipc_client *client, const unsigned short command, unsigned char mseq); /* Utility functions */ const char *ipc_command_type_to_str(int command); diff --git a/include/sec.h b/include/sec.h index 2a77c03..9b5f82b 100644 --- a/include/sec.h +++ b/include/sec.h @@ -2,6 +2,7 @@ * This file is part of libsamsung-ipc. * * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com> + * Copyright (C) 2011 Paul Kocialkowski <contact@paulk.fr> * * libsamsung-ipc is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,37 +26,37 @@ struct ipc_message_info; #define IPC_SEC_PIN_STATUS 0x0501 #define IPC_SEC_PHONE_LOCK 0x0502 -#define IPC_SEC_CHANGE_LOCKING_PW 0x0503 +#define IPC_SEC_CHANGE_LOCKING_PW 0x0503 #define IPC_SEC_SIM_LANG 0x0504 #define IPC_SEC_RSIM_ACCESS 0x0505 #define IPC_SEC_GSIM_ACCESS 0x0506 -#define IPC_SEC_SIM_ICC_TYPE 0x0507 +#define IPC_SEC_SIM_ICC_TYPE 0x0507 #define IPC_SEC_LOCK_INFO 0x0508 #define IPC_SEC_ISIM_AUTH 0x0509 #define IPC_SEC_PIN_SIM_INITIALIZING 0x00 #define IPC_SEC_PIN_SIM_SIM_LOCK_REQUIRED 0x01 #define IPC_SEC_PIN_SIM_INSIDE_PF_ERROR 0x02 -#define IPC_SEC_PIN_SIM_LOCK_SC 0x03 -#define IPC_SEC_PIN_SIM_LOCK_FD 0x04 -#define IPC_SEC_PIN_SIM_LOCK_PN 0x05 -#define IPC_SEC_PIN_SIM_LOCK_PU 0x06 -#define IPC_SEC_PIN_SIM_LOCK_PP 0x07 -#define IPC_SEC_PIN_SIM_LOCK_PC 0x08 +#define IPC_SEC_PIN_SIM_LOCK_SC 0x03 +#define IPC_SEC_PIN_SIM_LOCK_FD 0x04 +#define IPC_SEC_PIN_SIM_LOCK_PN 0x05 +#define IPC_SEC_PIN_SIM_LOCK_PU 0x06 +#define IPC_SEC_PIN_SIM_LOCK_PP 0x07 +#define IPC_SEC_PIN_SIM_LOCK_PC 0x08 #define IPC_SEC_PIN_SIM_CARD_NOT_PRESENT 0x80 -#define IPC_SEC_PIN_SIM_CARD_ERROR 0x81 +#define IPC_SEC_PIN_SIM_CARD_ERROR 0x81 #define IPC_SEC_PIN_SIM_INIT_COMPLETE 0x82 #define IPC_SEC_PIN_SIM_PB_INIT_COMPLETE 0x83 /* Key types for the SIM card (SC) facility */ #define IPC_SEC_PIN_SIM_LOCK_SC_PIN1_REQ 0x01 #define IPC_SEC_PIN_SIM_LOCK_SC_PUK_REQ 0x02 -#define IPC_SEC_PIN_SIM_LOCK_SC_CARD_BLOCKED 0x05 +#define IPC_SEC_PIN_SIM_LOCK_SC_CARD_BLOCKED 0x05 #define IPC_SEC_PIN_TYPE_PIN1 0x03 #define IPC_SEC_PIN_TYPE_PIN2 0x09 -#define IPC_SEC_SIM_CARD_TYPE_UNKNOWN 0x00 +#define IPC_SEC_SIM_CARD_TYPE_UNKNOWN 0x00 #define IPC_SEC_SIM_CARD_TYPE_SIM 0x01 #define IPC_SEC_SIM_CARD_TYPE_USIM 0x02 @@ -64,6 +65,12 @@ struct ipc_message_info; #define IPC_SEC_RSIM_COMMAND_UPDATE_BINARY 0xd6 #define IPC_SEC_RSIM_COMMAND_STATUS 0xf2 +#define IPC_SEC_RSIM_ACCESS_UNKNOWN 0x00 +#define IPC_SEC_RSIM_ACCESS_COMP_NORMAL 0x01 +#define IPC_SEC_RSIM_ACCESS_COMP_WARNING 0x02 +#define IPC_SEC_RSIM_ACCESS_ABORT_EXEC 0x03 +#define IPC_SEC_RSIM_ACCESS_ABORT_CHECK 0x04 + struct ipc_sec_pin_status_noti { unsigned char type; unsigned char key; @@ -109,7 +116,41 @@ struct ipc_sec_lock_info_response { unsigned char attempts; } __attribute__((__packed__)); +/* + * struct ipc_sec_sim_filesystem_entry + * Source: cornucopia fsogsmd/src/lib/consts.vala + * Git HEAD: f2e0268075ffb15ef237371cd2e1896561567665 + * + * Copyright (C) 2009-2011 Michael 'Mickey' Lauer <mlauer@vanille-media.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 + * + */ + +struct ipc_sec_sim_filesystem_entry +{ + uint16_t id; + uint16_t parent; + char *name; +}; + +int ipc_sec_rsim_access_response_get_status(struct ipc_message_info *response); char* ipc_sec_rsim_access_response_get_file_data(struct ipc_message_info *response); +void ipc_sec_rsim_access_request_setup(struct ipc_sec_rsim_access_request *request, + unsigned char command, char *entry_name, + unsigned char p1, unsigned char p2, unsigned char p3); void ipc_sec_pin_status_set_setup(struct ipc_sec_pin_status_set *message, unsigned char pin_type, char *pin1, char *pin2); diff --git a/include/sms.h b/include/sms.h index a9d185b..877c2a4 100644 --- a/include/sms.h +++ b/include/sms.h @@ -21,29 +21,33 @@ #ifndef __SMS_H__ #define __SMS_H__ -#define IPC_SMS_SEND_MSG 0x0401 -#define IPC_SMS_INCOMING_MSG 0x0402 -#define IPC_SMS_READ_MSG 0x0403 -#define IPC_SMS_SAVE_MSG 0x0404 -#define IPC_SMS_DEL_MSG 0x0405 -#define IPC_SMS_DELIVER_REPORT 0x0406 -#define IPC_SMS_DEVICE_READY 0x0407 -#define IPC_SMS_SEL_MEM 0x0408 -#define IPC_SMS_STORED_MSG_COUNT 0x0409 -#define IPC_SMS_SVC_CENTER_ADDR 0x040A -#define IPC_SMS_SVC_OPTION 0x040B -#define IPC_SMS_MEM_STATUS 0x040C -#define IPC_SMS_CBS_MSG 0x040D -#define IPC_SMS_CBS_CONFIG 0x040E -#define IPC_SMS_STORED_MSG_STATUS 0x040F -#define IPC_SMS_PARAM_COUNT 0x0410 -#define IPC_SMS_PARAM 0x0411 - -#define IPC_SMS_MSG_MULTIPLE 1 -#define IPC_SMS_MSG_SINGLE 2 - -#define IPC_SMS_TYPE_POINT_TO_POINT 1 -#define IPC_SMS_TYPE_STATUS_REPORT 2 +#if defined(DEVICE_CRESPO) +#include "device/crespo/sms.h" +#endif + +#define IPC_SMS_SEND_MSG 0x0401 +#define IPC_SMS_INCOMING_MSG 0x0402 +#define IPC_SMS_READ_MSG 0x0403 +#define IPC_SMS_SAVE_MSG 0x0404 +#define IPC_SMS_DEL_MSG 0x0405 +#define IPC_SMS_DELIVER_REPORT 0x0406 +#define IPC_SMS_DEVICE_READY 0x0407 +#define IPC_SMS_SEL_MEM 0x0408 +#define IPC_SMS_STORED_MSG_COUNT 0x0409 +#define IPC_SMS_SVC_CENTER_ADDR 0x040A +#define IPC_SMS_SVC_OPTION 0x040B +#define IPC_SMS_MEM_STATUS 0x040C +#define IPC_SMS_CBS_MSG 0x040D +#define IPC_SMS_CBS_CONFIG 0x040E +#define IPC_SMS_STORED_MSG_STATUS 0x040F +#define IPC_SMS_PARAM_COUNT 0x0410 +#define IPC_SMS_PARAM 0x0411 + +#define IPC_SMS_MSG_MULTIPLE 1 +#define IPC_SMS_MSG_SINGLE 2 + +#define IPC_SMS_TYPE_POINT_TO_POINT 1 +#define IPC_SMS_TYPE_STATUS_REPORT 2 struct ipc_sms_send_msg { unsigned char hint, length; |