00001 /* 00002 * ============================================================================== 00003 * Name : sipprofile.h 00004 * Part of : SIP Profile Client 00005 * Interface : SDK API, SIP Profile API 00006 * Description : The class providing profile data of SIP service provider 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 CSIPPROFILE_H 00022 #define CSIPPROFILE_H 00023 00024 // INCLUDES 00025 #include <e32base.h> 00026 #include <e32std.h> 00027 #include <badesca.h> 00028 #include "sipregistrationcontext.h" 00029 #include "sipprofiletypeinfo.h" 00030 00031 // FORWARD DECLARATIONS 00032 class CSIPConcreteProfile; 00033 class CSIPProfileRegistry; 00034 class CSIPProfileRegistryBase; 00035 00039 const TUint32 KSIPProfileId = 1; 00040 00044 const TUint32 KSIPProviderName = 2; 00045 00049 const TUint32 KSIPAccessPointId = 3; 00050 00055 const TUint32 KSIPSigComp = 4; 00056 00061 const TUint32 KSIPSecurityNegotiation = 5; 00062 00067 const TUint32 KSIPAutoRegistration = 6; 00068 00072 const TUint32 KSIPUserAor = 7; 00073 00078 const TUint32 KSIPProfileRegistered = 8; 00079 00084 const TUint32 KSIPRegisteredAors = 9; 00085 00092 const TUint32 KSIPNegotiatedSecurityMechanism = 10; 00093 00098 const TUint32 KSIPDefaultProfile = 11; 00099 00105 const TUint32 KSIPContactHeaderParams = 12; 00106 00110 const TUint32 KSIPRegistrar = 130; 00111 00115 const TUint32 KSIPOutboundProxy = 131; 00116 00120 const TUint32 KSIPDigestUserName = 150; 00121 00125 const TUint32 KSIPDigestRealm = 151; 00126 00130 const TUint32 KSIPServerAddress = 152; 00131 00132 // CLASS DECLARATION 00142 class CSIPProfile: public CBase, public MSIPRegistrationContext 00143 { 00144 public: // Constructors and destructor 00149 IMPORT_C ~CSIPProfile(); 00150 00151 public: // New functions 00156 IMPORT_C const TSIPProfileTypeInfo& Type() const; 00157 00164 IMPORT_C TInt GetParameter(TUint32 aParam, TDesC8 const *& aVal) const; 00165 00172 IMPORT_C TInt GetParameter(TUint32 aParam, TUint32& aVal) const; 00173 00180 IMPORT_C TInt GetParameter(TUint32 aParam, TBool& aVal) const; 00181 00188 IMPORT_C TInt GetParameter(TUint32 aParam, MDesC8Array const *& aVal) const; 00189 00197 IMPORT_C TInt GetParameter(TUint32 aServerType, TUint32 aParam, TDesC8 const *& aVal) const; 00198 00199 public: //Functions from base class 00207 TBool IsContextActive() const; 00208 00214 TUint32 ContextId() const; 00215 00216 00217 public: //New functions 00218 00225 static CSIPProfile* NewL(CSIPProfileRegistry* aSIPRegistry); 00226 00234 static CSIPProfile* NewLC(CSIPProfileRegistry* aSIPRegistry); 00235 00241 void SetEnabled(TBool aEnabled); 00242 00248 void SetConcreteProfile(CSIPConcreteProfile* aProfile); 00249 00254 void ClearConcreteProfile(); 00255 00261 CSIPConcreteProfile& ConcreteProfile(); 00262 00268 const CSIPConcreteProfile& ConcreteProfile() const; 00269 00275 TBool IsEnabled() const; 00276 00281 TInt LastRegistrationError() const; 00282 00287 TBool operator==(const CSIPProfile& 00288 aProfile) const; 00289 00293 void SetRegistry(CSIPProfileRegistryBase* aRegistry); 00294 00298 void ClearRegistry(); 00299 00300 protected: 00301 00305 CSIPProfile(CSIPProfileRegistryBase* aRegistry); 00306 00310 void ConstructL(); 00311 00312 protected: 00313 00314 CSIPConcreteProfile* iSIPProfile; 00315 CSIPProfileRegistryBase* iSIPProfileRegistry; 00316 00317 private: 00318 00319 TBool iEnabled; 00320 }; 00321 00322 // CSIPPROFILE_H 00323 #endif