23
|
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: s_enginecontmgtextfeatures.cpp
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "s_vimpstengin.h"
|
|
19 |
//#include "s_enginecontmgtextfeatures.h"
|
|
20 |
#include "s_enginesearchextention.h"
|
|
21 |
#include "s_vimpstenginepresencesubservice.h"
|
|
22 |
#include "s_imsubservice.h"
|
|
23 |
#include "tvimpstenums.h"
|
|
24 |
#include "s_engineextentionfeatures.h"
|
|
25 |
|
|
26 |
/*
|
|
27 |
*/
|
|
28 |
/*MVIMPSTEngine& vimpstengine_stub::NewL()
|
|
29 |
{
|
|
30 |
return new vimpstengine_stub;
|
|
31 |
}*/
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Gets the Brand Information for the current service
|
|
35 |
* @param aBrandLanguage - Holds the BrandLanguage
|
|
36 |
* @param aBrandVersion - Holds the Version to be used
|
|
37 |
* @param aBrandId - Holds the brandId
|
|
38 |
* caller should allocate memory for all params and send the same to this API
|
|
39 |
* The result will be available in the InParams otself.
|
|
40 |
* @return TInt Error code
|
|
41 |
*/
|
|
42 |
TInt vimpstengine_stub::GetBrandInfoL(TLanguage& /*aBrandLanguage*/,
|
|
43 |
TInt& /*aBrandVersion*/, TDes8& /*aBrandId*/) const
|
|
44 |
{
|
|
45 |
return 1;
|
|
46 |
}
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Returns the Service State - Cumulative Service State of the SubServices
|
|
50 |
* @return TVIMPSTRegistrationState, current service state.
|
|
51 |
*/
|
|
52 |
TVIMPSTEnums::TVIMPSTRegistrationState vimpstengine_stub::ServiceState() const
|
|
53 |
{
|
|
54 |
TVIMPSTEnums::TVIMPSTRegistrationState state = TVIMPSTEnums::ESVCERegistered;
|
|
55 |
return state;
|
|
56 |
}
|
|
57 |
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Gets the Service Id
|
|
61 |
* @return TUint32 Service Id
|
|
62 |
*/
|
|
63 |
TUint32 vimpstengine_stub::ServiceId() const
|
|
64 |
{
|
|
65 |
return 1;
|
|
66 |
|
|
67 |
}
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Returns a SubService is Supported or not
|
|
77 |
* Components intertested in knowing whether a SubService is Supported or not can use this API
|
|
78 |
* @param aType - Type of the SubService TVIMPSTEnums::SubServiceType - Defined in tvimpstenums.h
|
|
79 |
* @return TBool, ETrue if the SubService is Supported in this Service, else returns EFalse
|
|
80 |
*/
|
|
81 |
TBool vimpstengine_stub::IsSubServiceSupportedL(TVIMPSTEnums::SubServiceType /*aType*/) const
|
|
82 |
{
|
|
83 |
return ETrue;
|
|
84 |
}
|
|
85 |
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Returns TBool whether a SubService is Enabled or not
|
|
89 |
* Components intertested in knowing whether a SubService is Enabled or not can use this API
|
|
90 |
* @param aType - Type of the SubService TVIMPSTEnums::SubServiceType - Defined in tvimpstenums.h
|
|
91 |
* @return TBool, ETrue if the SubService is Enabled in this Service, else returns EFalse
|
|
92 |
*/
|
|
93 |
TBool vimpstengine_stub::IsSubServiceEnabled(TVIMPSTEnums::SubServiceType /*aType*/) const
|
|
94 |
{
|
|
95 |
return ETrue;
|
|
96 |
}
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Gets the StoreName for given service
|
|
100 |
* @param aContactStoreId, Virtual store id.
|
|
101 |
* The caller of the this function has to assign required memory for aContactStoreId
|
|
102 |
* aContactStoreId will be filled with the Virtual Store Id by this API
|
|
103 |
*/
|
|
104 |
void vimpstengine_stub::ContactStoreIdL(
|
|
105 |
TDes& /*aContactStoreId*/ ) const
|
|
106 |
{
|
|
107 |
|
|
108 |
}
|
|
109 |
|
|
110 |
/**
|
|
111 |
* returns the Service Name
|
|
112 |
* @return TDesC&, reference to service name. Ownership is not transferred.
|
|
113 |
*/
|
|
114 |
const TDesC& vimpstengine_stub::ServiceName() const
|
|
115 |
{
|
|
116 |
return KNullDesC;
|
|
117 |
}
|
|
118 |
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Register Session Observer.
|
|
122 |
* @aObserver, observer ot be registered.
|
|
123 |
*/
|
|
124 |
void vimpstengine_stub::RegisterServiceSessionObserverL
|
|
125 |
(MVIMPSTEngineServiceStateEventObserver* /*aObserver*/)
|
|
126 |
{
|
|
127 |
|
|
128 |
}
|
|
129 |
|
|
130 |
/**
|
|
131 |
* UnRegisters Session Observer
|
|
132 |
* @aObserver, observer ot be Unregistered.
|
|
133 |
*/
|
|
134 |
void vimpstengine_stub::UnRegisterServiceSessionObserver
|
|
135 |
(MVIMPSTEngineServiceStateEventObserver* /*aObserver*/)
|
|
136 |
{
|
|
137 |
|
|
138 |
}
|
|
139 |
|
|
140 |
|
|
141 |
/**
|
|
142 |
* intialize storage
|
|
143 |
*/
|
|
144 |
void vimpstengine_stub::IntializeStorageL()
|
|
145 |
{
|
|
146 |
|
|
147 |
}
|
|
148 |
|
|
149 |
/**
|
|
150 |
* unintialize storage
|
|
151 |
*/
|
|
152 |
void vimpstengine_stub::UnIntializeStorage()
|
|
153 |
{
|
|
154 |
|
|
155 |
}
|
|
156 |
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Get the Ptr to the SubService given the Type of the SubService
|
|
160 |
* This API returns a Generalised SubService Class MVIMPSTEngineSubService
|
|
161 |
* Ownership of the SubService is not Transferred to the Caller
|
|
162 |
* The Caller can use this (MVIMPSTEngineSubService*) ptr to typecast to appropriate SubService Interface
|
|
163 |
* Usage : MVIMPSTEngineIMSubService* imSubService =
|
|
164 |
* dynamic_cast<MVIMPSTEngineIMSubService*>
|
|
165 |
* (iEngine.SubService(TVIMPSTEnums::EIM));
|
|
166 |
*
|
|
167 |
* if(imSubService)
|
|
168 |
* {
|
|
169 |
* imSubService->CloseConversationL( iContactId );
|
|
170 |
* }
|
|
171 |
* @param aType - SubService Type (TVIMPSTEnums::SubServiceType) defined in tvimpstenums.h
|
|
172 |
* @return - Ptr to the SubService - Value can even be NULL
|
|
173 |
*/
|
|
174 |
MVIMPSTEngineSubService* vimpstengine_stub::SubService(TVIMPSTEnums::SubServiceType aType) const
|
|
175 |
{
|
|
176 |
MVIMPSTEngineSubService* subservice = NULL;
|
|
177 |
switch(aType)
|
|
178 |
{
|
|
179 |
case TVIMPSTEnums::EPresence:
|
|
180 |
{
|
|
181 |
TRAP_IGNORE(subservice = CVIMPSTEnginePresenceSubService_Stub::NewL());
|
|
182 |
return subservice ;
|
|
183 |
break;
|
|
184 |
}
|
|
185 |
/* case TVIMPSTEnums::EIM:
|
|
186 |
{
|
|
187 |
TRAP_IGNORE(subservice = CVIMPSTEngineImSubService_Stub::NewL());
|
|
188 |
return subservice ;
|
|
189 |
break;
|
|
190 |
}*/
|
|
191 |
|
|
192 |
default:
|
|
193 |
break;
|
|
194 |
}
|
|
195 |
return subservice;
|
|
196 |
}
|
|
197 |
|
|
198 |
|
|
199 |
/**
|
|
200 |
*/
|
|
201 |
MVIMPSTEngineExtentionFeatures* vimpstengine_stub::ExtentionFeatures(TVIMPSTEnums::ExtentionType aType) const
|
|
202 |
{
|
|
203 |
MVIMPSTEngineExtentionFeatures* extFeature = NULL;
|
|
204 |
switch(aType)
|
|
205 |
{
|
|
206 |
case TVIMPSTEnums::EContactManagement:
|
|
207 |
{
|
|
208 |
TRAP_IGNORE(extFeature = extentionfeatures_stub::NewL());
|
|
209 |
return extFeature ;
|
|
210 |
break;
|
|
211 |
}
|
|
212 |
case TVIMPSTEnums::ESearch:
|
|
213 |
{
|
|
214 |
TRAP_IGNORE(extFeature = searchextention_stub::NewL());
|
|
215 |
return extFeature ;
|
|
216 |
break;
|
|
217 |
}
|
|
218 |
}
|
|
219 |
|
|
220 |
return extFeature;
|
|
221 |
}
|
|
222 |
|
|
223 |
/**
|
|
224 |
* Sets the User Name for the Service
|
|
225 |
* Stores the username to CCH Plugin
|
|
226 |
*
|
|
227 |
void vimpstengine_stub::SetUserNameL(const TDesC& /*aUserid)
|
|
228 |
{
|
|
229 |
|
|
230 |
}
|
|
231 |
*/
|
|
232 |
/**
|
|
233 |
* Sets the Password for the Service
|
|
234 |
* Stores the Password to CCH Plugin
|
|
235 |
* @param Password, Password to be stored.
|
|
236 |
*
|
|
237 |
void vimpstengine_stub::SetPassword(const TDesC& /*aPassword)
|
|
238 |
{
|
|
239 |
|
|
240 |
}
|
|
241 |
|
|
242 |
|
|
243 |
/**
|
|
244 |
* gets the UserName for the Service
|
|
245 |
* @return HBufC* - Ownership is transferred to the caller
|
|
246 |
* This API allocates memory for the UserName and transfers the Ownership to the Caller
|
|
247 |
*
|
|
248 |
HBufC* vimpstengine_stub::UserNameL() const
|
|
249 |
{
|
|
250 |
_LIT(KText,"Nutan@presence");
|
|
251 |
HBufC* buf = HBufC::NewL(20);
|
|
252 |
|
|
253 |
*buf = KText;
|
|
254 |
|
|
255 |
return buf;
|
|
256 |
}
|
|
257 |
|
|
258 |
/**
|
|
259 |
* gets the Password for the Service
|
|
260 |
* @return HBufC* - Ownership is transferred to the caller
|
|
261 |
* This API allocates memory for the Password and transfers the Ownership to the Caller
|
|
262 |
*
|
|
263 |
HBufC* vimpstengine_stub::PasswordL() const
|
|
264 |
{
|
|
265 |
return NULL;
|
|
266 |
}
|
|
267 |
*/
|
|
268 |
/**
|
|
269 |
* API used to login to the Service
|
|
270 |
*/
|
|
271 |
TInt vimpstengine_stub::Login()
|
|
272 |
{
|
|
273 |
return 1;
|
|
274 |
}
|
|
275 |
|
|
276 |
/**
|
|
277 |
* API used to Logout to the Service
|
|
278 |
*/
|
|
279 |
void vimpstengine_stub::LogoutL()
|
|
280 |
{
|
|
281 |
|
|
282 |
}
|
|
283 |
|
|
284 |
|
|
285 |
/**
|
|
286 |
* Gets the default domain name for given service
|
|
287 |
* @param aDefaultDomainName, Domain Name.
|
|
288 |
* The caller of the this function has to assign required memory for aDefaultDomainName
|
|
289 |
* aDefaultDomainName will be filled with the deafault domain name by this API
|
|
290 |
*/
|
|
291 |
void vimpstengine_stub::DefaultDomainNameL( TDes& /*aDefaultDomainName */) const
|
|
292 |
{
|
|
293 |
|
|
294 |
}
|
|
295 |
/**
|
|
296 |
* IsBlockSupportedL
|
|
297 |
* @returns ETrue if block/unblock is supported
|
|
298 |
* else EFalse
|
|
299 |
*/
|
|
300 |
TBool vimpstengine_stub::IsBlockSupportedL()
|
|
301 |
{
|
|
302 |
return ETrue;
|
|
303 |
}
|
|
304 |
|
|
305 |
TInt vimpstengine_stub::ChangeConnectionL()
|
|
306 |
{
|
|
307 |
return 1;
|
|
308 |
}
|
|
309 |
/**
|
|
310 |
* See MVIMPSTEngine
|
|
311 |
*
|
|
312 |
* @return True if password is present in the settings else returns false
|
|
313 |
*
|
|
314 |
*/
|
|
315 |
TBool vimpstengine_stub::IsPasswordAvailableL()
|
|
316 |
{
|
|
317 |
return ETrue;
|
|
318 |
}
|
|
319 |
|
|
320 |
|
|
321 |
/**
|
|
322 |
* Inform storage that data base need to be deleted.
|
|
323 |
*/
|
|
324 |
void vimpstengine_stub::DeleteDataBaseL()
|
|
325 |
{
|
|
326 |
|
|
327 |
}
|
|
328 |
/*----------------------------------------------------------
|
|
329 |
* vimpstengine_stub::GetPreseceSubService
|
|
330 |
*-----------------------------------------------------------*/
|
|
331 |
MVIMPSTEnginePresenceSubService* vimpstengine_stub::GetPreseceSubService()
|
|
332 |
{
|
|
333 |
MVIMPSTEngineSubService* subService = SubService(TVIMPSTEnums::EPresence);
|
|
334 |
if (subService)
|
|
335 |
{
|
|
336 |
//Get Presence SubService
|
|
337 |
MVIMPSTEnginePresenceSubService& presenceSubService =
|
|
338 |
MVIMPSTEnginePresenceSubService::Cast(*subService);
|
|
339 |
return &presenceSubService ;
|
|
340 |
}
|
|
341 |
return NULL;
|
|
342 |
}
|
|
343 |
/*----------------------------------------------------------
|
|
344 |
* vimpstengine_stub::FetchBlockedListL
|
|
345 |
*-----------------------------------------------------------*/
|
|
346 |
|
|
347 |
void vimpstengine_stub::FetchBlockedListL()
|
|
348 |
{
|
|
349 |
|
|
350 |
}
|
|
351 |
/*----------------------------------------------------------
|
|
352 |
* vimpstengine_stub::RegisterBlockedListObserver
|
|
353 |
*-----------------------------------------------------------*/
|
|
354 |
|
|
355 |
void vimpstengine_stub::RegisterBlockedListObserver(
|
|
356 |
MVIMPSTEngineBlockedListFetchEventObserver* aOb)
|
|
357 |
{
|
|
358 |
|
|
359 |
}
|
|
360 |
|
|
361 |
HBufC* vimpstengine_stub::GetOwnUserIdFromCChOrStorageL() const
|
|
362 |
{
|
|
363 |
HBufC* temp = NULL;
|
|
364 |
return temp;
|
|
365 |
}
|
|
366 |
|
|
367 |
void vimpstengine_stub::RetriveContextIfCChEnabledL()
|
|
368 |
{
|
|
369 |
|
|
370 |
}
|
|
371 |
void vimpstengine_stub::SetOwnUserIdIfChangedL(const TDesC& aUserId )
|
|
372 |
{
|
|
373 |
|
|
374 |
}
|
|
375 |
|
|
376 |
TBool vimpstengine_stub::IsUnInstalled()
|
|
377 |
{
|
|
378 |
return EFalse;
|
|
379 |
}
|
|
380 |
|
|
381 |
|
|
382 |
//end of file
|