|
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 InvitationReceivedL(); |
|
111 |
|
112 /** |
|
113 * |
|
114 */ |
|
115 void OptionsReceivedL(); |
|
116 |
|
117 /** |
|
118 * |
|
119 */ |
|
120 void LoadPluginL(); |
|
121 |
|
122 /** |
|
123 * |
|
124 */ |
|
125 void StopPluginL(); |
|
126 |
|
127 /** |
|
128 * |
|
129 */ |
|
130 MDesCArray& SessionParametersL(); |
|
131 |
|
132 /** |
|
133 * |
|
134 */ |
|
135 void ManualQueryL(); |
|
136 |
|
137 |
|
138 /** |
|
139 * |
|
140 */ |
|
141 TBool PossibleToLaunch(); |
|
142 |
|
143 |
|
144 |
|
145 private: // from MMusAvaObserver |
|
146 |
|
147 // TBD: COMMENTS |
|
148 virtual void AvailabilityChanged( |
|
149 TAvailabilityName aName, TAvailabilityStatus aStatus ); |
|
150 |
|
151 virtual void AvailabilityError( |
|
152 TAvailabilityName aName, TAvailabilityStatus aStatus ); |
|
153 |
|
154 |
|
155 public: //from MMusAvaSettingsObserver |
|
156 |
|
157 TApplicationState ApplicationState(); |
|
158 |
|
159 TBool OptionAllowed(); |
|
160 |
|
161 private: // from base class MMusIndicatorObserver. |
|
162 |
|
163 /** |
|
164 * From MMusIndicatorObserver. |
|
165 * Starts live video sharing. |
|
166 */ |
|
167 virtual void StartLiveSharingL(); |
|
168 |
|
169 private: /// helper functions |
|
170 |
|
171 /** |
|
172 * Cross-link status codes |
|
173 */ |
|
174 MultimediaSharing::TMusAvailabilityStatus MapAvailabilities( |
|
175 TAvailabilityStatus aStatus ); |
|
176 |
|
177 /** |
|
178 * |
|
179 */ |
|
180 void UpdateSessionParametersL(); |
|
181 |
|
182 /** |
|
183 * |
|
184 */ |
|
185 HBufC* SipAddressesLC(); |
|
186 |
|
187 /** |
|
188 * |
|
189 */ |
|
190 HBufC* VideoCodecsLC(); |
|
191 /** |
|
192 * |
|
193 */ |
|
194 HBufC* TelNumberLC(); |
|
195 |
|
196 /** |
|
197 * |
|
198 */ |
|
199 HBufC* ContactNameLC(); |
|
200 |
|
201 |
|
202 /** |
|
203 * |
|
204 */ |
|
205 void IndicateAvailabilityL(); |
|
206 |
|
207 |
|
208 |
|
209 private: // owned data |
|
210 |
|
211 /** |
|
212 * |
|
213 */ |
|
214 CMusAvaInterface* iPlugin; |
|
215 |
|
216 /** |
|
217 * |
|
218 */ |
|
219 MMusAvailabilityPluginManagerObserver& iObserver; |
|
220 |
|
221 /** |
|
222 * |
|
223 */ |
|
224 CDesCArrayFlat* iSessionParameters; |
|
225 |
|
226 CMusIndicatorApi* iIndicator; |
|
227 |
|
228 CMusApplicationManager& iApplicationManager; |
|
229 |
|
230 /** |
|
231 * |
|
232 */ |
|
233 TBool iPluginStarted; |
|
234 MUS_UNITTEST( UT_CMusManagerServerCore ) |
|
235 MUS_UNITTEST( UT_CMusAvailabilityPluginManager ) |
|
236 |
|
237 }; |
|
238 |
|
239 #endif // ? MUSAVAILABILITYPLUGINMANAGER_H |
|
240 |