|
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: Handles interaction with availability plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSAVAILABILITYPLUGINMANAGER_H |
|
20 #define MUSAVAILABILITYPLUGINMANAGER_H |
|
21 |
|
22 #include "musmanagercommon.h" |
|
23 #include "musavaobserver.h" |
|
24 #include "musunittesting.h" |
|
25 #include "musindicatorobserver.h" |
|
26 #include "musavasettingsobserver.h" |
|
27 |
|
28 #include <badesca.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 class CMusAvailabilityPlugin; |
|
32 class MMusAvailabilityPluginManagerObserver; |
|
33 class MDesCArray; |
|
34 class CMusAvaInterface; |
|
35 class CMusIndicatorApi; |
|
36 class CMusApplicationManager; |
|
37 |
|
38 /** |
|
39 * ?one_line_short_description |
|
40 * |
|
41 * ?more_complete_description |
|
42 * |
|
43 * @lib ?library |
|
44 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
45 */ |
|
46 class CMusAvailabilityPluginManager : public CBase, |
|
47 public MMusAvaObserver, |
|
48 public MMusIndicatorObserver, |
|
49 public MMusAvaSettingsObserver |
|
50 { |
|
51 |
|
52 public: // first phase constructors & destructor |
|
53 |
|
54 /** |
|
55 * |
|
56 */ |
|
57 static CMusAvailabilityPluginManager* NewL( |
|
58 MMusAvailabilityPluginManagerObserver& aObserver, |
|
59 CMusApplicationManager& aApplicationManager ); |
|
60 |
|
61 /** |
|
62 * |
|
63 */ |
|
64 static CMusAvailabilityPluginManager* NewLC( |
|
65 MMusAvailabilityPluginManagerObserver& aObserver, |
|
66 CMusApplicationManager& aApplicationManager ); |
|
67 |
|
68 /** |
|
69 * |
|
70 */ |
|
71 ~CMusAvailabilityPluginManager(); |
|
72 |
|
73 |
|
74 protected: |
|
75 |
|
76 /** |
|
77 * |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 /** |
|
82 * |
|
83 */ |
|
84 CMusAvailabilityPluginManager( |
|
85 MMusAvailabilityPluginManagerObserver& aObserver, |
|
86 CMusApplicationManager& aApplicationManager ); |
|
87 |
|
88 |
|
89 public: // API |
|
90 |
|
91 /** |
|
92 * |
|
93 */ |
|
94 TBool ApplicationAllowed(); |
|
95 |
|
96 |
|
97 /** |
|
98 * Returning composed availability status |
|
99 */ |
|
100 MultimediaSharing::TMusAvailabilityStatus Availability(); |
|
101 |
|
102 /** |
|
103 * |
|
104 */ |
|
105 void InvestigateAvailabilityL(); |
|
106 |
|
107 /** |
|
108 * |
|
109 */ |
|
110 void PrepareForReceivedInviteL(); |
|
111 |
|
112 /** |
|
113 * |
|
114 */ |
|
115 void InvitationReceivedL(); |
|
116 |
|
117 /** |
|
118 * |
|
119 */ |
|
120 void OptionsReceivedL(); |
|
121 |
|
122 /** |
|
123 * |
|
124 */ |
|
125 void LoadPluginL(); |
|
126 |
|
127 /** |
|
128 * |
|
129 */ |
|
130 void StopPluginL(); |
|
131 |
|
132 /** |
|
133 * |
|
134 */ |
|
135 MDesCArray& SessionParametersL(); |
|
136 |
|
137 /** |
|
138 * |
|
139 */ |
|
140 void ManualQueryL(); |
|
141 |
|
142 |
|
143 /** |
|
144 * |
|
145 */ |
|
146 TBool PossibleToLaunch(); |
|
147 |
|
148 |
|
149 |
|
150 private: // from MMusAvaObserver |
|
151 |
|
152 // TBD: COMMENTS |
|
153 virtual void AvailabilityChanged( |
|
154 TAvailabilityName aName, TAvailabilityStatus aStatus ); |
|
155 |
|
156 virtual void AvailabilityError( |
|
157 TAvailabilityName aName, TAvailabilityStatus aStatus ); |
|
158 |
|
159 |
|
160 public: //from MMusAvaSettingsObserver |
|
161 |
|
162 TApplicationState ApplicationState(); |
|
163 |
|
164 TBool OptionAllowed(); |
|
165 |
|
166 void StartApplicationL( MultimediaSharing::TMusUseCase aUseCase ); |
|
167 |
|
168 private: // from base class MMusIndicatorObserver. |
|
169 |
|
170 /** |
|
171 * From MMusIndicatorObserver. |
|
172 * Starts live video sharing. |
|
173 */ |
|
174 virtual void StartLiveSharingL(); |
|
175 |
|
176 private: /// helper functions |
|
177 |
|
178 /** |
|
179 * Cross-link status codes |
|
180 */ |
|
181 MultimediaSharing::TMusAvailabilityStatus MapAvailabilities( |
|
182 TAvailabilityStatus aStatus ); |
|
183 |
|
184 /** |
|
185 * |
|
186 */ |
|
187 void UpdateSessionParametersL(); |
|
188 |
|
189 /** |
|
190 * |
|
191 */ |
|
192 HBufC* SipAddressesLC(); |
|
193 |
|
194 /** |
|
195 * |
|
196 */ |
|
197 HBufC* VideoCodecsLC(); |
|
198 /** |
|
199 * |
|
200 */ |
|
201 HBufC* TelNumberLC(); |
|
202 |
|
203 /** |
|
204 * |
|
205 */ |
|
206 HBufC* ContactNameLC(); |
|
207 |
|
208 |
|
209 /** |
|
210 * |
|
211 */ |
|
212 void IndicateAvailabilityL(); |
|
213 |
|
214 |
|
215 |
|
216 private: // owned data |
|
217 |
|
218 /** |
|
219 * |
|
220 */ |
|
221 CMusAvaInterface* iPlugin; |
|
222 |
|
223 /** |
|
224 * |
|
225 */ |
|
226 MMusAvailabilityPluginManagerObserver& iObserver; |
|
227 |
|
228 /** |
|
229 * |
|
230 */ |
|
231 CDesCArrayFlat* iSessionParameters; |
|
232 |
|
233 CMusIndicatorApi* iIndicator; |
|
234 |
|
235 CMusApplicationManager& iApplicationManager; |
|
236 |
|
237 /** |
|
238 * |
|
239 */ |
|
240 TBool iPluginStarted; |
|
241 MUS_UNITTEST( UT_CMusManagerServerCore ) |
|
242 MUS_UNITTEST( UT_CMusAvailabilityPluginManager ) |
|
243 |
|
244 }; |
|
245 |
|
246 #endif // ? MUSAVAILABILITYPLUGINMANAGER_H |
|
247 |