sync with master
[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.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://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<CallInfo>& 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<CallInfo>& pCallList) = 0;
53
54         /**
55          * This function is called when two calls are joined and a conference call is setup.
56          *
57          * @param[in]           pCallInfo       -       The conference call information data.
58          */
59         virtual void HandleConferenceCall(CallInfo& pCallInfo) = 0;
60
61         /**
62          * This function is called when incoming call is received.
63          *
64          * @param[in]           pCallInfo       -       The conference call information data.
65          */
66         virtual void HandleIncomingCall(CallInfo& pCallInfo) = 0;
67
68         /**
69          * Called when the dialed call / incoming call is accepted.
70          * Implement this to handle voice call events.
71          * @param[out]          pCallList       -       list of active calls.
72          */
73         virtual void HandleCallSwapOccured(Tizen::Base::Collection::IListT<CallInfo>& pCallList) = 0;
74
75         /**
76          * Called when the conference list changes.
77          * Implement this to handle voice call events.
78          * @param[out]          pCallInfo       -       The conference call information data.
79          */
80         virtual void HandleConferenceChange(void) = 0;
81
82         /**
83          * Telephony event callback sent to listeners to handle
84          * error and show customized error message.
85          * @ param[out]         errorCode - error cause returned by SLP TAPI.
86          */
87         virtual void HandleTelephonyError(int errorCode) = 0;
88 };
89
90 #endif // _PHN_I_TELEPHONY_EVENT_LISTENER_H_