tizen 2.3 release
[framework/api/telephony.git] / include / telephony_call.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_CALL_H__
18 #define __CAPI_TELEPHONY_CALL_H__
19
20 /**
21  * @file telephony_call.h
22  * @brief This file contains call APIs and related enumeration.
23  */
24
25 #include "telephony_common.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**
32  * @addtogroup CAPI_TELEPHONY_INFORMATION_CALL
33  * @{
34  */
35
36 /**
37  * @brief Enumeration for the call state.
38  * @since_tizen 2.3
39  */
40 typedef enum
41 {
42     TELEPHONY_CALL_STATE_IDLE,       /**< There exists no calls. */
43     TELEPHONY_CALL_STATE_CONNECTING, /**< There exists at least one call that is dialing, alerting or incoming */
44     TELEPHONY_CALL_STATE_CONNECTED,  /**< There exist active or held calls, and no calls are dialing, alerting or incoming*/
45 } telephony_call_state_e;
46
47 /**
48  * @brief Gets the voice call state of the telephony service.
49  * @details Determines if the voice call is connecting, connected, or idle.
50  *
51  * @since_tizen 2.3
52  * @privlevel public
53  * @privilege %http://tizen.org/privilege/telephony
54  *
55  * @remarks When you are dialing a number or a new voice call is ringing,
56  *          the state of the voice call is #TELEPHONY_CALL_STATE_CONNECTING.
57  *          When a new voice call is connecting while another voice call is already connected,
58  *          the state of the voice call is #TELEPHONY_CALL_STATE_CONNECTING as well.
59  *
60  * @param[in] handle The handle from telephony_init()
61  * @param[out] call_state The current state of the voice call
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_call_get_voice_call_state(telephony_h handle, telephony_call_state_e *call_state);
73
74 /**
75  * @brief Gets the video call state of the telephony service.
76  * @details Determines if the video call is connecting, connected, or idle.
77  *
78  * @since_tizen 2.3
79  * @privlevel public
80  * @privilege %http://tizen.org/privilege/telephony
81  *
82  * @remarks When you are dialing a number or a new video call is ringing,
83  *          the state of the video call is #TELEPHONY_CALL_STATE_CONNECTING.
84  *          If a video call is connected, then the state of any other call cannot be
85  *          #TELEPHONY_CALL_STATE_CONNECTING and #TELEPHONY_CALL_STATE_CONNECTED.
86  *
87  * @param[in] handle The handle from telephony_init()
88  * @param[out] call_state The current state of the video call
89  *
90  * @return @c 0 on success,
91  *         otherwise a negative error value
92  *
93  * @retval #TELEPHONY_ERROR_NONE              Successful
94  * @retval #TELEPHONY_ERROR_INVALID_PARAMETER Invalid parameter
95  * @retval #TELEPHONY_ERROR_PERMISSION_DENIED Permission denied
96  * @retval #TELEPHONY_ERROR_NOT_SUPPORTED     Not supported
97  * @retval #TELEPHONY_ERROR_OPERATION_FAILED  Operation failed
98  */
99 int telephony_call_get_video_call_state(telephony_h handle, telephony_call_state_e *call_state);
100
101 /**
102  * @}
103  */
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif // __CAPI_TELEPHONY_CALL_H__