tizen 2.3.1 release
[framework/telephony/libtcore.git] / include / type / modem.h
1 /*
2  * libtcore
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 #ifndef __TYPE_MODEM_H__
22 #define __TYPE_MODEM_H__
23
24 __BEGIN_DECLS
25
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
30
31 enum modem_state {
32         MODEM_STATE_UNKNOWN = -1,
33         MODEM_STATE_ONLINE = 0,
34         MODEM_STATE_OFFLINE,
35         MODEM_STATE_RESET,
36         MODEM_STATE_LOW,
37         MODEM_STATE_MAX = MODEM_STATE_LOW,
38
39         /* internal states (not to be published) */
40         MODEM_STATE_ERROR,
41         MODEM_STATE_RESUME
42 };
43
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
51 };
52
53 enum modem_dun_pincontrol_status {
54         DUN_PINCONTROL_STATUS_OFF = 0x00,
55         DUN_PINCONTROL_STATUS_ON = 0x01,
56 };
57
58 struct treq_modem_power_on {
59 };
60
61 struct treq_modem_power_off {
62 };
63
64 struct treq_modem_power_reset {
65 };
66
67 struct treq_modem_power_low {
68 };
69
70 struct treq_modem_set_flightmode {
71         int enable;
72 };
73
74 struct treq_modem_get_flightmode {
75 };
76
77 struct treq_modem_get_imei {
78 };
79
80 struct treq_modem_get_version {
81 };
82
83 struct treq_modem_get_sn {
84 };
85
86 struct treq_modem_set_dun_pin_control {
87         enum modem_dun_pincontrol_signal signal;
88         enum modem_dun_pincontrol_status status;
89 };
90
91
92 struct tresp_modem_power_on {
93         TReturn result;
94 };
95
96 struct tresp_modem_power_off {
97         TReturn result;
98 };
99
100 struct tresp_modem_power_reset {
101         TReturn result;
102 };
103
104 struct tresp_modem_power_low {
105         TReturn result;
106 };
107
108 struct tresp_modem_set_flightmode {
109         TReturn result;
110 };
111
112 struct tresp_modem_get_flightmode {
113         TReturn result;
114         int enable;
115 };
116
117 struct tresp_modem_get_imei {
118         TReturn result;
119         char imei[MODEM_DEVICE_IMEI_LEN_MAX];
120 };
121
122 struct tresp_modem_get_version {
123         TReturn result;
124         char software[33];
125         char hardware[33];
126         char calibration[33];
127         char product_code[33];
128         char prl_version[18];
129         char eri_version[18];
130 };
131
132 struct tresp_modem_get_sn {
133         TReturn result;
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];
138 };
139
140 struct tresp_modem_set_dun_pin_control {
141         int result;
142 };
143
144 struct tnoti_modem_power {
145         enum modem_state state;
146 };
147
148 struct tnoti_modem_flight_mode {
149         int enable;
150 };
151
152 struct tnoti_modem_dun_pin_control {
153         enum modem_dun_pincontrol_signal signal;
154         enum modem_dun_pincontrol_status status;
155 };
156
157 struct tnoti_modem_dun_external_call {
158 };
159
160 struct tnoti_modem_bootup {
161         void *plugin;
162 };
163
164 __END_DECLS
165
166 #endif