diff options
-rw-r--r-- | Android.mk | 1 | ||||
-rw-r--r-- | include/device/crespo/gen.h | 5 | ||||
-rw-r--r-- | include/device/h1/gen.h | 3 | ||||
-rw-r--r-- | include/gen.h | 2 | ||||
-rw-r--r-- | samsung-ipc/Makefile.am | 1 | ||||
-rw-r--r-- | samsung-ipc/gen.c | 39 |
6 files changed, 48 insertions, 3 deletions
@@ -11,6 +11,7 @@ samsung-ipc_files := \ samsung-ipc/ipc.c \ samsung-ipc/ipc_util.c \ samsung-ipc/util.c \ + samsung-ipc/gen.c \ samsung-ipc/gprs.c \ samsung-ipc/misc.c \ samsung-ipc/net.c \ diff --git a/include/device/crespo/gen.h b/include/device/crespo/gen.h index 131ada3..0e69260 100644 --- a/include/device/crespo/gen.h +++ b/include/device/crespo/gen.h @@ -23,8 +23,9 @@ #define __DEVICE_CRESPO_GEN_H__ struct ipc_gen_phone_res { - unsigned char group, type; - unsigned char unk; + unsigned char group; + unsigned char index; + unsigned char type; unsigned short code; } __attribute__((__packed__)); diff --git a/include/device/h1/gen.h b/include/device/h1/gen.h index 519f207..b4af515 100644 --- a/include/device/h1/gen.h +++ b/include/device/h1/gen.h @@ -23,7 +23,8 @@ #define __DEVICE_H1_GEN_H__ struct ipc_gen_phone_res { - unsigned char group, type; + unsigned char group; + unsigned char index; unsigned short code; unsigned char unk; } __attribute__((__packed__)); diff --git a/include/gen.h b/include/gen.h index a7cc2e1..0a83104 100644 --- a/include/gen.h +++ b/include/gen.h @@ -29,6 +29,8 @@ #define IPC_GEN_PHONE_RES 0x8001 +int ipc_gen_phone_res_check(struct ipc_gen_phone_res *res); + #endif // vim:ts=4:sw=4:expandtab diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am index cee8d28..0a6e595 100644 --- a/samsung-ipc/Makefile.am +++ b/samsung-ipc/Makefile.am @@ -21,6 +21,7 @@ libsamsung_ipc_la_SOURCES = \ \ misc.c \ sec.c \ + gen.c \ gprs.c \ call.c \ net.c \ diff --git a/samsung-ipc/gen.c b/samsung-ipc/gen.c new file mode 100644 index 0000000..de5cfd7 --- /dev/null +++ b/samsung-ipc/gen.c @@ -0,0 +1,39 @@ +/** + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2011 Paul Kocialkowsk <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/>. + * + */ + +#include <radio.h> + +int ipc_gen_phone_res_check(struct ipc_gen_phone_res *res) +{ + if(res == NULL) + return -1; + + switch(res->code) + { + case 0x8000: + return 0; + case 0x8001: + return 0; + default: + return -1; + } +} + +// vim:ts=4:sw=4:expandtab |