tizen 2.4 release
[framework/api/telephony.git] / include / telephony_modem.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __CAPI_TELEPHONY_MODEM_H__
18 #define __CAPI_TELEPHONY_MODEM_H__
19
20 /**
21  * @file telephony_modem.h
22  * @brief This file contains modem APIs.
23  */
24
25 #include "telephony_common.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**
32  * @addtogroup CAPI_TELEPHONY_INFORMATION_MODEM
33  * @{
34  */
35
36 /**
37  * @brief Enumeration for Modem Power Status.
38  * @since_tizen 2.4
39  */
40 typedef enum
41 {
42     TELEPHONY_MODEM_POWER_STATUS_UNKNOWN = -1, /**< Unknown*/
43     TELEPHONY_MODEM_POWER_STATUS_ON, /**< Modem power ON */
44     TELEPHONY_MODEM_POWER_STATUS_OFF,     /**< Modem power OFF */
45     TELEPHONY_MODEM_POWER_STATUS_RESET, /**< Modem power RESET */
46     TELEPHONY_MODEM_POWER_STATUS_LOW,    /**< Modem power LOW */
47 } telephony_modem_power_status_e;
48
49 /**
50  * @brief Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone.
51  * @details The IMEI number is used by a GSM network to identify valid devices
52  *          and therefore can be used for stopping a stolen phone from accessing that network.
53  *
54  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
55  * @privlevel public
56  * @privilege %http://tizen.org/privilege/telephony
57  *
58  * @remarks You must release @c imei using free().
59  *
60  * @param[in] handle The handle from telephony_init()
61  * @param[out] imei The International Mobile Station Equipment Identity
62  *
63  * @return @c 0 on success,
64  *         otherwise a negative error value
65  *
66  * @retval #TELEPHONY_ERROR_NONE              Successful
67  * @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter
68  * @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied
69  * @retval #TELEPHONY_ERROR_NOT_SUPPORTED     Not supported
70  * @retval #TELEPHONY_ERROR_OPERATION_FAILED  Operation failed
71  */
72 int telephony_modem_get_imei(telephony_h handle, char **imei);
73
74 /**
75  * @brief Gets the power status of the modem
76  *
77  * @since_tizen 2.4
78  * @privlevel public
79  * @privilege %http://tizen.org/privilege/telephony
80  *
81  * @param[in] handle The handle from telephony_init()
82  * @param[out] status The Modem power status (0=on,1=off,2=reset,3=low)
83  *
84  * @return @c 0 on success,
85  *         otherwise a negative error value
86  *
87  * @retval #TELEPHONY_ERROR_NONE              Successful
88  * @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter
89  * @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied
90  * @retval #TELEPHONY_ERROR_NOT_SUPPORTED     Not supported
91  * @retval #TELEPHONY_ERROR_OPERATION_FAILED  Operation failed
92  */
93 int telephony_modem_get_power_status(telephony_h handle,
94         telephony_modem_power_status_e *status);
95
96 /**
97  * @}
98  */
99
100 #ifdef __cplusplus
101 }
102 #endif
103
104 #endif // __CAPI_TELEPHONY_MODEM_H__