aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-02-09 13:51:38 +0100
committerPaul Kocialkowski <contact@paulk.fr>2014-02-09 13:51:38 +0100
commit828f125ee5957ee3f64d45329f5ac261a2a3c1a7 (patch)
tree7cb2c2433a4fae20f660dd60819350034ea1ebeb /include
parent6cb0b59e3f0a7b8f2c9690b7e8d171d88d000270 (diff)
downloadexternal_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.zip
external_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.tar.gz
external_libsamsung-ipc-828f125ee5957ee3f64d45329f5ac261a2a3c1a7.tar.bz2
Consistent coding style in helpers
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'include')
-rw-r--r--include/call.h32
-rw-r--r--include/gen.h10
-rw-r--r--include/gprs.h15
-rw-r--r--include/misc.h6
-rw-r--r--include/net.h6
-rw-r--r--include/sec.h21
-rw-r--r--include/sms.h6
7 files changed, 61 insertions, 35 deletions
diff --git a/include/call.h b/include/call.h
index a98f847..92cb563 100644
--- a/include/call.h
+++ b/include/call.h
@@ -104,6 +104,10 @@ struct ipc_call_status_data {
unsigned char end_cause; // IPC_CALL_END_CAUSE
} __attribute__((__packed__));
+struct ipc_call_list_header {
+ unsigned char count;
+} __attribute__((__packed__));
+
struct ipc_call_list_entry {
unsigned char unknown1;
unsigned char type; // IPC_CALL_TYPE
@@ -115,6 +119,15 @@ struct ipc_call_list_entry {
unsigned char unknown3;
} __attribute__((__packed__));
+struct ipc_call_burst_dtmf_header {
+ unsigned char count;
+} __attribute__((__packed__));
+
+struct ipc_call_burst_dtmf_entry {
+ unsigned char state;
+ unsigned char tone;
+} __attribute__((__packed__));
+
struct ipc_call_cont_dtmf_data {
unsigned char state;
unsigned char tone;
@@ -124,15 +137,16 @@ struct ipc_call_cont_dtmf_data {
* Helpers
*/
-void ipc_call_outgoing_setup(struct ipc_call_outgoing_data *message, unsigned char type,
- unsigned char identity, unsigned char prefix, char *number);
-unsigned int ipc_call_list_response_get_num_entries(struct ipc_message_info *response);
-struct ipc_call_list_entry* ipc_call_list_response_get_entry(struct ipc_message_info *response,
- unsigned int num);
-char *ipc_call_list_response_get_entry_number(struct ipc_message_info *response,
- unsigned int num);
-unsigned char *ipc_call_cont_dtmf_burst_pack(struct ipc_call_cont_dtmf_data *message,
- unsigned char *burst, int burst_len);
+int ipc_call_outgoing_setup(struct ipc_call_outgoing_data *data,
+ unsigned char type, unsigned char identity, unsigned char prefix,
+ const char *number);
+unsigned char ipc_call_list_get_count(const void *data, size_t size);
+struct ipc_call_list_entry *ipc_call_list_get_entry(const void *data,
+ size_t size, unsigned int index);
+char *ipc_call_list_get_entry_number(const void *data,
+ size_t size, unsigned int index);
+void *ipc_call_burst_dtmf_setup(const struct ipc_call_burst_dtmf_entry *entries,
+ unsigned char count);
#endif
diff --git a/include/gen.h b/include/gen.h
index 49e6f4a..8013df6 100644
--- a/include/gen.h
+++ b/include/gen.h
@@ -2,7 +2,7 @@
* This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
- * Copyright (C) 2011-2013 Paul Kocialkowski <contact@paulk.fr>
+ * Copyright (C) 2011-2014 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
@@ -30,6 +30,12 @@
#define IPC_GEN_PHONE_RES 0x8001
/*
+ * Values
+ */
+
+#define IPC_GEN_PHONE_RES_CODE_SUCCESS 0x8000
+
+/*
* Structures
*/
@@ -44,7 +50,7 @@ struct ipc_gen_phone_res_data {
* Helpers
*/
-int ipc_gen_phone_res_check(struct ipc_gen_phone_res_data *res);
+int ipc_gen_phone_res_check(const struct ipc_gen_phone_res_data *data);
#endif
diff --git a/include/gprs.h b/include/gprs.h
index 0b5dcc9..568892d 100644
--- a/include/gprs.h
+++ b/include/gprs.h
@@ -78,11 +78,11 @@ struct ipc_gprs_define_pdp_context_data {
struct ipc_gprs_pdp_context_request_set_data {
unsigned char enable;
unsigned char cid;
- unsigned char magic[4];
+ unsigned char magic1[4];
unsigned char username[32];
unsigned char password[32];
unsigned char unknown1[32];
- unsigned char unknown2;
+ unsigned char magic2;
} __attribute__((__packed__));
struct ipc_gprs_pdp_context_request_get_entry {
@@ -131,11 +131,12 @@ struct ipc_gprs_port_list_data {
* Helpers
*/
-void ipc_gprs_port_list_setup(struct ipc_gprs_port_list_data *message);
-void ipc_gprs_pdp_context_request_set_setup(struct ipc_gprs_pdp_context_request_set_data *message,
- unsigned char cid, int enable, char *username, char *password);
-void ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context_data *message,
- unsigned char cid, int enable, char *apn);
+int ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context_data *data,
+ unsigned char enable, unsigned char cid, const char *apn);
+int ipc_gprs_pdp_context_request_set_setup(struct ipc_gprs_pdp_context_request_set_data *data,
+ unsigned char enable, unsigned char cid, const char *username,
+ const char *password);
+int ipc_gprs_port_list_setup(struct ipc_gprs_port_list_data *data);
#endif
diff --git a/include/misc.h b/include/misc.h
index 78e993b..f40b1f0 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -55,6 +55,10 @@ struct ipc_misc_me_version_data {
char misc[32];
} __attribute__((__packed__));
+struct ipc_misc_me_imsi_header {
+ unsigned char length;
+} __attribute__((__packed__));
+
struct ipc_misc_me_sn_data {
unsigned char type; // IPC_MISC_ME_SN_SERIAL_NUM
unsigned char length;
@@ -73,7 +77,7 @@ struct ipc_misc_time_info_data {
* Helpers
*/
-char *ipc_misc_me_imsi_response_get_imsi(struct ipc_message_info *response);
+char *ipc_misc_me_imsi_get_imsi(const void *data, size_t size);
#endif
diff --git a/include/net.h b/include/net.h
index 310a12d..7e7809e 100644
--- a/include/net.h
+++ b/include/net.h
@@ -129,10 +129,10 @@ struct ipc_net_mode_sel_data {
* Helpers
*/
-void ipc_net_regist_setup(struct ipc_net_regist_request_data *message,
+int ipc_net_plmn_sel_setup(struct ipc_net_plmn_sel_request_data *data,
+ unsigned char mode_sel, const char *plmn, unsigned char act);
+int ipc_net_regist_setup(struct ipc_net_regist_request_data *data,
unsigned char domain);
-void ipc_net_plmn_sel_set_setup(struct ipc_net_plmn_sel_request_data *message,
- unsigned char mode, char *plmn, unsigned char act);
#endif
diff --git a/include/sec.h b/include/sec.h
index 052737a..48968e9 100644
--- a/include/sec.h
+++ b/include/sec.h
@@ -2,7 +2,7 @@
* This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
- * Copyright (C) 2011-2013 Paul Kocialkowski <contact@paulk.fr>
+ * Copyright (C) 2011-2014 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
@@ -166,15 +166,16 @@ struct ipc_sec_lock_infomation_response_data {
* Helpers
*/
-void ipc_sec_pin_status_setup(struct ipc_sec_pin_status_request_data *message,
- unsigned char pin_type, char *pin1, char *pin2);
-void ipc_sec_lock_infomation_setup(struct ipc_sec_lock_infomation_request_data *message,
- unsigned char pin_type);
-void ipc_sec_phone_lock_request_set_setup(struct ipc_sec_phone_lock_request_set_data *message,
- int pin_type, int enable, char *passwd);
-char *ipc_sec_rsim_access_response_get_file_data(struct ipc_message_info *response);
-void ipc_sec_change_locking_pw_setup(struct ipc_sec_change_locking_pw_data *message,
- int type, char *passwd_old, char *passwd_new);
+int ipc_sec_pin_status_setup(struct ipc_sec_pin_status_request_data *data,
+ unsigned char type, const char *pin1, const char *pin2);
+int ipc_sec_phone_lock_request_set_setup(struct ipc_sec_phone_lock_request_set_data *data,
+ unsigned char facility_type, unsigned char active, const char *password);
+int ipc_sec_change_locking_pw_setup(struct ipc_sec_change_locking_pw_data *data,
+ unsigned char facility_type, const char *password_old,
+ const char *password_new);
+void *ipc_sec_rsim_access_get_file_data(const void *data, size_t size);
+int ipc_sec_lock_infomation_setup(struct ipc_sec_lock_infomation_request_data *data,
+ unsigned char type);
#endif
diff --git a/include/sms.h b/include/sms.h
index cb49df2..2d05571 100644
--- a/include/sms.h
+++ b/include/sms.h
@@ -2,7 +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>
+ * Copyright (C) 2011-2014 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
@@ -131,8 +131,8 @@ struct ipc_sms_save_msg_response_data {
* Helpers
*/
-unsigned char *ipc_sms_send_msg_pack(struct ipc_sms_send_msg_request_header *msg, char *smsc,
- unsigned char *pdu, int pdu_length);
+void *ipc_sms_send_msg_setup(struct ipc_sms_send_msg_request_header *header,
+ const char *smsc, const char *pdu);
#endif