Initialize Tizen 2.3
[apps/osp/Call.git] / inc / CallITelephonyEventListener.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (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://floralicense.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  * @file                CallITelephonyEventListener.h
19  * @brief               This is the header file for the %ITelephonyEventListener class.
20  *
21  * This header file contains the declarations for %ITelephonyEventListener class.
22  */
23 #ifndef _PHN_I_TELEPHONY_EVENT_LISTENER_H_
24 #define _PHN_I_TELEPHONY_EVENT_LISTENER_H_
25
26 #include "CallInfo.h"
27
28 /**
29  * @class ITelephonyEventListener
30  * @brief This interface is used to listen to events from Telephony Manager.
31  *
32  */
33 class ITelephonyEventListener
34 {
35 public:
36         virtual ~ITelephonyEventListener(void){};
37
38         /**
39          * Called when the dialed call / incoming call is accepted.
40          * Implement this to handle voice call events.
41          * @param[out]          pCallList       -       list of active calls.
42          */
43         virtual void HandleCallConnected(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
44
45         /**
46          * This function is called when a call is disconnected. It returns the list of active calls, if any is existing.
47          * Otherwise it returns the last ended call along with call duration and cause to show.
48          *
49          * @param[out]          isLastCall      -       true, if this call was last call.
50          * @param[out]          pCallList       -       list of calls - ended Call if last call, otherwise currently active call.
51          */
52         virtual void HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
53
54         /**
55          * This function is called when a call is held. It returns the list of active calls
56          *
57          * @param[out]          isHeld  -       true for currently held call
58          */
59         virtual void HandleCallHeld(bool isHeld) = 0;
60         /**
61         * This function is called when a call is active. It returns the list of active calls
62         *
63         * @param[out]           isActive        -       true for currently active call
64         */
65         virtual void HandleCallActive(bool isActive) = 0;
66         /**
67          * This function is called when two calls are joined and a conference call is setup.
68          *
69          * @param[in]           pCallInfo       -       The conference call information data.
70          */
71         virtual void HandleConferenceCall(AppCallInfo& pCallInfo) = 0;
72
73         /**
74          * This function is called when incoming call is received.
75          *
76          * @param[in]           pCallInfo       -       The conference call information data.
77          */
78         virtual void HandleIncomingCall(AppCallInfo& pCallInfo) = 0;
79
80         /**
81          * Called when the dialed call / incoming call is accepted.
82          * Implement this to handle voice call events.
83          * @param[out]          pCallList       -       list of active calls.
84          */
85         virtual void HandleCallSwapOccured(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
86
87         /*
88          * Called when the conference call is held.
89          * Implement this to handle voice call events.
90          * @param[out]          success         -       If true then the conference call is successfully held else not.
91          */
92         virtual void HandleConfCallHoldOccured(bool success) = 0;
93
94         /*
95          * Called when the conference call is active.
96          * Implement this to handle voice call events.
97          * @param[out]          success         -       If true then the conference call is successfully active
98          */
99         virtual void HandleConfCallActiveOccured(bool success) = 0;
100
101         /**
102          * Called when the conference list changes.
103          * Implement this to handle voice call events.
104          * @param[out]          pCallInfo       -       The conference call information data.
105          */
106         virtual void HandleConferenceChange(void) = 0;
107
108         /**
109          * Telephony event callback sent to listeners to handle
110          * error and show customized error message.
111          * @ param[out]         errorCode - error cause returned by SLP TAPI.
112          */
113         virtual void HandleTelephonyError(int errorCode) = 0;
114 };
115
116 #endif // _PHN_I_TELEPHONY_EVENT_LISTENER_H_