aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerie de Gram <j.de.gram@gmail.com>2011-08-17 15:57:47 +0200
committerJoerie de Gram <j.de.gram@gmail.com>2011-08-17 15:57:47 +0200
commitd3bd80a932e4f76b6cae280c78f118882f3b176d (patch)
treecad99877da53cad9fae5907fd43fe5a79e50ad37
parenta3c46bd32430db57b97a1498d3da9a2c01df22ad (diff)
downloadexternal_libsamsung-ipc-d3bd80a932e4f76b6cae280c78f118882f3b176d.zip
external_libsamsung-ipc-d3bd80a932e4f76b6cae280c78f118882f3b176d.tar.gz
external_libsamsung-ipc-d3bd80a932e4f76b6cae280c78f118882f3b176d.tar.bz2
Rename library to libsamsung-ipc
-rw-r--r--Android.mk6
-rw-r--r--Makefile4
-rw-r--r--call.c30
-rw-r--r--hexdump.c8
-rw-r--r--hexdump.h8
-rw-r--r--include/call.h74
-rw-r--r--include/disp.h14
-rw-r--r--include/misc.h26
-rw-r--r--include/net.h86
-rw-r--r--include/radio.h186
-rw-r--r--include/sec.h82
-rw-r--r--include/sms.h64
-rw-r--r--include/util.h8
-rw-r--r--misc.c32
-rw-r--r--net.c46
-rw-r--r--radio.c312
-rw-r--r--radio_internal.h26
-rw-r--r--sim.c14
-rw-r--r--sms.c16
-rw-r--r--test.c22
-rw-r--r--util.c8
21 files changed, 536 insertions, 536 deletions
diff --git a/Android.mk b/Android.mk
index fd5996d..4235cd5 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-libmsm-h1_files := \
+libsamsung-ipc_files := \
radio.c \
util.c \
hexdump.c \
@@ -11,11 +11,11 @@ libmsm-h1_files := \
net.c \
misc.c
-LOCAL_MODULE := libmsm-h1
+LOCAL_MODULE := libsamsung-ipc
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
-LOCAL_SRC_FILES := $(libmsm-h1_files)
+LOCAL_SRC_FILES := $(libsamsung-ipc_files)
include $(BUILD_STATIC_LIBRARY)
diff --git a/Makefile b/Makefile
index 2e972e9..0d2234c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,8 @@ CROSS_COMPILE ?= arm-none-linux-gnueabi-
all: lib test
lib:
- $(CROSS_COMPILE)gcc -Iinclude -shared radio.c hexdump.c -o libmsm-h1.so
+ $(CROSS_COMPILE)gcc -Iinclude -shared radio.c hexdump.c -o libsamsung-ipc.so
test:
- $(CROSS_COMPILE)gcc -shared -Iinclude test.c -L. -lmsm-h1 -lpthread -o msm-test
+ $(CROSS_COMPILE)gcc -shared -Iinclude test.c -L. -lsamsung-ipc -lpthread -o ipc-test
diff --git a/call.c b/call.c
index 8d86f61..4a7ac49 100644
--- a/call.c
+++ b/call.c
@@ -1,29 +1,29 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <call.h>
#include "radio_internal.h"
-void msm_call_outgoing(const char *number, int identity, int request_id)
+void ipc_call_outgoing(const char *number, int identity, int request_id)
{
- struct msm_call_outgoing call;
+ struct ipc_call_outgoing call;
memset(&call, 0x00, sizeof(call));
@@ -32,28 +32,28 @@ void msm_call_outgoing(const char *number, int identity, int request_id)
return;
}
- call.type = MSM_CALL_TYPE_VOICE;
+ call.type = IPC_CALL_TYPE_VOICE;
call.identity = identity;
- call.prefix = MSM_CALL_PREFIX_NONE;
+ call.prefix = IPC_CALL_PREFIX_NONE;
call.length = strlen(number);
memcpy(call.number, number, strlen(number));
- msm_send(MSM_CALL_OUTGOING, MSM_TYPE_EXEC, (unsigned char*)&call, sizeof(call), request_id);
+ ipc_send(IPC_CALL_OUTGOING, IPC_TYPE_EXEC, (unsigned char*)&call, sizeof(call), request_id);
}
-void msm_call_release(int request_id)
+void ipc_call_release(int request_id)
{
- msm_send_exec(MSM_CALL_RELEASE, request_id);
+ ipc_send_exec(IPC_CALL_RELEASE, request_id);
}
-void msm_call_answer(int request_id)
+void ipc_call_answer(int request_id)
{
- msm_send_exec(MSM_CALL_ANSWER, request_id);
+ ipc_send_exec(IPC_CALL_ANSWER, request_id);
}
-void msm_call_list(int request_id)
+void ipc_call_list(int request_id)
{
- msm_send_get(MSM_CALL_LIST, request_id);
+ ipc_send_get(IPC_CALL_LIST, request_id);
}
diff --git a/hexdump.c b/hexdump.c
index 3943f9d..93250b8 100644
--- a/hexdump.c
+++ b/hexdump.c
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/hexdump.h b/hexdump.h
index 870be43..152bf7f 100644
--- a/hexdump.h
+++ b/hexdump.h
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/include/call.h b/include/call.h
index 3f04068..996f563 100644
--- a/include/call.h
+++ b/include/call.h
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -22,64 +22,64 @@
#define __CALL_H__
/* Message types */
-#define MSM_CALL_OUTGOING 0x0201
-#define MSM_CALL_INCOMING 0x0202
-#define MSM_CALL_RELEASE 0x0203
-#define MSM_CALL_ANSWER 0x0204
-#define MSM_CALL_STATUS 0x0205
-#define MSM_CALL_LIST 0x0206
-#define MSM_CALL_BURST_DTMF 0x0207
-#define MSM_CALL_CONT_DTMF 0x0208
-#define MSM_CALL_WAITING 0x0209
-#define MSM_CALL_LINE_ID 0x020A
+#define IPC_CALL_OUTGOING 0x0201
+#define IPC_CALL_INCOMING 0x0202
+#define IPC_CALL_RELEASE 0x0203
+#define IPC_CALL_ANSWER 0x0204
+#define IPC_CALL_STATUS 0x0205
+#define IPC_CALL_LIST 0x0206
+#define IPC_CALL_BURST_DTMF 0x0207
+#define IPC_CALL_CONT_DTMF 0x0208
+#define IPC_CALL_WAITING 0x0209
+#define IPC_CALL_LINE_ID 0x020A
/* Enum values */
-#define MSM_CALL_TYPE_VOICE 0x01
-#define MSM_CALL_TYPE_DATA 0x03
+#define IPC_CALL_TYPE_VOICE 0x01
+#define IPC_CALL_TYPE_DATA 0x03
-#define MSM_CALL_IDENTITY_DEFAULT 0x00
-#define MSM_CALL_IDENTITY_HIDE 0x01
-#define MSM_CALL_IDENTITY_SHOW 0x02
+#define IPC_CALL_IDENTITY_DEFAULT 0x00
+#define IPC_CALL_IDENTITY_HIDE 0x01
+#define IPC_CALL_IDENTITY_SHOW 0x02
-#define MSM_CALL_PREFIX_NONE 0x00
-#define MSM_CALL_PREFIX_INTL 0x11
+#define IPC_CALL_PREFIX_NONE 0x00
+#define IPC_CALL_PREFIX_INTL 0x11
-/* Only for msm_call_status, NOT call_list */
-#define MSM_CALL_STATE_DIALING 0x01
-#define MSM_CALL_STATE_IGNORING_INCOMING_STATUS 0x02
-#define MSM_CALL_STATE_CONNECTED 0x03
-#define MSM_CALL_STATE_RELEASED 0x04
-#define MSM_CALL_STATE_CONNECTING 0x05
+/* Only for ipc_call_status, NOT call_list */
+#define IPC_CALL_STATE_DIALING 0x01
+#define IPC_CALL_STATE_IGNORING_INCOMING_STATUS 0x02
+#define IPC_CALL_STATE_CONNECTED 0x03
+#define IPC_CALL_STATE_RELEASED 0x04
+#define IPC_CALL_STATE_CONNECTING 0x05
-#define MSM_CALL_TERM_MO 0x01
-#define MSM_CALL_TERM_MT 0x02
+#define IPC_CALL_TERM_MO 0x01
+#define IPC_CALL_TERM_MT 0x02
-struct msm_call_outgoing {
+struct ipc_call_outgoing {
unsigned char type, identity;
unsigned char length, prefix;
unsigned char number[86];
} __attribute__((__packed__));
-struct msm_call_incoming {
+struct ipc_call_incoming {
unsigned char type, id, line;
} __attribute__((__packed__));
-struct msm_call_list_entry {
+struct ipc_call_list_entry {
unsigned char type, idx;
unsigned char term, state, mpty;
unsigned char number_len;
unsigned char unk4;
} __attribute__((__packed__));
-struct msm_call_status {
+struct ipc_call_status {
unsigned char type, id, state;
unsigned char reason, end_cause;
} __attribute__((__packed__));
-void msm_call_outgoing(const char *number, int identity, int request_id);
-void msm_call_release(int request_id);
-void msm_call_answer(int request_id);
-void msm_call_list(int request_id);
+void ipc_call_outgoing(const char *number, int identity, int request_id);
+void ipc_call_release(int request_id);
+void ipc_call_answer(int request_id);
+void ipc_call_list(int request_id);
#endif
diff --git a/include/disp.h b/include/disp.h
index 8b14d5c..aa6c6cf 100644
--- a/include/disp.h
+++ b/include/disp.h
@@ -1,30 +1,30 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __DISP_H__
#define __DISP_H__
-#define MSM_DISP_ICON_INFO 0x0701
-#define MSM_DISP_HOMEZONE_INFO 0x0702
+#define IPC_DISP_ICON_INFO 0x0701
+#define IPC_DISP_HOMEZONE_INFO 0x0702
-struct msm_disp_icon_info {
+struct ipc_disp_icon_info {
unsigned char unk, rssi, battery, act, reg;
} __attribute__((__packed__));
diff --git a/include/misc.h b/include/misc.h
index 12c8fc3..3aff7e4 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -1,39 +1,39 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __MISC_H__
#define __MISC_H__
-#define MSM_MISC_ME_VERSION 0x0A01
-#define MSM_MISC_ME_IMSI 0x0A02
-#define MSM_MISC_ME_SN 0x0A03
-#define MSM_MISC_TIME_INFO 0x0A07
+#define IPC_MISC_ME_VERSION 0x0A01
+#define IPC_MISC_ME_IMSI 0x0A02
+#define IPC_MISC_ME_SN 0x0A03
+#define IPC_MISC_TIME_INFO 0x0A07
-struct msm_misc_me_version {
+struct ipc_misc_me_version {
char sw_version[32];
char hw_version[32];
char cal_date[32];
char misc[32];
} __attribute__((__packed__));
-struct msm_misc_time_info {
+struct ipc_misc_time_info {
unsigned char tz_valid, daylight_valid;
unsigned char year, mon, day;
unsigned char hour, min, sec;
@@ -41,9 +41,9 @@ struct msm_misc_time_info {
char plmn[6];
} __attribute__((__packed__));
-void msm_misc_me_version(int request_id);
-void msm_misc_me_imsi(int request_id);
-void msm_misc_me_sn(int request_id);
+void ipc_misc_me_version(int request_id);
+void ipc_misc_me_imsi(int request_id);
+void ipc_misc_me_sn(int request_id);
#endif
diff --git a/include/net.h b/include/net.h
index 34114a4..8e650e9 100644
--- a/include/net.h
+++ b/include/net.h
@@ -1,61 +1,61 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __NET_H__
#define __NET_H__
-#define MSM_NET_PREF_PLMN 0x0801
-#define MSM_NET_PLMN_SEL 0x0802
-#define MSM_NET_CURRENT_PLMN 0x0803
-#define MSM_NET_PLMN_LIST 0x0804
-#define MSM_NET_REGIST 0x0805
-#define MSM_NET_SUBSCRIBER_NUM 0x0806
-#define MSM_NET_BAND_SEL 0x0807
-#define MSM_NET_SERVICE_DOMAIN_CONFIG 0x0808
-#define MSM_NET_POWERON_ATTACH 0x0809
-#define MSM_NET_MODE_SEL 0x080A
-#define MSM_NET_ACQ_ORDER 0x080B
-#define MSM_NET_IDENTITY 0x080C
-#define MSM_NET_CURRENT_RRC_STATUS 0x080D
+#define IPC_NET_PREF_PLMN 0x0801
+#define IPC_NET_PLMN_SEL 0x0802
+#define IPC_NET_CURRENT_PLMN 0x0803
+#define IPC_NET_PLMN_LIST 0x0804
+#define IPC_NET_REGIST 0x0805
+#define IPC_NET_SUBSCRIBER_NUM 0x0806
+#define IPC_NET_BAND_SEL 0x0807
+#define IPC_NET_SERVICE_DOMAIN_CONFIG 0x0808
+#define IPC_NET_POWERON_ATTACH 0x0809
+#define IPC_NET_MODE_SEL 0x080A
+#define IPC_NET_ACQ_ORDER 0x080B
+#define IPC_NET_IDENTITY 0x080C
+#define IPC_NET_CURRENT_RRC_STATUS 0x080D
-#define MSM_NET_SERVICE_TYPE_GSM 0x01
-#define MSM_NET_SERVICE_TYPE_GSM2 0x02
-#define MSM_NET_SERVICE_TYPE_GPRS 0x03
-#define MSM_NET_SERVICE_TYPE_EDGE 0x04
-#define MSM_NET_SERVICE_TYPE_UMTS 0x05
+#define IPC_NET_SERVICE_TYPE_GSM 0x01
+#define IPC_NET_SERVICE_TYPE_GSM2 0x02
+#define IPC_NET_SERVICE_TYPE_GPRS 0x03
+#define IPC_NET_SERVICE_TYPE_EDGE 0x04
+#define IPC_NET_SERVICE_TYPE_UMTS 0x05
-#define MSM_NET_SERVICE_LEVEL_NONE 0x01
-#define MSM_NET_SERVICE_LEVEL_HOME 0x02
-#define MSM_NET_SERVICE_LEVEL_SEARCHING 0x03
-#define MSM_NET_SERVICE_LEVEL_EMERGENCY 0x04
-#define MSM_NET_SERVICE_LEVEL_NONE2 0x05
-#define MSM_NET_SERVICE_LEVEL_ROAMING 0x06
+#define IPC_NET_SERVICE_LEVEL_NONE 0x01
+#define IPC_NET_SERVICE_LEVEL_HOME 0x02
+#define IPC_NET_SERVICE_LEVEL_SEARCHING 0x03
+#define IPC_NET_SERVICE_LEVEL_EMERGENCY 0x04
+#define IPC_NET_SERVICE_LEVEL_NONE2 0x05
+#define IPC_NET_SERVICE_LEVEL_ROAMING 0x06
-#define MSM_NET_PLMN_STATUS_AVAILABLE 2
-#define MSM_NET_PLMN_STATUS_CURRENT 3
-#define MSM_NET_PLMN_STATUS_FORBIDDEN 4
+#define IPC_NET_PLMN_STATUS_AVAILABLE 2
+#define IPC_NET_PLMN_STATUS_CURRENT 3
+#define IPC_NET_PLMN_STATUS_FORBIDDEN 4
-#define MSM_NET_PLMN_SEL_MANUAL 0
-#define MSM_NET_PLMN_SEL_AUTO 1
+#define IPC_NET_PLMN_SEL_MANUAL 0
+#define IPC_NET_PLMN_SEL_AUTO 1
-struct msm_net_current_plmn {
+struct ipc_net_current_plmn {
char unk;
unsigned char slevel;
char plmn[6];
@@ -63,35 +63,35 @@ struct msm_net_current_plmn {
unsigned short lac;
} __attribute__((__packed__));
-struct msm_net_regist_set {
+struct ipc_net_regist_set {
unsigned char net;
unsigned char domain;
} __attribute__((__packed__));
-struct msm_net_regist {
+struct ipc_net_regist {
unsigned char act, domain, status, edge;
unsigned short lac;
unsigned int cid;
char rej_cause;
} __attribute__((__packed__));
-struct msm_net_plmn_entry {
+struct ipc_net_plmn_entry {
unsigned char status;
char plmn[6];
unsigned char type;
char unk[2];
} __attribute__((__packed__));
-struct msm_net_plmn_entries {
+struct ipc_net_plmn_entries {
unsigned char num;
- struct msm_net_plmn_entry *data;
+ struct ipc_net_plmn_entry *data;
};
-void msm_net_current_plmn(int request_id);
-void msm_net_plmn_list(int request_id);
-void msm_net_identity(int request_id);
-void msm_net_regist(int request_id, unsigned char type);
+void ipc_net_current_plmn(int request_id);
+void ipc_net_plmn_list(int request_id);
+void ipc_net_identity(int request_id);
+void ipc_net_regist(int request_id, unsigned char type);
#endif
diff --git a/include/radio.h b/include/radio.h
index 77f29bf..d426f59 100644
--- a/include/radio.h
+++ b/include/radio.h
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -29,102 +29,102 @@
#include "sms.h"
/* AP -> Baseband */
-#define MSM_TYPE_EXEC 0x01
-#define MSM_TYPE_GET 0x02
-#define MSM_TYPE_SET 0x03
-#define MSM_TYPE_CFRM 0x04
-#define MSM_TYPE_EVENT 0x05
+#define IPC_TYPE_EXEC 0x01
+#define IPC_TYPE_GET 0x02
+#define IPC_TYPE_SET 0x03
+#define IPC_TYPE_CFRM 0x04
+#define IPC_TYPE_EVENT 0x05
/* Baseband -> AP */
-#define MSM_TYPE_INDI 0x01
-#define MSM_TYPE_RESP 0x02
-#define MSM_TYPE_NOTI 0x03
+#define IPC_TYPE_INDI 0x01
+#define IPC_TYPE_RESP 0x02
+#define IPC_TYPE_NOTI 0x03
/* Message groups */
-#define MSM_GROUP_PWR 0x01
-#define MSM_GROUP_CALL 0x02
-#define MSM_GROUP_SMS 0x04
-#define MSM_GROUP_SEC 0x05
-#define MSM_GROUP_PB 0x06
-#define MSM_GROUP_DISP 0x07
-#define MSM_GROUP_NET 0x08
-#define MSM_GROUP_SND 0x09
-#define MSM_GROUP_MISC 0x0A
-#define MSM_GROUP_SVC 0x0B
-#define MSM_GROUP_SS 0x0C
-#define MSM_GROUP_GPRS 0x0D
-#define MSM_GROUP_SAT 0x0E
-#define MSM_GROUP_CFG 0x0F
-#define MSM_GROUP_IMEI 0x10
-#define MSM_GROUP_GPS 0x11
-#define MSM_GROUP_SAP 0x12
-#define MSM_GROUP_GEN 0x80
+#define IPC_GROUP_PWR 0x01
+#define IPC_GROUP_CALL 0x02
+#define IPC_GROUP_SMS 0x04
+#define IPC_GROUP_SEC 0x05
+#define IPC_GROUP_PB 0x06
+#define IPC_GROUP_DISP 0x07
+#define IPC_GROUP_NET 0x08
+#define IPC_GROUP_SND 0x09
+#define IPC_GROUP_MISC 0x0A
+#define IPC_GROUP_SVC 0x0B
+#define IPC_GROUP_SS 0x0C
+#define IPC_GROUP_GPRS 0x0D
+#define IPC_GROUP_SAT 0x0E
+#define IPC_GROUP_CFG 0x0F
+#define IPC_GROUP_IMEI 0x10
+#define IPC_GROUP_GPS 0x11
+#define IPC_GROUP_SAP 0x12
+#define IPC_GROUP_GEN 0x80
/* Power */
-#define MSM_PWR_PHONE_PWR_UP 0x0101
-#define MSM_PWR_PHONE_PWR_OFF 0x0102
-#define MSM_PWR_PHONE_RESET 0x0103
-#define MSM_PWR_BATT_STATUS 0x0104
-#define MSM_PWR_BATT_TYPE 0x0105
-#define MSM_PWR_BATT_COMP 0x0106
-#define MSM_PWR_PHONE_ONLINE 0x0107
+#define IPC_PWR_PHONE_PWR_UP 0x0101
+#define IPC_PWR_PHONE_PWR_OFF 0x0102
+#define IPC_PWR_PHONE_RESET 0x0103
+#define IPC_PWR_BATT_STATUS 0x0104
+#define IPC_PWR_BATT_TYPE 0x0105
+#define IPC_PWR_BATT_COMP 0x0106
+#define IPC_PWR_PHONE_ONLINE 0x0107
/* Pb */
-#define MSM_PB_ACCESS 0x0601
-#define MSM_PB_STORAGE 0x0602
-#define MSM_PB_STORAGE_LIST 0x0603
-#define MSM_PB_ENTRY_INFO 0x0604
-#define MSM_PB_CAPABILITY_INFO 0x0605
+#define IPC_PB_ACCESS 0x0601
+#define IPC_PB_STORAGE 0x0602
+#define IPC_PB_STORAGE_LIST 0x0603
+#define IPC_PB_ENTRY_INFO 0x0604
+#define IPC_PB_CAPABILITY_INFO 0x0605
/* SS */
-#define MSM_SS_WAITING 0x0C01
-#define MSM_SS_CLI 0x0C02
-#define MSM_SS_BARRING 0x0C03
-#define MSM_SS_BARRING_PW 0x0C04
-#define MSM_SS_FORWARDING 0x0C05
-#define MSM_SS_INFO 0x0C06
-#define MSM_SS_MANAGE_CALL 0x0C07
-#define MSM_SS_USSD 0x0C08
-#define MSM_SS_AOC 0x0C09
-#define MSM_SS_RELEASE_COMPLETE 0x0C0A
+#define IPC_SS_WAITING 0x0C01
+#define IPC_SS_CLI 0x0C02
+#define IPC_SS_BARRING 0x0C03
+#define IPC_SS_BARRING_PW 0x0C04
+#define IPC_SS_FORWARDING 0x0C05
+#define IPC_SS_INFO 0x0C06
+#define IPC_SS_MANAGE_CALL 0x0C07
+#define IPC_SS_USSD 0x0C08
+#define IPC_SS_AOC 0x0C09
+#define IPC_SS_RELEASE_COMPLETE 0x0C0A
/* GPRS */
-#define MSM_GPRS_DEFINE_PDP_CONTEXT 0x0D01
-#define MSM_GPRS_QOS 0x0D02
-#define MSM_GPRS_PS 0x0D03
-#define MSM_GPRS_PDP_CONTEXT 0x0D04
-#define MSM_GPRS_SHOW_PDP_ADDR 0x0D05
-#define MSM_GPRS_MS_CLASS 0x0D06
-#define MSM_GPRS_3G_QUAL_SERVICE_PROFILE 0x0D07
-#define MSM_GPRS_IP_CONFIGURATION 0x0D08
-#define MSM_GPRS_DEFINE_SEC_PDP_CONTEXT 0x0D09
-#define MSM_GPRS_TFT 0x0D0A
-#define MSM_GPRS_HSDPA_STATUS 0x0D0B
-#define MSM_GPRS_CURRENT_SESSION_DATA_COUNT 0x0D0C
-#define MSM_GPRS_DATA_DORMANT 0x0D0D
-#define MSM_GPRS_DUN_PIN_CTRL 0x0D0E
-#define MSM_GPRS_CALL_STATUS 0x0D0F
+#define IPC_GPRS_DEFINE_PDP_CONTEXT 0x0D01
+#define IPC_GPRS_QOS 0x0D02
+#define IPC_GPRS_PS 0x0D03
+#define IPC_GPRS_PDP_CONTEXT 0x0D04
+#define IPC_GPRS_SHOW_PDP_ADDR 0x0D05
+#define IPC_GPRS_MS_CLASS 0x0D06
+#define IPC_GPRS_3G_QUAL_SERVICE_PROFILE 0x0D07
+#define IPC_GPRS_IP_CONFIGURATION 0x0D08
+#define IPC_GPRS_DEFINE_SEC_PDP_CONTEXT 0x0D09
+#define IPC_GPRS_TFT 0x0D0A
+#define IPC_GPRS_HSDPA_STATUS 0x0D0B
+#define IPC_GPRS_CURRENT_SESSION_DATA_COUNT 0x0D0C
+#define IPC_GPRS_DATA_DORMANT 0x0D0D
+#define IPC_GPRS_DUN_PIN_CTRL 0x0D0E
+#define IPC_GPRS_CALL_STATUS 0x0D0F
/* Sat */
-#define MSM_SAT_PROFILE_DOWNLOAD 0x0E01
-#define MSM_SAT_ENVELOPE_CMD 0x0E02
-#define MSM_SAT_PROACTIVE_CMD 0x0E03
-#define MSM_SAT_TERMINATE_USAT_SESSION 0x0E04
-#define MSM_SAT_EVENT_DOWNLOAD 0x0E05
-#define MSM_SAT_PROVIDE_LOCAL_INFO 0x0E06
-#define MSM_SAT_POLLING 0x0E07
-#define MSM_SAT_REFRESH 0x0E08
-#define MSM_SAT_SETUP_EVENT_LIST 0x0E09
-#define MSM_SAT_CALL_CONTROL_RESULT 0x0E0A
-#define MSM_SAT_IMAGE_CLUT 0x0E0B
-#define MSM_SAT_CALL_PROCESSING 0x0E0C
+#define IPC_SAT_PROFILE_DOWNLOAD 0x0E01
+#define IPC_SAT_ENVELOPE_CMD 0x0E02
+#define IPC_SAT_PROACTIVE_CMD 0x0E03
+#define IPC_SAT_TERMINATE_USAT_SESSION 0x0E04
+#define IPC_SAT_EVENT_DOWNLOAD 0x0E05
+#define IPC_SAT_PROVIDE_LOCAL_INFO 0x0E06
+#define IPC_SAT_POLLING 0x0E07
+#define IPC_SAT_REFRESH 0x0E08
+#define IPC_SAT_SETUP_EVENT_LIST 0x0E09
+#define IPC_SAT_CALL_CONTROL_RESULT 0x0E0A
+#define IPC_SAT_IMAGE_CLUT 0x0E0B
+#define IPC_SAT_CALL_PROCESSING 0x0E0C
/* IMEI */
-#define MSM_IMEI_START 0x1001
-#define MSM_IMEI_CHECK_DEVICE_INFO 0x1002
+#define IPC_IMEI_START 0x1001
+#define IPC_IMEI_CHECK_DEVICE_INFO 0x1002
/* Gen */
-#define MSM_GEN_PHONE_RES 0x8001
+#define IPC_GEN_PHONE_RES 0x8001
#define FRAME_START 0x7f
#define FRAME_END 0x7e
@@ -136,7 +136,7 @@
#define SWAP16(x) ((x >> 8) | ((x & 0xff) << 8))
-struct msm_request_info {
+struct ipc_request_info {
unsigned short type;
unsigned char method;
unsigned char id;
@@ -144,25 +144,25 @@ struct msm_request_info {
int length;
};
-struct msm_info {
+struct ipc_info {
char *tty;
- void (*on_receive)(struct msm_request_info *info);
+ void (*on_receive)(struct ipc_request_info *info);
};
-struct msm_gen_phone_res {
+struct ipc_gen_phone_res {
unsigned char group, type;
unsigned short code;
unsigned char unk;
} __attribute__((__packed__));
-void msm_register(struct msm_info *msm);
-void msm_open();
-void msm_close();
-void msm_power_on();
-void msm_power_off();
-void msm_loop();
+void ipc_register(struct ipc_info *ipc);
+void ipc_open();
+void ipc_close();
+void ipc_power_on();
+void ipc_power_off();
+void ipc_loop();
-void msm_send(const int type, const int method, const unsigned char *data, const int data_length, int request_id);
+void ipc_send(const int type, const int method, const unsigned char *data, const int data_length, int request_id);
#endif
diff --git a/include/sec.h b/include/sec.h
index bd8629b..28db4f8 100644
--- a/include/sec.h
+++ b/include/sec.h
@@ -1,68 +1,68 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __SEC_H__
#define __SEC_H__
-#define MSM_SEC_PIN_STATUS 0x0501
-#define MSM_SEC_PHONE_LOCK 0x0502
-#define MSM_SEC_CHANGE_LOCKING_PW 0x0503
-#define MSM_SEC_SIM_LANG 0x0504
-#define MSM_SEC_RSIM_ACCESS 0x0505
-#define MSM_SEC_GSIM_ACCESS 0x0506
-#define MSM_SEC_SIM_ICC_TYPE 0x0507
-#define MSM_SEC_LOCK_INFO 0x0508
-#define MSM_SEC_ISIM_AUTH 0x0509
+#define IPC_SEC_PIN_STATUS 0x0501
+#define IPC_SEC_PHONE_LOCK 0x0502
+#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_LOCK_INFO 0x0508
+#define IPC_SEC_ISIM_AUTH 0x0509
-#define MSM_SEC_PIN_SIM_INITIALIZING 0x00
-#define MSM_SEC_PIN_SIM_SIM_LOCK_REQUIRED 0x01
-#define MSM_SEC_PIN_SIM_INSIDE_PF_ERROR 0x02
-#define MSM_SEC_PIN_SIM_LOCK_SC 0x03
-#define MSM_SEC_PIN_SIM_LOCK_FD 0x04
-#define MSM_SEC_PIN_SIM_LOCK_PN 0x05
-#define MSM_SEC_PIN_SIM_LOCK_PU 0x06
-#define MSM_SEC_PIN_SIM_LOCK_PP 0x07
-#define MSM_SEC_PIN_SIM_LOCK_PC 0x08
-#define MSM_SEC_PIN_SIM_CARD_NOT_PRESENT 0x80
-#define MSM_SEC_PIN_SIM_CARD_ERROR 0x81
-#define MSM_SEC_PIN_SIM_INIT_COMPLETE 0x82
-#define MSM_SEC_PIN_SIM_PB_INIT_COMPLETE 0x83
+#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_CARD_NOT_PRESENT 0x80
+#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 MSM_SEC_PIN_SIM_LOCK_SC_PIN1_REQ 0x01
-#define MSM_SEC_PIN_SIM_LOCK_SC_PUK_REQ 0x02
-#define MSM_SEC_PIN_SIM_LOCK_SC_CARD_BLOCKED 0x05
+#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 MSM_SEC_PIN_TYPE_PIN1 0x03
-#define MSM_SEC_PIN_TYPE_PIN2 0x09
+#define IPC_SEC_PIN_TYPE_PIN1 0x03
+#define IPC_SEC_PIN_TYPE_PIN2 0x09
-#define MSM_SEC_SIM_CARD_TYPE_UNKNOWN 0x00
-#define MSM_SEC_SIM_CARD_TYPE_SIM 0x01
-#define MSM_SEC_SIM_CARD_TYPE_USIM 0x02
+#define IPC_SEC_SIM_CARD_TYPE_UNKNOWN 0x00
+#define IPC_SEC_SIM_CARD_TYPE_SIM 0x01
+#define IPC_SEC_SIM_CARD_TYPE_USIM 0x02
-struct msm_sec_pin_status_noti {
+struct ipc_sec_pin_status_noti {
unsigned char type;
unsigned char key;
} __attribute__((__packed__));
-struct msm_sec_pin_status_set {
+struct ipc_sec_pin_status_set {
unsigned char type;
unsigned char length1;
unsigned char length2;
@@ -70,30 +70,30 @@ struct msm_sec_pin_status_set {
unsigned char pin2[8];
} __attribute__((__packed__));
-struct msm_sec_phone_lock {
+struct ipc_sec_phone_lock {
unsigned char type;
unsigned char status;
} __attribute__((__packed__));
-struct msm_sec_rsim_access_request {
+struct ipc_sec_rsim_access_request {
unsigned char command;
unsigned short fileid;
unsigned char p1, p2, p3;
} __attribute__((__packed__));
-struct msm_sec_rsim_access_response {
+struct ipc_sec_rsim_access_response {
unsigned char sw1, sw2;
unsigned char len;
} __attribute__((__packed__));
-struct msm_sec_lock_info {
+struct ipc_sec_lock_info {
unsigned char num;
unsigned char type;
unsigned char key;
unsigned char attempts;
} __attribute__((__packed__));
-void msm_sec_rsim_access(unsigned char command, unsigned short file_id,
+void ipc_sec_rsim_access(unsigned char command, unsigned short file_id,
unsigned char p1, unsigned char p2, unsigned char p3,
unsigned char *rdata, unsigned int length, int request_id);
diff --git a/include/sms.h b/include/sms.h
index b7c3154..d9c7c91 100644
--- a/include/sms.h
+++ b/include/sms.h
@@ -1,60 +1,60 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __SMS_H__
#define __SMS_H__
-#define MSM_SMS_SEND_MSG 0x0401
-#define MSM_SMS_INCOMING_MSG 0x0402
-#define MSM_SMS_READ_MSG 0x0403
-#define MSM_SMS_SAVE_MSG 0x0404
-#define MSM_SMS_DEL_MSG 0x0405
-#define MSM_SMS_DELIVER_REPORT 0x0406
-#define MSM_SMS_DEVICE_READY 0x0407
-#define MSM_SMS_SEL_MEM 0x0408
-#define MSM_SMS_STORED_MSG_COUNT 0x0409
-#define MSM_SMS_SVC_CENTER_ADDR 0x040A
-#define MSM_SMS_SVC_OPTION 0x040B
-#define MSM_SMS_MEM_STATUS 0x040C
-#define MSM_SMS_CBS_MSG 0x040D
-#define MSM_SMS_CBS_CONFIG 0x040E
-#define MSM_SMS_STORED_MSG_STATUS 0x040F
-#define MSM_SMS_PARAM_COUNT 0x0410
-#define MSM_SMS_PARAM 0x0411
-
-#define MSM_SMS_MSG_MULTIPLE 1
-#define MSM_SMS_MSG_SINGLE 2
-
-#define MSM_SMS_TYPE_POINT_TO_POINT 1
-#define MSM_SMS_TYPE_STATUS_REPORT 2
-
-struct msm_sms_send_msg {
+#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;
} __attribute__((__packed__));
-struct msm_sms_incoming_msg {
+struct ipc_sms_incoming_msg {
unsigned char type, unk, length;
} __attribute__((__packed__));
-void msm_sms_send_msg(unsigned char *data, unsigned char length, int request_id);
-void msm_sms_deliver_report(int request_id);
+void ipc_sms_send_msg(unsigned char *data, unsigned char length, int request_id);
+void ipc_sms_deliver_report(int request_id);
#endif
diff --git a/include/util.h b/include/util.h
index 5d07499..93dbb00 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
diff --git a/misc.c b/misc.c
index dc68d80..cc8d00d 100644
--- a/misc.c
+++ b/misc.c
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -22,25 +22,25 @@
#include <radio.h>
#include "radio_internal.h"
-void msm_misc_me_version(int request_id)
+void ipc_misc_me_version(int request_id)
{
- msm_send_get(MSM_MISC_ME_VERSION, request_id);
+ ipc_send_get(IPC_MISC_ME_VERSION, request_id);
}
-void msm_misc_me_imsi(int request_id)
+void ipc_misc_me_imsi(int request_id)
{
- msm_send_get(MSM_MISC_ME_IMSI, request_id);
+ ipc_send_get(IPC_MISC_ME_IMSI, request_id);
}
/**
* Requests the device's IMEI/IMEISV
*/
-void msm_misc_me_sn(int request_id)
+void ipc_misc_me_sn(int request_id)
{
- msm_send_get(MSM_MISC_ME_SN, request_id);
+ ipc_send_get(IPC_MISC_ME_SN, request_id);
}
-void msm_rx_misc_me_sn(struct msm_request_info *info, char *data, int len)
+void ipc_rx_misc_me_sn(struct ipc_request_info *info, char *data, int len)
{
unsigned char *imei_len = (unsigned char*)data;
char *imei = (data+1);
@@ -49,22 +49,22 @@ void msm_rx_misc_me_sn(struct msm_request_info *info, char *data, int len)
info->data = imei;
info->length = *imei_len;
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
-void msm_rx_misc_time_info(struct msm_request_info *info, char *data, int len)
+void ipc_rx_misc_time_info(struct ipc_request_info *info, char *data, int len)
{
- if(len != sizeof(struct msm_misc_time_info)) {
+ if(len != sizeof(struct ipc_misc_time_info)) {
printf("Invalid NITZ message length\n");
return;
}
- struct msm_misc_time_info *nitz = (struct msm_misc_time_info*)data;
+ struct ipc_misc_time_info *nitz = (struct ipc_misc_time_info*)data;
printf("%s: %02u-%02u-%04u %02u:%02u:%02u %02u\n",
__FUNCTION__, nitz->day, nitz->mon, (2000 + nitz->year),
nitz->hour, nitz->min, nitz->sec, nitz->tz);
info->data = nitz;
info->length = sizeof(*nitz);
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
diff --git a/net.c b/net.c
index 76d94e8..8a87383 100644
--- a/net.c
+++ b/net.c
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -24,60 +24,60 @@
/**
* Requests the current PLMN
*/
-void msm_net_current_plmn(int request_id)
+void ipc_net_current_plmn(int request_id)
{
- msm_send_get(MSM_NET_CURRENT_PLMN, request_id);
+ ipc_send_get(IPC_NET_CURRENT_PLMN, request_id);
}
-void msm_rx_net_current_plmn(struct msm_request_info *info, char *data, int len)
+void ipc_rx_net_current_plmn(struct ipc_request_info *info, char *data, int len)
{
- struct msm_net_current_plmn *plmndata = (struct msm_net_current_plmn*)data;
+ struct ipc_net_current_plmn *plmndata = (struct ipc_net_current_plmn*)data;
info->data = plmndata;
info->length = sizeof(*plmndata);
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
-void msm_net_plmn_list(int request_id)
+void ipc_net_plmn_list(int request_id)
{
- msm_send_get(MSM_NET_PLMN_LIST, request_id);
+ ipc_send_get(IPC_NET_PLMN_LIST, request_id);
}
-void msm_rx_net_plmn_list(struct msm_request_info *info, char *data, int len)
+void ipc_rx_net_plmn_list(struct ipc_request_info *info, char *data, int len)
{
unsigned char num_entries = *((unsigned char*)data);
- struct msm_net_plmn_entries entries;
+ struct ipc_net_plmn_entries entries;
entries.num = num_entries;
- entries.data = (struct msm_net_plmn_entry*)(data+1);
+ entries.data = (struct ipc_net_plmn_entry*)(data+1);
info->data = &entries;
info->length = sizeof(entries);
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
-void msm_rx_net_regist(struct msm_request_info *info, const char *data, int len)
+void ipc_rx_net_regist(struct ipc_request_info *info, const char *data, int len)
{
- struct msm_net_regist *netinfo = (struct msm_net_regist*)data;
+ struct ipc_net_regist *netinfo = (struct ipc_net_regist*)data;
info->data = netinfo;
info->length = sizeof(*netinfo);
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
-void msm_net_identity(int request_id)
+void ipc_net_identity(int request_id)
{
- msm_send_get(MSM_NET_IDENTITY, request_id);
+ ipc_send_get(IPC_NET_IDENTITY, request_id);
}
-void msm_net_regist(int request_id, unsigned char type)
+void ipc_net_regist(int request_id, unsigned char type)
{
unsigned char data[] = { 0xff, 0x00 };
if(type == 0) {
- msm_send_get(MSM_NET_REGIST, request_id);
+ ipc_send_get(IPC_NET_REGIST, request_id);
} else {
data[1] = type;
- msm_send(MSM_NET_REGIST, MSM_TYPE_GET, data, sizeof(data), request_id);
+ ipc_send(IPC_NET_REGIST, IPC_TYPE_GET, data, sizeof(data), request_id);
}
}
diff --git a/radio.c b/radio.c
index fb2c361..35faf86 100644
--- a/radio.c
+++ b/radio.c
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -32,21 +32,21 @@
#include "hexdump.h"
static int fd = 0;
-static struct msm_info *msm = NULL;
+static struct ipc_info *ipc = NULL;
-void msm_rx_callback(struct msm_request_info *info)
+void ipc_rx_callback(struct ipc_request_info *info)
{
- msm->on_receive(info);
+ ipc->on_receive(info);
}
-void msm_register(struct msm_info *msm_data)
+void ipc_register(struct ipc_info *ipc_data)
{
- msm = msm_data;
+ ipc = ipc_data;
}
-void msm_open()
+void ipc_open()
{
- fd = open(msm->tty, O_RDWR | O_NDELAY);
+ fd = open(ipc->tty, O_RDWR | O_NDELAY);
if(fd < 0) {
printf("Failed to open dpram tty\n");
@@ -59,151 +59,151 @@ void msm_open()
tcsetattr(fd, TCSANOW, &termios);
}
-void msm_close()
+void ipc_close()
{
if(fd) {
close(fd);
}
}
-void msm_power_on()
+void ipc_power_on()
{
ioctl(fd, IOCTL_PHONE_ON);
}
-void msm_power_off()
+void ipc_power_off()
{
ioctl(fd, IOCTL_PHONE_OFF);
}
-const char *msm_type(struct msm_hdr *frame) {
+const char *ipc_type(struct ipc_hdr *frame) {
switch(frame->type) {
- case MSM_TYPE_INDI:
+ case IPC_TYPE_INDI:
return "INDI";
- case MSM_TYPE_RESP:
+ case IPC_TYPE_RESP:
return "RESP";
- case MSM_TYPE_NOTI:
+ case IPC_TYPE_NOTI:
return "NOTI";
default:
return "UNKNOWN";
}
}
-const char *msm_str(struct msm_hdr *frame) {
+const char *ipc_str(struct ipc_hdr *frame) {
switch(FRAME_ID(frame)) {
- FRAME_STR(MSM_PWR_PHONE_PWR_UP)
- FRAME_STR(MSM_PWR_PHONE_PWR_OFF)
- FRAME_STR(MSM_PWR_PHONE_RESET)
- FRAME_STR(MSM_PWR_BATT_STATUS)
- FRAME_STR(MSM_PWR_BATT_TYPE)
- FRAME_STR(MSM_PWR_BATT_COMP)
- FRAME_STR(MSM_PWR_PHONE_ONLINE)
- FRAME_STR(MSM_CALL_OUTGOING)
- FRAME_STR(MSM_CALL_INCOMING)
- FRAME_STR(MSM_CALL_RELEASE)
- FRAME_STR(MSM_CALL_ANSWER)
- FRAME_STR(MSM_CALL_STATUS)
- FRAME_STR(MSM_CALL_LIST)
- FRAME_STR(MSM_CALL_BURST_DTMF)
- FRAME_STR(MSM_CALL_CONT_DTMF)
- FRAME_STR(MSM_CALL_WAITING)
- FRAME_STR(MSM_CALL_LINE_ID)
- FRAME_STR(MSM_SMS_SEND_MSG)
- FRAME_STR(MSM_SMS_INCOMING_MSG)
- FRAME_STR(MSM_SMS_READ_MSG)
- FRAME_STR(MSM_SMS_SAVE_MSG)
- FRAME_STR(MSM_SMS_DEL_MSG)
- FRAME_STR(MSM_SMS_DELIVER_REPORT)
- FRAME_STR(MSM_SMS_DEVICE_READY)
- FRAME_STR(MSM_SMS_SEL_MEM)
- FRAME_STR(MSM_SMS_STORED_MSG_COUNT)
- FRAME_STR(MSM_SMS_SVC_CENTER_ADDR)
- FRAME_STR(MSM_SMS_SVC_OPTION)
- FRAME_STR(MSM_SMS_MEM_STATUS)
- FRAME_STR(MSM_SMS_CBS_MSG)
- FRAME_STR(MSM_SMS_CBS_CONFIG)
- FRAME_STR(MSM_SMS_STORED_MSG_STATUS)
- FRAME_STR(MSM_SMS_PARAM_COUNT)
- FRAME_STR(MSM_SMS_PARAM)
- FRAME_STR(MSM_SEC_PIN_STATUS)
- FRAME_STR(MSM_SEC_PHONE_LOCK)
- FRAME_STR(MSM_SEC_CHANGE_LOCKING_PW)
- FRAME_STR(MSM_SEC_SIM_LANG)
- FRAME_STR(MSM_SEC_RSIM_ACCESS)
- FRAME_STR(MSM_SEC_GSIM_ACCESS)
- FRAME_STR(MSM_SEC_SIM_ICC_TYPE)
- FRAME_STR(MSM_SEC_LOCK_INFO)
- FRAME_STR(MSM_SEC_ISIM_AUTH)
- FRAME_STR(MSM_PB_ACCESS)
- FRAME_STR(MSM_PB_STORAGE)
- FRAME_STR(MSM_PB_STORAGE_LIST)
- FRAME_STR(MSM_PB_ENTRY_INFO)
- FRAME_STR(MSM_PB_CAPABILITY_INFO)
- FRAME_STR(MSM_DISP_ICON_INFO)
- FRAME_STR(MSM_DISP_HOMEZONE_INFO)
- FRAME_STR(MSM_NET_PREF_PLMN)
- FRAME_STR(MSM_NET_PLMN_SEL)
- FRAME_STR(MSM_NET_CURRENT_PLMN)
- FRAME_STR(MSM_NET_PLMN_LIST)
- FRAME_STR(MSM_NET_REGIST)
- FRAME_STR(MSM_NET_SUBSCRIBER_NUM)
- FRAME_STR(MSM_NET_BAND_SEL)
- FRAME_STR(MSM_NET_SERVICE_DOMAIN_CONFIG)
- FRAME_STR(MSM_NET_POWERON_ATTACH)
- FRAME_STR(MSM_NET_MODE_SEL)
- FRAME_STR(MSM_NET_ACQ_ORDER)
- FRAME_STR(MSM_NET_IDENTITY)
- FRAME_STR(MSM_NET_CURRENT_RRC_STATUS)
- FRAME_STR(MSM_MISC_ME_VERSION)
- FRAME_STR(MSM_MISC_ME_IMSI)
- FRAME_STR(MSM_MISC_ME_SN)
- FRAME_STR(MSM_MISC_TIME_INFO)
- FRAME_STR(MSM_SS_WAITING)
- FRAME_STR(MSM_SS_CLI)
- FRAME_STR(MSM_SS_BARRING)
- FRAME_STR(MSM_SS_BARRING_PW)
- FRAME_STR(MSM_SS_FORWARDING)
- FRAME_STR(MSM_SS_INFO)
- FRAME_STR(MSM_SS_MANAGE_CALL)
- FRAME_STR(MSM_SS_USSD)
- FRAME_STR(MSM_SS_AOC)
- FRAME_STR(MSM_SS_RELEASE_COMPLETE)
- FRAME_STR(MSM_GPRS_DEFINE_PDP_CONTEXT)
- FRAME_STR(MSM_GPRS_QOS)
- FRAME_STR(MSM_GPRS_PS)
- FRAME_STR(MSM_GPRS_PDP_CONTEXT)
- FRAME_STR(MSM_GPRS_SHOW_PDP_ADDR)
- FRAME_STR(MSM_GPRS_MS_CLASS)
- FRAME_STR(MSM_GPRS_3G_QUAL_SERVICE_PROFILE)
- FRAME_STR(MSM_GPRS_IP_CONFIGURATION)
- FRAME_STR(MSM_GPRS_DEFINE_SEC_PDP_CONTEXT)
- FRAME_STR(MSM_GPRS_TFT)
- FRAME_STR(MSM_GPRS_HSDPA_STATUS)
- FRAME_STR(MSM_GPRS_CURRENT_SESSION_DATA_COUNT)
- FRAME_STR(MSM_GPRS_DATA_DORMANT)
- FRAME_STR(MSM_GPRS_DUN_PIN_CTRL)
- FRAME_STR(MSM_GPRS_CALL_STATUS)
- FRAME_STR(MSM_SAT_PROFILE_DOWNLOAD)
- FRAME_STR(MSM_SAT_ENVELOPE_CMD)
- FRAME_STR(MSM_SAT_PROACTIVE_CMD)
- FRAME_STR(MSM_SAT_TERMINATE_USAT_SESSION)
- FRAME_STR(MSM_SAT_EVENT_DOWNLOAD)
- FRAME_STR(MSM_SAT_PROVIDE_LOCAL_INFO)
- FRAME_STR(MSM_SAT_POLLING)
- FRAME_STR(MSM_SAT_REFRESH)
- FRAME_STR(MSM_SAT_SETUP_EVENT_LIST)
- FRAME_STR(MSM_SAT_CALL_CONTROL_RESULT)
- FRAME_STR(MSM_SAT_IMAGE_CLUT)
- FRAME_STR(MSM_SAT_CALL_PROCESSING)
- FRAME_STR(MSM_IMEI_START)
- FRAME_STR(MSM_IMEI_CHECK_DEVICE_INFO)
- FRAME_STR(MSM_GEN_PHONE_RES)
+ FRAME_STR(IPC_PWR_PHONE_PWR_UP)
+ FRAME_STR(IPC_PWR_PHONE_PWR_OFF)
+ FRAME_STR(IPC_PWR_PHONE_RESET)
+ FRAME_STR(IPC_PWR_BATT_STATUS)
+ FRAME_STR(IPC_PWR_BATT_TYPE)
+ FRAME_STR(IPC_PWR_BATT_COMP)
+ FRAME_STR(IPC_PWR_PHONE_ONLINE)
+ FRAME_STR(IPC_CALL_OUTGOING)
+ FRAME_STR(IPC_CALL_INCOMING)
+ FRAME_STR(IPC_CALL_RELEASE)
+ FRAME_STR(IPC_CALL_ANSWER)
+ FRAME_STR(IPC_CALL_STATUS)
+ FRAME_STR(IPC_CALL_LIST)
+ FRAME_STR(IPC_CALL_BURST_DTMF)
+ FRAME_STR(IPC_CALL_CONT_DTMF)
+ FRAME_STR(IPC_CALL_WAITING)
+ FRAME_STR(IPC_CALL_LINE_ID)
+ FRAME_STR(IPC_SMS_SEND_MSG)
+ FRAME_STR(IPC_SMS_INCOMING_MSG)
+ FRAME_STR(IPC_SMS_READ_MSG)
+ FRAME_STR(IPC_SMS_SAVE_MSG)
+ FRAME_STR(IPC_SMS_DEL_MSG)
+ FRAME_STR(IPC_SMS_DELIVER_REPORT)
+ FRAME_STR(IPC_SMS_DEVICE_READY)
+ FRAME_STR(IPC_SMS_SEL_MEM)
+ FRAME_STR(IPC_SMS_STORED_MSG_COUNT)
+ FRAME_STR(IPC_SMS_SVC_CENTER_ADDR)
+ FRAME_STR(IPC_SMS_SVC_OPTION)
+ FRAME_STR(IPC_SMS_MEM_STATUS)
+ FRAME_STR(IPC_SMS_CBS_MSG)
+ FRAME_STR(IPC_SMS_CBS_CONFIG)
+ FRAME_STR(IPC_SMS_STORED_MSG_STATUS)
+ FRAME_STR(IPC_SMS_PARAM_COUNT)
+ FRAME_STR(IPC_SMS_PARAM)
+ FRAME_STR(IPC_SEC_PIN_STATUS)
+ FRAME_STR(IPC_SEC_PHONE_LOCK)
+ FRAME_STR(IPC_SEC_CHANGE_LOCKING_PW)
+ FRAME_STR(IPC_SEC_SIM_LANG)
+ FRAME_STR(IPC_SEC_RSIM_ACCESS)
+ FRAME_STR(IPC_SEC_GSIM_ACCESS)
+ FRAME_STR(IPC_SEC_SIM_ICC_TYPE)
+ FRAME_STR(IPC_SEC_LOCK_INFO)
+ FRAME_STR(IPC_SEC_ISIM_AUTH)
+ FRAME_STR(IPC_PB_ACCESS)
+ FRAME_STR(IPC_PB_STORAGE)
+ FRAME_STR(IPC_PB_STORAGE_LIST)
+ FRAME_STR(IPC_PB_ENTRY_INFO)
+ FRAME_STR(IPC_PB_CAPABILITY_INFO)
+ FRAME_STR(IPC_DISP_ICON_INFO)
+ FRAME_STR(IPC_DISP_HOMEZONE_INFO)
+ FRAME_STR(IPC_NET_PREF_PLMN)
+ FRAME_STR(IPC_NET_PLMN_SEL)
+ FRAME_STR(IPC_NET_CURRENT_PLMN)
+ FRAME_STR(IPC_NET_PLMN_LIST)
+ FRAME_STR(IPC_NET_REGIST)
+ FRAME_STR(IPC_NET_SUBSCRIBER_NUM)
+ FRAME_STR(IPC_NET_BAND_SEL)
+ FRAME_STR(IPC_NET_SERVICE_DOMAIN_CONFIG)
+ FRAME_STR(IPC_NET_POWERON_ATTACH)
+ FRAME_STR(IPC_NET_MODE_SEL)
+ FRAME_STR(IPC_NET_ACQ_ORDER)
+ FRAME_STR(IPC_NET_IDENTITY)
+ FRAME_STR(IPC_NET_CURRENT_RRC_STATUS)
+ FRAME_STR(IPC_MISC_ME_VERSION)
+ FRAME_STR(IPC_MISC_ME_IMSI)
+ FRAME_STR(IPC_MISC_ME_SN)
+ FRAME_STR(IPC_MISC_TIME_INFO)
+ FRAME_STR(IPC_SS_WAITING)
+ FRAME_STR(IPC_SS_CLI)
+ FRAME_STR(IPC_SS_BARRING)
+ FRAME_STR(IPC_SS_BARRING_PW)
+ FRAME_STR(IPC_SS_FORWARDING)
+ FRAME_STR(IPC_SS_INFO)
+ FRAME_STR(IPC_SS_MANAGE_CALL)
+ FRAME_STR(IPC_SS_USSD)
+ FRAME_STR(IPC_SS_AOC)
+ FRAME_STR(IPC_SS_RELEASE_COMPLETE)
+ FRAME_STR(IPC_GPRS_DEFINE_PDP_CONTEXT)
+ FRAME_STR(IPC_GPRS_QOS)
+ FRAME_STR(IPC_GPRS_PS)
+ FRAME_STR(IPC_GPRS_PDP_CONTEXT)
+ FRAME_STR(IPC_GPRS_SHOW_PDP_ADDR)
+ FRAME_STR(IPC_GPRS_MS_CLASS)
+ FRAME_STR(IPC_GPRS_3G_QUAL_SERVICE_PROFILE)
+ FRAME_STR(IPC_GPRS_IP_CONFIGURATION)
+ FRAME_STR(IPC_GPRS_DEFINE_SEC_PDP_CONTEXT)
+ FRAME_STR(IPC_GPRS_TFT)
+ FRAME_STR(IPC_GPRS_HSDPA_STATUS)
+ FRAME_STR(IPC_GPRS_CURRENT_SESSION_DATA_COUNT)
+ FRAME_STR(IPC_GPRS_DATA_DORMANT)
+ FRAME_STR(IPC_GPRS_DUN_PIN_CTRL)
+ FRAME_STR(IPC_GPRS_CALL_STATUS)
+ FRAME_STR(IPC_SAT_PROFILE_DOWNLOAD)
+ FRAME_STR(IPC_SAT_ENVELOPE_CMD)
+ FRAME_STR(IPC_SAT_PROACTIVE_CMD)
+ FRAME_STR(IPC_SAT_TERMINATE_USAT_SESSION)
+ FRAME_STR(IPC_SAT_EVENT_DOWNLOAD)
+ FRAME_STR(IPC_SAT_PROVIDE_LOCAL_INFO)
+ FRAME_STR(IPC_SAT_POLLING)
+ FRAME_STR(IPC_SAT_REFRESH)
+ FRAME_STR(IPC_SAT_SETUP_EVENT_LIST)
+ FRAME_STR(IPC_SAT_CALL_CONTROL_RESULT)
+ FRAME_STR(IPC_SAT_IMAGE_CLUT)
+ FRAME_STR(IPC_SAT_CALL_PROCESSING)
+ FRAME_STR(IPC_IMEI_START)
+ FRAME_STR(IPC_IMEI_CHECK_DEVICE_INFO)
+ FRAME_STR(IPC_GEN_PHONE_RES)
default:
return "UNKNOWN_FRAME";
}
}
-void msm_tx(const char *data, const int length)
+void ipc_tx(const char *data, const int length)
{
unsigned int frame_len = (length+2);
@@ -220,9 +220,9 @@ void msm_tx(const char *data, const int length)
free(hdlc);
}
-void msm_send(const int type, const int method, const unsigned char *data, const int data_length, int request_id)
+void ipc_send(const int type, const int method, const unsigned char *data, const int data_length, int request_id)
{
- struct msm_hdr header;
+ struct ipc_hdr header;
unsigned int len = sizeof(header);
unsigned int frame_length = (len + data_length);
char *frame = malloc(frame_length);
@@ -239,36 +239,36 @@ void msm_send(const int type, const int method, const unsigned char *data, const
memcpy(frame, &header, sizeof(header));
memcpy(frame+len, data, data_length);
- printf("\n%s: %s\n", __FUNCTION__, msm_str(&header));
- msm_tx(frame, frame_length);
+ printf("\n%s: %s\n", __FUNCTION__, ipc_str(&header));
+ ipc_tx(frame, frame_length);
free(frame);
}
-void msm_send_get(const int type, int request_id)
+void ipc_send_get(const int type, int request_id)
{
- msm_send(type, MSM_TYPE_GET, NULL, 0, request_id);
+ ipc_send(type, IPC_TYPE_GET, NULL, 0, request_id);
}
-void msm_send_exec(const int type, int request_id)
+void ipc_send_exec(const int type, int request_id)
{
- msm_send(type, MSM_TYPE_EXEC, NULL, 0, request_id);
+ ipc_send(type, IPC_TYPE_EXEC, NULL, 0, request_id);
}
-void msm_pwr_phone_pwr_up(struct msm_request_info *info, const char *data, const int len)
+void ipc_pwr_phone_pwr_up(struct ipc_request_info *info, const char *data, const int len)
{
/* Modem reports bogus IMEI if queried right after powerup */
usleep(25000);
- msm_rx_callback(info);
+ ipc_rx_callback(info);
}
-void msm_decode_frame(char *frame, int length) {
- struct msm_hdr *header = (struct msm_hdr*)frame;
+void ipc_decode_frame(char *frame, int length) {
+ struct ipc_hdr *header = (struct ipc_hdr*)frame;
char *data = frame + sizeof(*header);
unsigned short data_len = (header->frame_len - sizeof(*header));
unsigned char request_id = header->reqid;
- struct msm_request_info request_info;
+ struct ipc_request_info request_info;
request_info.type = FRAME_ID(header);
request_info.id = request_id;
request_info.method = header->type;
@@ -277,40 +277,40 @@ void msm_decode_frame(char *frame, int length) {
request_info.data = data;
request_info.length = data_len;
- printf("%s %s (%u/%u) seq=%d req=%d\n", msm_str(header), msm_type(header), header->frame_len, data_len, header->seqnum, header->reqid);
+ printf("%s %s (%u/%u) seq=%d req=%d\n", ipc_str(header), ipc_type(header), header->frame_len, data_len, header->seqnum, header->reqid);
hex_dump(frame, length);
switch(request_info.type) {
/* Power */
- case MSM_PWR_PHONE_PWR_UP:
- msm_pwr_phone_pwr_up(&request_info, data, data_len);
+ case IPC_PWR_PHONE_PWR_UP:
+ ipc_pwr_phone_pwr_up(&request_info, data, data_len);
break;
/* Misc */
- case MSM_MISC_ME_SN:
- msm_rx_misc_me_sn(&request_info, data, data_len);
+ case IPC_MISC_ME_SN:
+ ipc_rx_misc_me_sn(&request_info, data, data_len);
break;
- case MSM_MISC_TIME_INFO:
- msm_rx_misc_time_info(&request_info, data, data_len);
+ case IPC_MISC_TIME_INFO:
+ ipc_rx_misc_time_info(&request_info, data, data_len);
break;
/* Net */
- case MSM_NET_CURRENT_PLMN:
- msm_rx_net_current_plmn(&request_info, data, data_len);
+ case IPC_NET_CURRENT_PLMN:
+ ipc_rx_net_current_plmn(&request_info, data, data_len);
break;
- case MSM_NET_PLMN_LIST:
- msm_rx_net_plmn_list(&request_info, data, data_len);
+ case IPC_NET_PLMN_LIST:
+ ipc_rx_net_plmn_list(&request_info, data, data_len);
break;
- case MSM_NET_REGIST:
- msm_rx_net_regist(&request_info, data, data_len);
+ case IPC_NET_REGIST:
+ ipc_rx_net_regist(&request_info, data, data_len);
break;
default:
- msm_rx_callback(&request_info);
+ ipc_rx_callback(&request_info);
break;
}
printf("\n");
}
-void msm_loop()
+void ipc_loop()
{
unsigned char frame_len;
char *buf = malloc(1024);
@@ -336,7 +336,7 @@ void msm_loop()
frame = (p+1);
frame_len = *frame;
} else if(*p == FRAME_END && p == (frame+frame_len)) {
- msm_decode_frame(frame, (p - frame));
+ ipc_decode_frame(frame, (p - frame));
}
p++;
diff --git a/radio_internal.h b/radio_internal.h
index ee83eb1..41ca2f2 100644
--- a/radio_internal.h
+++ b/radio_internal.h
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
@@ -39,22 +39,22 @@
#endif
/* Receive callback */
-void msm_rx_callback(struct msm_request_info *info);
+void ipc_rx_callback(struct ipc_request_info *info);
-void msm_send_get(const int type, int request_id);
-void msm_send_exec(const int type, int request_id);
+void ipc_send_get(const int type, int request_id);
+void ipc_send_exec(const int type, int request_id);
/* Misc */
-void msm_rx_misc_me_sn(struct msm_request_info *info, char *data, int len);
-void msm_rx_misc_time_info(struct msm_request_info *info, char *data, int len);
+void ipc_rx_misc_me_sn(struct ipc_request_info *info, char *data, int len);
+void ipc_rx_misc_time_info(struct ipc_request_info *info, char *data, int len);
/* Net */
-void msm_rx_net_current_plmn(struct msm_request_info *info, char *data, int len);
-void msm_rx_net_plmn_list(struct msm_request_info *info, char *data, int len);
-void msm_rx_net_regist(struct msm_request_info *info, const char *data, int len);
+void ipc_rx_net_current_plmn(struct ipc_request_info *info, char *data, int len);
+void ipc_rx_net_plmn_list(struct ipc_request_info *info, char *data, int len);
+void ipc_rx_net_regist(struct ipc_request_info *info, const char *data, int len);
-struct msm_hdr {
+struct ipc_hdr {
unsigned short frame_len;
unsigned char unk;
unsigned short len;
diff --git a/sim.c b/sim.c
index dd8777d..d79230a 100644
--- a/sim.c
+++ b/sim.c
@@ -1,31 +1,31 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "radio_internal.h"
-void msm_sec_rsim_access(unsigned char command, unsigned short file_id,
+void ipc_sec_rsim_access(unsigned char command, unsigned short file_id,
unsigned char p1, unsigned char p2, unsigned char p3,
unsigned char *rdata, unsigned int length, int request_id)
{
unsigned char msg[262];
- struct msm_sec_rsim_access_request *rsim_req = (struct msm_sec_rsim_access_request*)&msg[0];
+ struct ipc_sec_rsim_access_request *rsim_req = (struct ipc_sec_rsim_access_request*)&msg[0];
unsigned char *data = (msg + sizeof(*rsim_req));
memset(msg, 0, sizeof(msg));
@@ -42,6 +42,6 @@ void msm_sec_rsim_access(unsigned char command, unsigned short file_id,
memcpy(data, rdata, length);
- msm_send(MSM_SEC_RSIM_ACCESS, MSM_TYPE_GET, msg, sizeof(msg), request_id);
+ ipc_send(IPC_SEC_RSIM_ACCESS, IPC_TYPE_GET, msg, sizeof(msg), request_id);
}
diff --git a/sms.c b/sms.c
index 823bc88..e05aa3b 100644
--- a/sms.c
+++ b/sms.c
@@ -1,33 +1,33 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "radio_internal.h"
-void msm_sms_send_msg(unsigned char *data, unsigned char length, int request_id)
+void ipc_sms_send_msg(unsigned char *data, unsigned char length, int request_id)
{
- msm_send(MSM_SMS_SEND_MSG, MSM_TYPE_EXEC, data, length, request_id);
+ ipc_send(IPC_SMS_SEND_MSG, IPC_TYPE_EXEC, data, length, request_id);
}
-void msm_sms_deliver_report(int request_id)
+void ipc_sms_deliver_report(int request_id)
{
unsigned char data[247] = { 0x00, 0x00, 0x03, 0x00, 0x02 };
- msm_send(MSM_SMS_DELIVER_REPORT, MSM_TYPE_EXEC, data, sizeof(data), request_id);
+ ipc_send(IPC_SMS_DELIVER_REPORT, IPC_TYPE_EXEC, data, sizeof(data), request_id);
}
diff --git a/test.c b/test.c
index 28fae0e..b6fa7c3 100644
--- a/test.c
+++ b/test.c
@@ -1,43 +1,43 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <radio.h>
-static void on_receive(struct msm_request_info *info)
+static void on_receive(struct ipc_request_info *info)
{
}
-static struct msm_info msm = {
+static struct ipc_info ipc = {
.tty = "/dev/dpram0",
.on_receive = on_receive,
};
int main(int argc, char *argv[])
{
- msm_register(&msm);
- msm_open();
- msm_power_on();
+ ipc_register(&ipc);
+ ipc_open();
+ ipc_power_on();
- msm_loop();
+ ipc_loop();
- msm_close();
+ ipc_close();
return 0;
}
diff --git a/util.c b/util.c
index 326e723..ef3cee0 100644
--- a/util.c
+++ b/util.c
@@ -1,20 +1,20 @@
/**
- * This file is part of libmsm-h1.
+ * This file is part of libsamsung-ipc.
*
* Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
*
- * libmsm-h1 is free software: you can redistribute it and/or modify
+ * 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.
*
- * libmsm-h1 is distributed in the hope that it will be useful,
+ * 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 libmsm-h1. If not, see <http://www.gnu.org/licenses/>.
+ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
*
*/