00001 /* 00002 * ============================================================================== 00003 * Name : sipprofileregistrybase.h 00004 * Part of : SIP Profile Client 00005 * Interface : SDK API, SIP Profile API 00006 * Description : The class for retrieving SIP profiles from permanent storage. 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2003 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. All rights are reserved. Copying, 00013 * including reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia Corporation. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia Corporation. 00018 * ============================================================================== 00019 */ 00020 00021 #ifndef CSIPPROFILEREGISTRYBASE_H 00022 #define CSIPPROFILEREGISTRYBASE_H 00023 00024 // INCLUDES 00025 #include <e32base.h> 00026 #include <badesca.h> 00027 #include "sipconcreteprofileobserver.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPProfile; 00031 class CSIPConcreteProfile; 00032 class TSIPProfileTypeInfo; 00033 class CSIPProfileCleanupItem; 00034 class CSIPProfileItem; 00035 class CSIPProfileITCReceiver; 00036 class CSIPProfileITC; 00037 class CSIPProfilePlugins; 00038 class MSIPProfileRegistryObserver; 00039 class RSIPProfile; 00040 class CSIPConcreteProfileHolder; 00041 00042 // CLASS DECLARATION 00057 class CSIPProfileRegistryBase: public CBase, public MSIPConcreteProfileObserver 00058 { 00059 public: // Constructors and destructor 00060 00061 IMPORT_C ~CSIPProfileRegistryBase(); 00062 00063 public: //new functions 00072 IMPORT_C void ProfilesL(RPointerArray<CSIPProfile>& aProfiles); 00073 00084 IMPORT_C void ProfilesL( 00085 const TSIPProfileTypeInfo& aType, 00086 RPointerArray<CSIPProfile>& aProfiles); 00087 00098 IMPORT_C void ProfilesL( 00099 const TDesC8& aAOR, 00100 RPointerArray<CSIPProfile>& aProfiles); 00101 00110 IMPORT_C CSIPProfile* ProfileL(TUint32 aId); 00111 00119 IMPORT_C CSIPProfile* DefaultProfileL(); 00120 00130 IMPORT_C void SupportedProfileTypesL( 00131 RArray<TSIPProfileTypeInfo>& aSupportedProfileTypes); 00132 00138 IMPORT_C TInt LastRegistrationError(const CSIPProfile& aProfile) const; 00139 00140 public: 00141 00146 void EnableProfileL(CSIPProfile& aProfile); 00147 00153 TInt UsageL(const CSIPProfile& aProfile) const; 00154 00159 void DisableProfileL(CSIPProfile& aProfile); 00160 00165 void AddProfileL(CSIPProfile& aProfile); 00166 00171 void UpdateProfileL(CSIPProfile& aProfile); 00172 00178 void RemoveProfileL(CSIPProfile& aProfile); 00179 00184 void ProfileDeleted(CSIPProfile& aProfile); 00185 00191 TBool IsDefaultProfileL(const CSIPProfile& aProfile); 00192 00197 void NegotiatedSecurityMechanismL(CSIPConcreteProfile& aProfile); 00198 00203 void RegisteredAORsL(CSIPConcreteProfile& aProfile); 00204 00209 virtual CSIPProfile* NewInstanceL() = 0; 00210 00215 static void CrashRevert (TAny* aItem); 00216 00221 static void LocalCrashRevert (TAny* aItem); 00222 00223 public: // From MSIPConcreteProfileObserver 00224 00232 void RegistrationStatusChangedL(TUint32 aProfileId, 00233 TInt aStatus, 00234 TUint32 aStatusId); 00235 00240 void AddedL(TUint32 aProfileId); 00241 00246 void RemovedL(TUint32 aProfileId); 00247 00253 void UpdatedL(TUint32 aProfileId, TUint aSize); 00254 00261 void ErrorOccurredL(TUint32 aProfileId, 00262 TInt aStatus, 00263 TInt aError); 00264 00265 protected: 00266 00271 CSIPProfileRegistryBase(MSIPProfileRegistryObserver& aObserver); 00272 00276 void BaseConstructL(); 00277 00282 void StoreProfileL(CSIPProfileCleanupItem* aItem); 00283 00289 void StoreArrayL( 00290 RPointerArray<CSIPConcreteProfile>& aProfiles, 00291 RPointerArray<CSIPProfile>& aRetProfiles); 00292 00298 CSIPProfileItem* ProfileItemL(TUint aProfileId); 00299 00305 TInt ProfileIndex (TUint aProfileId); 00306 00312 CSIPProfileItem* ProfileItemByIndex(TUint aIndex); 00313 00321 CSIPProfile* SIPProfileL(TUint32 aId, TInt aSize = 0); 00322 00323 protected: 00324 00325 RSIPProfile* iSipClient; 00326 CSIPProfileITCReceiver* iITCReceiver; 00327 CSIPProfileITC* iITC; 00328 MSIPProfileRegistryObserver& iObserver; 00329 RPointerArray<CSIPProfileItem> iProfiles; 00330 CSIPProfilePlugins* iProfilePlugins; 00331 CSIPProfileItem* iFindEntry; 00332 00333 private: 00334 00335 void ProfilesCommonL(RPointerArray<CSIPProfile>& aProfiles, 00336 CSIPConcreteProfileHolder* aHolder); 00337 00338 }; 00339 00340 // CSIPPROFILEREGISTRYBASE_H 00341 #endif