diff options
author | Joerie de Gram <j.de.gram@gmail.com> | 2011-10-28 15:50:33 +0200 |
---|---|---|
committer | Joerie de Gram <j.de.gram@gmail.com> | 2011-10-28 18:04:42 +0200 |
commit | 635bcd54703a0ce4c7f2d4bab8b9d07cca04bbea (patch) | |
tree | 69505c1c76a9860e54bcfc4a57b4166464319848 /include | |
parent | 29e098630b1767f4df537276144bc1db4e9112b0 (diff) | |
download | external_libsamsung-ipc-635bcd54703a0ce4c7f2d4bab8b9d07cca04bbea.zip external_libsamsung-ipc-635bcd54703a0ce4c7f2d4bab8b9d07cca04bbea.tar.gz external_libsamsung-ipc-635bcd54703a0ce4c7f2d4bab8b9d07cca04bbea.tar.bz2 |
introduce device-specific includes, split h1/crespo gen_resp/net_regist
Diffstat (limited to 'include')
-rw-r--r-- | include/device/crespo/gen.h | 31 | ||||
-rw-r--r-- | include/device/crespo/net.h | 41 | ||||
-rw-r--r-- | include/device/h1/gen.h | 31 | ||||
-rw-r--r-- | include/device/h1/net.h | 39 | ||||
-rw-r--r-- | include/gen.h | 12 | ||||
-rw-r--r-- | include/net.h | 22 |
6 files changed, 154 insertions, 22 deletions
diff --git a/include/device/crespo/gen.h b/include/device/crespo/gen.h new file mode 100644 index 0000000..34f5ce9 --- /dev/null +++ b/include/device/crespo/gen.h @@ -0,0 +1,31 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com> + * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> + * + * 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_GEN_H__ +#define __DEVICE_CRESPO_GEN_H__ + +struct ipc_gen_phone_res { + unsigned char group, type; + unsigned char unk; + unsigned short code; +} __attribute__((__packed__)); + +#endif diff --git a/include/device/crespo/net.h b/include/device/crespo/net.h new file mode 100644 index 0000000..b6a1750 --- /dev/null +++ b/include/device/crespo/net.h @@ -0,0 +1,41 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com> + * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> + * + * 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_NET_H__ +#define __DEVICE_CRESPO_NET_H__ + +#define IPC_NET_ACCESS_TECHNOLOGY_UNKNOWN 0xff +#define IPC_NET_ACCESS_TECHNOLOGY_GSM 0x00 +#define IPC_NET_ACCESS_TECHNOLOGY_GSM2 0x01 +#define IPC_NET_ACCESS_TECHNOLOGY_GPRS 0x02 +#define IPC_NET_ACCESS_TECHNOLOGY_EDGE 0x03 +#define IPC_NET_ACCESS_TECHNOLOGY_UMTS 0x04 + +struct ipc_net_current_plmn { + char unk0; + unsigned char slevel; + char unk1; + unsigned char plmn[5]; + unsigned char type; // IPC_NET_SERVICE_TYPE_... ? + unsigned short lac; +} __attribute__((__packed__)); + +#endif diff --git a/include/device/h1/gen.h b/include/device/h1/gen.h new file mode 100644 index 0000000..f74ad55 --- /dev/null +++ b/include/device/h1/gen.h @@ -0,0 +1,31 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com> + * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> + * + * 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_GEN_H__ +#define __DEVICE_H1_GEN_H__ + +struct ipc_gen_phone_res { + unsigned char group, type; + unsigned short code; + unsigned char unk; +} __attribute__((__packed__)); + +#endif diff --git a/include/device/h1/net.h b/include/device/h1/net.h new file mode 100644 index 0000000..c2de8ec --- /dev/null +++ b/include/device/h1/net.h @@ -0,0 +1,39 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com> + * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> + * + * 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_NET_H__ +#define __DEVICE_H1_NET_H__ + +#define IPC_NET_ACCESS_TECHNOLOGY_GSM 0x01 +#define IPC_NET_ACCESS_TECHNOLOGY_GSM2 0x02 +#define IPC_NET_ACCESS_TECHNOLOGY_GPRS 0x03 +#define IPC_NET_ACCESS_TECHNOLOGY_EDGE 0x04 +#define IPC_NET_ACCESS_TECHNOLOGY_UMTS 0x05 + +struct ipc_net_current_plmn { + char unk0; + unsigned char slevel; + unsigned char plmn[6]; + unsigned char type; + unsigned short lac; +} __attribute__((__packed__)); + +#endif diff --git a/include/gen.h b/include/gen.h index aae309b..e318168 100644 --- a/include/gen.h +++ b/include/gen.h @@ -21,13 +21,13 @@ #ifndef __GEN_H__ #define __GEN_H__ -#define IPC_GEN_PHONE_RES 0x8001 +#if defined(DEVICE_CRESPO) +#include "device/crespo/gen.h" +#elif defined(DEVICE_H1) +#include "device/h1/gen.h" +#endif -struct ipc_gen_phone_res { - unsigned char group, type; - unsigned char unk; - unsigned short code; -} __attribute__((__packed__)); +#define IPC_GEN_PHONE_RES 0x8001 #endif diff --git a/include/net.h b/include/net.h index 444d52b..306433d 100644 --- a/include/net.h +++ b/include/net.h @@ -21,6 +21,12 @@ #ifndef __NET_H__ #define __NET_H__ +#if defined(DEVICE_CRESPO) +#include "device/crespo/net.h" +#elif defined(DEVICE_H1) +#include "device/h1/net.h" +#endif + #define IPC_NET_PREF_PLMN 0x0801 #define IPC_NET_PLMN_SEL 0x0802 #define IPC_NET_CURRENT_PLMN 0x0803 @@ -42,13 +48,6 @@ #define IPC_NET_PLMN_SEL_MANUAL 0x00 #define IPC_NET_PLMN_SEL_AUTO 0x01 -#define IPC_NET_ACCESS_TECHNOLOGY_UNKNOWN 0xff -#define IPC_NET_ACCESS_TECHNOLOGY_GSM 0x00 -#define IPC_NET_ACCESS_TECHNOLOGY_GSM2 0x01 -#define IPC_NET_ACCESS_TECHNOLOGY_GPRS 0x02 -#define IPC_NET_ACCESS_TECHNOLOGY_EDGE 0x03 -#define IPC_NET_ACCESS_TECHNOLOGY_UMTS 0x04 - #define IPC_NET_REGISTRATION_STATE_NONE 0x01 #define IPC_NET_REGISTRATION_STATE_HOME 0x02 #define IPC_NET_REGISTRATION_STATE_SEARCHING 0x03 @@ -59,15 +58,6 @@ #define IPC_NET_SERVICE_DOMAIN_GSM 0x02 #define IPC_NET_SERVICE_DOMAIN_GPRS 0x03 -struct ipc_net_current_plmn { - char unk0; - unsigned char slevel; - char unk1; - unsigned char plmn[5]; - unsigned char type; // IPC_NET_SERVICE_TYPE_... ? - unsigned short lac; -} __attribute__((__packed__)); - struct ipc_net_regist_set { unsigned char net; unsigned char domain; |