4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef __TYPE_MODEM_H__
22 #define __TYPE_MODEM_H__
26 #define MODEM_DEVICE_SN_LEN_MAX 13
27 #define MODEM_DEVICE_MEID_LEN_MAX 17
28 #define MODEM_DEVICE_IMEI_LEN_MAX 17
29 #define MODEM_DEVICE_IMEISV_LEN_MAX 17
32 MODEM_STATE_UNKNOWN = -1,
33 MODEM_STATE_ONLINE = 0,
37 MODEM_STATE_MAX = MODEM_STATE_LOW,
39 /* internal states (not to be published) */
44 enum modem_dun_pincontrol_signal {
45 DUN_PINCONTROL_SIGNAL_DCD = 0x01,
46 DUN_PINCONTROL_SIGNAL_DTR = 0x04,
47 DUN_PINCONTROL_SIGNAL_DSR = 0x06,
48 DUN_PINCONTROL_SIGNAL_RTS = 0x07,
49 DUN_PINCONTROL_SIGNAL_CTS = 0x08,
50 DUN_PINCONTROL_SIGNAL_RI = 0x09
53 enum modem_dun_pincontrol_status {
54 DUN_PINCONTROL_STATUS_OFF = 0x00,
55 DUN_PINCONTROL_STATUS_ON = 0x01,
58 struct treq_modem_power_on {
61 struct treq_modem_power_off {
64 struct treq_modem_power_reset {
67 struct treq_modem_power_low {
70 struct treq_modem_set_flightmode {
74 struct treq_modem_get_flightmode {
77 struct treq_modem_get_imei {
80 struct treq_modem_get_version {
83 struct treq_modem_get_sn {
86 struct treq_modem_set_dun_pin_control {
87 enum modem_dun_pincontrol_signal signal;
88 enum modem_dun_pincontrol_status status;
92 struct tresp_modem_power_on {
96 struct tresp_modem_power_off {
100 struct tresp_modem_power_reset {
104 struct tresp_modem_power_low {
108 struct tresp_modem_set_flightmode {
112 struct tresp_modem_get_flightmode {
117 struct tresp_modem_get_imei {
119 char imei[MODEM_DEVICE_IMEI_LEN_MAX];
122 struct tresp_modem_get_version {
126 char calibration[33];
127 char product_code[33];
128 char prl_version[18];
129 char eri_version[18];
132 struct tresp_modem_get_sn {
134 char sn[MODEM_DEVICE_SN_LEN_MAX];
135 char meid[MODEM_DEVICE_MEID_LEN_MAX];
136 char imei[MODEM_DEVICE_IMEI_LEN_MAX];
137 char imeisv[MODEM_DEVICE_IMEISV_LEN_MAX];
140 struct tresp_modem_set_dun_pin_control {
144 struct tnoti_modem_power {
145 enum modem_state state;
148 struct tnoti_modem_flight_mode {
152 struct tnoti_modem_dun_pin_control {
153 enum modem_dun_pincontrol_signal signal;
154 enum modem_dun_pincontrol_status status;
157 struct tnoti_modem_dun_external_call {
160 struct tnoti_modem_bootup {