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