|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Implementation for call object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCCECONFERENCECALL_H |
|
20 #define CCCECONFERENCECALL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <cccpcallparameters.h> |
|
24 |
|
25 #include "mcceconferencecall.h" // MCCEConferenceCall |
|
26 #include "mccpconferencecallobserver.h" // MCCPConferenceCallObserver |
|
27 |
|
28 class CCCECall; |
|
29 class MCCPConferenceCall; |
|
30 class CCCECallContainer; |
|
31 class CCCEPluginManager; |
|
32 class CCCEDurationTimer; |
|
33 |
|
34 /** |
|
35 * Internal conference call object |
|
36 * |
|
37 * This object contains logic for conference call |
|
38 * |
|
39 * @lib cce.dll |
|
40 * @since S60 v3.2 |
|
41 */ |
|
42 NONSHARABLE_CLASS(CCCEConferenceCall) : public CBase, |
|
43 public MCCEConferenceCall, |
|
44 public MCCPConferenceCallObserver |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * @param aCallContainer Reference to call container |
|
51 * @param aPluginManager Reference to plugin manager |
|
52 */ |
|
53 static CCCEConferenceCall* NewL( |
|
54 CCCECallContainer& aCallContainer, |
|
55 CCCEPluginManager& aPluginManager ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CCCEConferenceCall(); |
|
61 |
|
62 public: |
|
63 /** |
|
64 * Returns state of conferencecall |
|
65 * |
|
66 * @since S60 v3.2 |
|
67 * @return State |
|
68 */ |
|
69 MCCEConferenceCallObserver::TCCEConferenceCallState State() const; |
|
70 |
|
71 /** |
|
72 * Return implementation uid of conferencecall |
|
73 * |
|
74 * @since S60 v3.2 |
|
75 * @return Implementation uid |
|
76 */ |
|
77 TUid ImplementationUid() const; |
|
78 |
|
79 /** |
|
80 * Checks if referenced call is part of conference. |
|
81 * |
|
82 * @since S60 v3.2 |
|
83 * @param Reference to call to be checked |
|
84 * @return ETrue if aCall is member of conference |
|
85 */ |
|
86 TBool IsPartOfConference( CCCECall& aCall ); |
|
87 |
|
88 /** |
|
89 * Sets plugin originated conference call |
|
90 * |
|
91 * @since S60 v3.2 |
|
92 * @param Reference to ongoig conference call |
|
93 * @param ImplementationUid of plug-in which created |
|
94 * this conference call |
|
95 * @return Error code |
|
96 */ |
|
97 TInt SetOngoingConferenceCall( |
|
98 MCCPConferenceCall& aConferenceCall, |
|
99 TUid aImplementationUid ); |
|
100 |
|
101 // from base class MCCEConferenceCall |
|
102 |
|
103 /** @see MCCEConferenceCall::EnumerateCalls */ |
|
104 TInt EnumerateCalls(); |
|
105 |
|
106 /** @see MCCEConferenceCall::Swap */ |
|
107 TInt Swap(); |
|
108 |
|
109 /** @see MCCEConferenceCall::SetObserver */ |
|
110 void SetObserver( const MCCEConferenceCallObserver& aObserver ); |
|
111 |
|
112 /** @see MCCEConferenceCall::HangUp */ |
|
113 TInt HangUp(); |
|
114 |
|
115 /** @see MCCECall::CallDuration */ |
|
116 TTimeIntervalSeconds CallDuration() const; |
|
117 |
|
118 /** @see MCCECall::Parameters */ |
|
119 const CCCPCallParameters& Parameters() const; |
|
120 |
|
121 |
|
122 private: |
|
123 |
|
124 // from base class MCCEConferenceCall |
|
125 |
|
126 /** @see MCCEConferenceCall::Release */ |
|
127 TInt Release(); |
|
128 |
|
129 /** @see MCCEConferenceCall::ServiceId */ |
|
130 TUint32 ServiceId() const; |
|
131 |
|
132 /** @see MCCEConferenceCall::AddCallL */ |
|
133 void AddCallL( MCCECall& aCall ); |
|
134 |
|
135 /** @see MCCEConferenceCall::RemoveCallL */ |
|
136 void RemoveCallL( MCCECall& aCall ); |
|
137 |
|
138 /** @see MCCEConferenceCall::Caps */ |
|
139 MCCEConferenceCallObserver::TCCEConferenceCallCaps Caps() const; |
|
140 |
|
141 /** @see MCCEConferenceCall::GoOneToOneL */ |
|
142 void GoOneToOneL( MCCECall& aCall ); |
|
143 |
|
144 /** @see MCCEConferenceCall::GetCallArray */ |
|
145 TInt GetCallArray( RPointerArray<MCCECall>& aCallArray ); |
|
146 private: |
|
147 |
|
148 // from MCCPConferenceCallObserver |
|
149 |
|
150 /** @see MCCPConferenceCallObserver::ErrorOccurred */ |
|
151 void ErrorOccurred( const TCCPConferenceCallError aError ); |
|
152 |
|
153 /** @see MCCPConferenceCallObserver::ConferenceCallCapsChanged */ |
|
154 void ConferenceCallCapsChanged( |
|
155 const TCCPConferenceCallCaps aCaps ); |
|
156 |
|
157 /** @see MCCPConferenceCallObserver::ConferenceCallStateChanged */ |
|
158 void ConferenceCallStateChanged( |
|
159 const TCCPConferenceCallState aState ); |
|
160 |
|
161 /** @see MCCPConferenceCallObserver::ConferenceCallEventOccurred */ |
|
162 void ConferenceCallEventOccurred( |
|
163 const TCCPConferenceCallEvent aEvent, |
|
164 MCCPCall* aReferredCall=NULL ); |
|
165 |
|
166 private: |
|
167 |
|
168 /** |
|
169 * DeActivate conferencecall |
|
170 * |
|
171 * @since S60 v3.2 |
|
172 */ |
|
173 void DeActivate(); |
|
174 |
|
175 /** |
|
176 * Change caps and if they are changed inform to observer |
|
177 * |
|
178 * @since S60 v3.2 |
|
179 * @param aCaps New caps |
|
180 */ |
|
181 void CapsChanged( TInt aCaps ); |
|
182 |
|
183 /** |
|
184 * Resets conference call to original state |
|
185 * |
|
186 * @since S60 v3.2 |
|
187 */ |
|
188 void Reset(); |
|
189 |
|
190 private: |
|
191 |
|
192 /** Constructor */ |
|
193 CCCEConferenceCall( |
|
194 CCCECallContainer& aCallContainer, |
|
195 CCCEPluginManager& aPluginManager ); |
|
196 |
|
197 /** Leaving stuff in constructor */ |
|
198 void ConstructL(); |
|
199 |
|
200 private: // data |
|
201 |
|
202 /** |
|
203 * Reference to pluginmanager |
|
204 */ |
|
205 CCCEPluginManager& iPluginManager; |
|
206 |
|
207 /** |
|
208 * Reference to callcontainer |
|
209 */ |
|
210 CCCECallContainer& iCallContainer; |
|
211 |
|
212 /** |
|
213 * Converged conference call currently in use |
|
214 * Own |
|
215 */ |
|
216 MCCPConferenceCall* iConferenceCall; |
|
217 |
|
218 /** |
|
219 * Observer |
|
220 */ |
|
221 MCCEConferenceCallObserver* iObserver; |
|
222 |
|
223 /** |
|
224 * Contains call that are currently in conference |
|
225 * Not Own |
|
226 */ |
|
227 RPointerArray<CCCECall> iCallArray; |
|
228 |
|
229 /** |
|
230 * Conferencecall caps |
|
231 */ |
|
232 TInt iConferenceCaps; |
|
233 |
|
234 /** |
|
235 * Conferencecall state |
|
236 */ |
|
237 MCCEConferenceCallObserver::TCCEConferenceCallState iState; |
|
238 |
|
239 /** |
|
240 * Implementation uid of plugin used |
|
241 */ |
|
242 TUid iImplementationUid; |
|
243 |
|
244 /** |
|
245 * Counts duration for this call |
|
246 * Own |
|
247 */ |
|
248 CCCEDurationTimer* iCCEDurationTimer; |
|
249 |
|
250 /** |
|
251 * Callparameters |
|
252 */ |
|
253 CCCPCallParameters* iCallParameters; |
|
254 }; |
|
255 |
|
256 #endif // CCCECALL_H |