1 /* |
|
2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains the header file of the CPESingleCallObserver object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPESINGLECALLOBSERVER_H |
|
20 #define CPESINGLECALLOBSERVER_H |
|
21 |
|
22 //INCLUDES |
|
23 #include <mccecall.h> |
|
24 #include <mccecallobserver.h> |
|
25 #include <pevirtualengine.h> |
|
26 |
|
27 #include "cpecall.h" |
|
28 |
|
29 // CONSTANTS |
|
30 // None |
|
31 |
|
32 // MACROS |
|
33 // None |
|
34 |
|
35 // DATA TYPES |
|
36 // None. |
|
37 |
|
38 // FUNCTION PROTOTYPES |
|
39 // None. |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class MPEMessageSender; |
|
43 |
|
44 // CLASS DECLARATION |
|
45 |
|
46 /** |
|
47 * Create call handling requests to Call Command object |
|
48 * @lib CallHandling.lib |
|
49 * @since Series60_4.0 |
|
50 */ |
|
51 class CPESingleCallObserver |
|
52 : public CPECall, |
|
53 public MCCECallObserver |
|
54 { |
|
55 protected: //Constructors and descructor |
|
56 /** |
|
57 * C++ default constructor. |
|
58 */ |
|
59 CPESingleCallObserver( MPEMessageSender& aOwner ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CPESingleCallObserver(); |
|
65 |
|
66 public: // from MCCECallObserver |
|
67 |
|
68 /** |
|
69 * Call errors are notified using this interface. |
|
70 * |
|
71 * @since S60 v3.2 |
|
72 * @param aError Occurred error as integer, |
|
73 * return none |
|
74 */ |
|
75 IMPORT_C void ErrorOccurred( const TCCPError aError ); |
|
76 |
|
77 /** |
|
78 * Call state notificfation. |
|
79 * TODO: The observer need to verify the correctness of given state. |
|
80 * CCE will do at least basic call state change checking but also the client |
|
81 * needs to verify the correctness. |
|
82 * |
|
83 * @since S60 v3.2 |
|
84 * @param aState New state of the call |
|
85 * return none |
|
86 */ |
|
87 IMPORT_C void CallStateChanged( const CCPCall::TCallState aState ); |
|
88 |
|
89 /** |
|
90 * The state of the call has changed with inband tone, meaning network is not playing |
|
91 * the tone relating to the state. |
|
92 * @since S60 3.2 |
|
93 * @param aState Call state. |
|
94 * @return none |
|
95 */ |
|
96 IMPORT_C void CallStateChangedWithInband( const CCPCall::TCallState aState ); |
|
97 |
|
98 /** |
|
99 * An event for the call has occurred. |
|
100 * TODO: the observer need to verify event correcness. |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 * @param aEvent Occurred call event |
|
104 * return none |
|
105 */ |
|
106 IMPORT_C void CallEventOccurred( const MCCECallObserver::TCCECallEvent aEvent ); |
|
107 |
|
108 /** |
|
109 * Notifies observer the change in call duration. |
|
110 * |
|
111 * @since S60 v3.2 |
|
112 * @param aDuration Duration of the call in seconds |
|
113 * return none |
|
114 */ |
|
115 IMPORT_C void CallDurationChanged( const TTimeIntervalSeconds aDuration ); |
|
116 |
|
117 /** |
|
118 * Notifies observer about the changes in call control caps. |
|
119 * |
|
120 * @since S60 v3.2 |
|
121 * @param aCaps Contains updated call control capability flags |
|
122 * return none |
|
123 */ |
|
124 IMPORT_C void CallCapsChanged( const MCCECallObserver::TCCECallControlCaps aCaps ); |
|
125 |
|
126 /** |
|
127 * Notifies observer about transfer made by remote end |
|
128 * |
|
129 * @since S60 v3.2 |
|
130 * @param aAttended ETrue: if transfer type is attended, EFalse: type is unattended |
|
131 * @param aDestination Address where the call is to be transferred. Given as received in CCE |
|
132 * observer needs to verify the address, e.g. it can be KNullDesC. |
|
133 * TODO anonymous transfer target - quess cannot be occurring? |
|
134 * A-B -> B-C, C has requested anonymity in network??? |
|
135 */ |
|
136 IMPORT_C void HandleTransfer( const TBool aAttended, |
|
137 const TDesC& aDestination ); |
|
138 |
|
139 public: //New functions |
|
140 |
|
141 /** |
|
142 * Returns call duration time |
|
143 * @param aDuration the duration value of the call |
|
144 */ |
|
145 void GetCallDuration( TTimeIntervalSeconds& aDuration ); |
|
146 |
|
147 /** |
|
148 * Returns call control capabilities |
|
149 * @param aCallControlCaps call control capabilities |
|
150 */ |
|
151 void GetCallControlCaps( |
|
152 MCCECallObserver::TCCECallControlCaps& aCallControlCaps ) const; |
|
153 |
|
154 /** |
|
155 * Returns the reference to the call object handle. Handle is owned by a derived object. |
|
156 * @return Reference to the call object handle |
|
157 */ |
|
158 MCCECall& Call(); |
|
159 |
|
160 /** |
|
161 * Sets the reference to the call object handle. Handle is owned by a derived object. |
|
162 * @return Reference to the call object handle |
|
163 */ |
|
164 void SetCall( MCCECall& aCall ); |
|
165 |
|
166 /** |
|
167 * Sets Missed call indicator. |
|
168 * @param aMissed, Missed call indicator. |
|
169 * @return KErrNone. |
|
170 */ |
|
171 virtual void SetMissedCall( TBool aMissed ) = 0; |
|
172 |
|
173 /** |
|
174 * Returns transfer target from last received unattended transfer |
|
175 * request. |
|
176 * @return Transfer target. |
|
177 */ |
|
178 const TPEPhoneNumber& UnattendedTransferTarget() const; |
|
179 |
|
180 /** |
|
181 * Returns array of possible addresses from the received call forward |
|
182 * request or NULL if addresses are not available. |
|
183 * @return Address array. |
|
184 */ |
|
185 const CDesC8Array* ForwardAddressChoices() const; |
|
186 |
|
187 protected: |
|
188 |
|
189 // Includes dialled number |
|
190 TPEPhoneNumber iDialledNumber; // Mihin tätä on tarkoitus käyttää? |
|
191 // Call duration time. |
|
192 TTimeIntervalSeconds iDuration; |
|
193 // iControlCaps contains the new capabilities |
|
194 MCCECallObserver::TCCECallControlCaps iControlCaps; |
|
195 // handle to mobile call object |
|
196 MCCECall* iCall; |
|
197 |
|
198 /** |
|
199 * Transfer target from previous last unattended transfer reqeust. |
|
200 */ |
|
201 TPEPhoneNumber iTransferTarget; |
|
202 }; |
|
203 |
|
204 #endif // CPESINGLECALLOBSERVER_H |
|
205 |
|
206 // End of File |
|