Make TIZEN 2.0
[apps/home/call.git] / call-engine / include / voice-call-service.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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
18 #ifndef _VOICE_CALL_SERVICE_H_
19 #define _VOICE_CALL_SERVICE_H_
20
21 #include "voice-call-core.h"
22 #include "voice-call-engine-msg.h"
23
24 /**
25 * This struct defines a contact record information for voice-call
26 */
27 typedef struct {
28         unsigned int ct_index;                                          /**<Specifies the index for a record  */
29         int phone_type;                                                         /**<Specified the phone type */
30         int     bday_remaining_days;                                    /**<Specifies the remaining days for the birthday */
31         char display_name[VC_DISPLAY_NAME_LENGTH_MAX];                                    /**<Specifies the display name character data of a record in the contact table. */
32         char caller_id_path[VC_IMAGE_PATH_LENGTH_MAX];                                    /**<CTS_IMG_NORMAL><Specifies the caller id path of a record in the contact table. */
33         char caller_full_id_path[VC_IMAGE_PATH_LENGTH_MAX];                                    /**<CTS_IMG_FULL>*/
34         char ring_tone[VC_RINGTONE_PATH_LENGTH_MAX];                                            /**<Specifies the ring tone character data of a record in the contact table. */
35 } voicecall_contact_info_t;
36
37 /**
38  * This function gets  contact info from phone number
39  *
40  * @return              gboolean
41  * @param[in]           phonenumber             phone number            
42  * @param[out]  ct_info                 contact info
43  */
44 gboolean voicecall_service_contact_info_by_number(char *phonenumber, voicecall_contact_info_t * ct_info);
45
46 /**
47  * This function gets  contact info from contact id
48  *
49  * @return              gboolean
50  * @param[in]           phonenumber             phone number            
51  * @param[in]           contact_id              contact id
52  * @param[in]           storage_type            storage type 
53  * @param[out]  ct_info                 contact info
54  */
55 gboolean voicecall_service_contact_info_by_contact_id(char *phonenumber, int contact_id, voicecall_contact_info_t * ct_info);
56
57 /**
58  * This function on the loud speaker state
59  *
60  * @return              gboolean
61  * @param[in]           pcall_core              Handle to voicecall core                
62  */
63 gboolean voicecall_service_loudspeaker_on(call_vc_core_state_t *pcall_core);
64
65 /**
66  * This function off the loud speaker state
67  *
68  * @return              gboolean
69  * @param[in]           pcall_core              Handle to voicecall core                
70  */
71 gboolean voicecall_service_loudspeaker_off(call_vc_core_state_t *pcall_core);
72
73 /**
74  * This function is mute on
75  *
76  * @return              gboolean
77  * @param[in]           pcall_core              Handle to voicecall core                
78  */
79 gboolean voicecall_service_mute_status_on(call_vc_core_state_t *pcall_core);
80
81 /**
82  * This function is mute off
83  *
84  * @return              gboolean
85  * @param[in]           pcall_core              Handle to voicecall core                
86  */
87 gboolean voicecall_service_mute_status_off(call_vc_core_state_t *pcall_core);
88
89 /**
90  * This function set volume level.
91  *
92  * @return              Returns TRUE on success or FALSE on failure
93  * @param[in]           pcall_core                      Handle to voicecall core                
94  * @param[in]           vol_alert_type                  volume alert type
95  * @param[in]           volume_level                    volume level to be set
96  */
97 gboolean voicecall_service_set_volume(call_vc_core_state_t *pcall_core, voicecall_snd_volume_alert_type_t vol_alert_type, int volume_level);
98
99 #endif