aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2011-11-21 19:05:40 +0100
committerPaulK <contact@paulk.fr>2011-11-21 19:08:50 +0100
commit2bbccf3d9ee564f0ec0cef8f937c0a1d30775ad2 (patch)
treee6bb5e2c8fcbf13ee3ab89d6acbb3fd9b21e52a2
parent013c60baf12e8e8165be59819c022a1675708aa4 (diff)
downloadexternal_libsamsung-ipc-2bbccf3d9ee564f0ec0cef8f937c0a1d30775ad2.zip
external_libsamsung-ipc-2bbccf3d9ee564f0ec0cef8f937c0a1d30775ad2.tar.gz
external_libsamsung-ipc-2bbccf3d9ee564f0ec0cef8f937c0a1d30775ad2.tar.bz2
Corrected/splitted NET/SMS/PWR headers for crespo and added french PLMN data
-rw-r--r--include/device/crespo/sms.h30
-rw-r--r--include/device/h1/sms.h40
-rw-r--r--include/net.h1
-rw-r--r--include/pwr.h2
-rw-r--r--include/sms.h19
-rw-r--r--samsung-ipc/util.c24
6 files changed, 100 insertions, 16 deletions
diff --git a/include/device/crespo/sms.h b/include/device/crespo/sms.h
index bafd517..9b80ab6 100644
--- a/include/device/crespo/sms.h
+++ b/include/device/crespo/sms.h
@@ -21,9 +21,31 @@
#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
+#define IPC_SMS_ACK_NO_ERROR 0x0000
+#define IPC_SMS_ACK_PDA_FULL_ERROR 0x8080
+#define IPC_SMS_ACK_MALFORMED_REQ_ERROR 0x8061
+#define IPC_SMS_ACK_UNSPEC_ERROR 0x806F
+
+struct ipc_sms_incoming_msg {
+ unsigned char msg_type;
+ unsigned char type;
+ unsigned short sim_index;
+ unsigned char msg_tpid;
+ unsigned char length;
+} __attribute__((__packed__));
+
+/*
+ * This is followed by:
+ * smsc_string (variable length, 1st byte is length)
+ * pdu (variable length)
+ */
+struct ipc_sms_send_msg {
+ unsigned char type;
+ unsigned char msg_type;
+ unsigned char unk;
+ unsigned char length;
+ unsigned char smsc_len;
+} __attribute__((__packed__));
struct ipc_sms_deliv_report_msg {
unsigned char type;
@@ -33,3 +55,5 @@ struct ipc_sms_deliv_report_msg {
} __attribute__((__packed__));
#endif
+
+// vim:ts=4:sw=4:expandtab
diff --git a/include/device/h1/sms.h b/include/device/h1/sms.h
new file mode 100644
index 0000000..a57c8c0
--- /dev/null
+++ b/include/device/h1/sms.h
@@ -0,0 +1,40 @@
+/**
+ * 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_H1_SMS_H__
+#define __DEVICE_H1_SMS_H__
+
+#define IPC_SMS_ACK_NO_ERROR 0x0000
+#define IPC_SMS_ACK_PDA_FULL_ERROR 0x8080
+#define IPC_SMS_ACK_MALFORMED_REQ_ERROR 0x8061
+#define IPC_SMS_ACK_UNSPEC_ERROR 0x806F
+
+struct ipc_sms_incoming_msg {
+ unsigned char type, unk, length;
+} __attribute__((__packed__));
+
+struct ipc_sms_send_msg {
+ unsigned char hint, length;
+} __attribute__((__packed__));
+
+
+#endif
+
+// vim:ts=4:sw=4:expandtab
diff --git a/include/net.h b/include/net.h
index 4a306dc..5c8d36d 100644
--- a/include/net.h
+++ b/include/net.h
@@ -82,7 +82,6 @@ struct ipc_net_plmn_entry {
struct ipc_net_plmn_entries {
unsigned char num;
- struct ipc_net_plmn_entry *data;
};
void ipc_net_regist_get(struct ipc_net_regist_get *message, int domain);
diff --git a/include/pwr.h b/include/pwr.h
index 92be615..48b219a 100644
--- a/include/pwr.h
+++ b/include/pwr.h
@@ -22,6 +22,8 @@
#ifndef __PWR_H__
#define __PWR_H__
+#define IPC_PWR_R(f) (f & 0xff)
+
#define IPC_PWR_PHONE_PWR_UP 0x0101
#define IPC_PWR_PHONE_PWR_OFF 0x0102
#define IPC_PWR_PHONE_RESET 0x0103
diff --git a/include/sms.h b/include/sms.h
index 877c2a4..45109d1 100644
--- a/include/sms.h
+++ b/include/sms.h
@@ -23,6 +23,8 @@
#if defined(DEVICE_CRESPO)
#include "device/crespo/sms.h"
+#elif defined(DEVICE_H1)
+#include "device/h1/sms.h"
#endif
#define IPC_SMS_SEND_MSG 0x0401
@@ -43,19 +45,12 @@
#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_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;
-} __attribute__((__packed__));
-
-struct ipc_sms_incoming_msg {
- unsigned char type, unk, length;
-} __attribute__((__packed__));
+#define IPC_SMS_TYPE_POINT_TO_POINT 1
+#define IPC_SMS_TYPE_STATUS_REPORT 2
+#define IPC_SMS_TYPE_OUTGOING 2
void ipc_sms_send_msg(unsigned char *data, unsigned char length, int request_id);
void ipc_sms_deliver_report(int request_id);
diff --git a/samsung-ipc/util.c b/samsung-ipc/util.c
index 1cb3d27..14aab5d 100644
--- a/samsung-ipc/util.c
+++ b/samsung-ipc/util.c
@@ -46,6 +46,30 @@ const char *plmn_lookup(const char *plmn)
case 12: return "Telfort";
case 16: case 20: return "T-Mobile";
}
+ break;
+ case 208:
+ switch(mnc) {
+ case 0: return "Orange";
+ case 1: return "Orange";
+ case 2: return "Orange";
+ case 5: case 6: case 7: return "Globalstar Europe";
+ case 9: return "SFR";
+ case 10: return "SFR";
+ case 11: return "SFR";
+ case 13: return "SFR";
+ case 14: return "Free Mobile";
+ case 15: return "Free Mobile";
+ case 20: return "Bouygues";
+ case 21: return "Bouygues";
+ case 22: return "Transatel Mobile";
+ case 23: return "Virgin Mobile";
+ case 25: return "Lycamobile";
+ case 26: return "NRJ Mobile";
+ case 27: return "Afone Mobile";
+ case 88: return "Bouygues";
+ case 90: return "Association Images & Réseaux";
+ }
+ break;
}
return NULL;