upload tizen1.0 source
[framework/telephony/libslp-tapi.git] / include / tapi / ITapiPower.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 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 /**
22  * @internal
23  * @ingroup             TelephonyAPI
24  * @addtogroup  POWER_TAPI      POWER
25  * @{
26  *
27  * These APIs allow an application to accomplish the following services: @n
28  * - Process power command @n
29  * - Reset the phone power (on / off), @n
30  * - Process airplane mode @n
31  */
32
33 #ifndef _ITAPI_POWER_H_
34 #define _ITAPI_POWER_H_
35
36 #include <TelDefines.h>
37 #include <TelUtility.h>
38 #include <TelPower.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /**
45  *
46  * @brief  This API is used to turn power off or on the modem.
47  *
48  * @par Sync (or) Async:
49  * This is a Synchronous API.
50  *
51  * @par Important Notes:
52  * -NONE
53  *
54  * @warning
55  * - None.
56  *
57  * @param [in] cmd
58  * - This index value is the power command as #tapi_power_phone_cmd_t.
59  *
60  * @param [out]
61  *   - None
62  *
63  * @par Async Response Message:
64  * - None
65  *
66  *
67  * @pre
68  *  - None.
69  *
70  * @post
71  *  - None.
72  *
73  * @return Return Type (int) \n
74  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
75  * - Otherwise it provides an error code (Refer #TapiResult_t)
76  *
77  * @par Prospective Clients:
78  * External Apps.
79  *
80  *
81  */
82 int tel_process_power_command(tapi_power_phone_cmd_t cmd);
83
84 /**
85  *
86  * @brief  This API is used to enter or leave airplane mode
87  *
88  * @par Sync (or) Async:
89  * This is a Asynchronous API.
90  *
91  * @par Important Notes:
92  * -NONE
93  *
94  * @warning
95  * - None.
96  *
97  * @param [in] mode
98  * - This mode value is the flight flag #tapi_power_flight_mode_type_t.
99  *
100  * @param [out]
101  *   - None
102  *
103  * @par Async Response Message:
104  * The event associated is TAPI_EVENT_POWER_FLIGHT_MODE_RESP  and the event data is #tapi_power_flight_mode_resp_type_t.
105  * Asynchronous return status is always TAPI_API_SUCCESS.
106  *
107  * @pre
108  *  - None.
109  *
110  * @post
111  *  - None.
112  *
113  * @return Return Type (int) \n
114  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
115  * - Otherwise it provides an error code (Refer #TapiResult_t)
116  *
117  * @par Prospective Clients:
118  * External Apps.
119  *
120  *
121  */
122 int tel_set_flight_mode(tapi_power_flight_mode_type_t mode);
123
124 /**
125  *
126  * @brief  This API is used to reset modem
127  *
128  * @par Sync (or) Async:
129  * This is a Synchronous API.
130  *
131  * @par Important Notes:
132  * -NONE
133  *
134  * @warning
135  * - None.
136  *
137  * @param [in]
138  * - None
139  *
140  * @param [out]
141  *   - None
142  *
143  * @par Async Response Message:
144  * - None
145  *
146  *
147  * @pre
148  *  - None.
149  *
150  * @post
151  *  - None.
152  *
153  * @return Return Type (int) \n
154  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
155  * - Otherwise it provides an error code (Refer #TapiResult_t)
156  *
157  * @par Prospective Clients:
158  * External Apps.
159  *
160  *
161  */
162 int tel_reset_modem(void);
163
164 /**
165  *
166  * @brief  This API is used to get the ramdump file of modem. Modem's ramdump file is created under /opt/media/ramdump/
167  *
168  * @par Sync (or) Async:
169  * This is a Synchronous API.
170  *
171  * @par Important Notes:
172  * -NONE
173  *
174  * @warning
175  * - None.
176  *
177  * @param [in]
178  * - None
179  *
180  * @param [out]
181  *   - None
182  *
183  * @par Async Response Message:
184  * - None
185  *
186  *
187  * @pre
188  *  - None.
189  *
190  * @post
191  *  - None.
192  *
193  * @return Return Type (int) \n
194  * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
195  * - Otherwise it provides an error code (Refer #TapiResult_t)
196  *
197  * @par Prospective Clients:
198  * External Apps.
199  *
200  *
201  */
202 int tel_enforce_ramdump_of_modem(void);
203
204 #ifdef __cplusplus
205 }
206 #endif
207
208 #endif  /* _ITAPI_POWER_H_ */
209
210 /**
211  * @}
212  */