williamr@2: /* williamr@2: * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * Name : sipmanagedprofile.h williamr@2: * Part of : SIP Profile Client williamr@2: * Interface : SDK API, SIP Profile API williamr@2: * The class providing profile management of SIP service provider williamr@2: * Version : 1.0 williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: #ifndef CSIPMANAGEDPROFILE_H williamr@2: #define CSIPMANAGEDPROFILE_H williamr@2: williamr@2: // INCLUDES williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: #include "sipprofile.h" williamr@2: williamr@2: //CONSTANTS williamr@2: williamr@2: /** SIP Provider Name which value is type of TDesC8. williamr@2: * Note that this parameter can only be retrieved williamr@2: * if it has been explicitly configured */ williamr@2: const TUint32 KSIPPrivateIdentity = 500; williamr@2: williamr@2: /** SIP HTTP Digest password which value is type of TDesC8. williamr@2: * Note that this parameter cannot be retrieved */ williamr@2: const TUint32 KSIPDigestPassword = 501; williamr@2: williamr@2: /** williamr@2: * SIP headers to be added to outgoing SIP requests generated williamr@2: * by SIP Profile Agent. The value is of type MDesC8Array. williamr@2: * Each array element represents a complete SIP header (name and value). */ williamr@2: const TUint32 KSIPHeaders = 502; williamr@2: williamr@2: /** williamr@2: * Setting for enabling/disabling IMS registration with certain types of williamr@2: * smart card applications. The value is of type TUint32. williamr@2: * If no value for this setting is configured, registration is allowed williamr@2: * with all types of smart card applications (SIM/USIM/ISIM). williamr@2: * If the value is configured, the following values are possible: williamr@2: * 1: Registration is allowed only when USIM or ISIM is present. williamr@2: * 2: Registration is allowed only when ISIM present */ williamr@2: const TUint32 KSIPAllowIMSRegistration = 503; williamr@2: williamr@2: /** williamr@2: * Setting for enabling/disabling editing the profile after its creation. williamr@2: * Serves as an indication for the clients that the profile williamr@2: * update and deletion operations are restricted. williamr@2: * The SIP Profile Agent implementation does not understand williamr@2: * the semantics of the parameter. williamr@2: * The value is of type TBool. */ williamr@2: const TUint32 KSIPProfileLocked = 504; williamr@2: williamr@2: /** williamr@2: * Defines how autoregistration profile behaves on home network/roaming williamr@2: * situations. If value is ETrue, automatic registration is not allowed williamr@2: * while roaming. williamr@2: * The value is of type TBool. */ williamr@2: const TUint32 KSIPAllowAutoRegistrationOnlyOnHomeNetwork = 505; williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: williamr@2: class CSIPManagedProfileRegistry; williamr@2: williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * @publishedAll williamr@2: * @released williamr@2: * williamr@2: * Class contains profile information of particular SIP service williamr@2: * provider. Class provides functions for setting and williamr@2: * getting profile parameters. williamr@2: * williamr@2: * @lib sipprofilecli.lib williamr@2: */ williamr@2: class CSIPManagedProfile: public CSIPProfile williamr@2: { williamr@2: public: // Constructors and destructor williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CSIPManagedProfile(); williamr@2: williamr@2: public: // New functions williamr@2: /** williamr@2: * Sets profile type information; williamr@2: * @param aSIPProfileTypeInfo profile type information williamr@2: */ williamr@2: IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set; zero-length descriptor resets the value williamr@2: * @param aVal a value to set williamr@2: * @return KErrNotFound if parameter was not found, williamr@2: * KErrNoMemory if out of memory; williamr@2: * KErrNone otherwise williamr@2: */ williamr@2: IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set williamr@2: * @return KErrNotFound if parameter was not found, KErrNone otherwise williamr@2: */ williamr@2: IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set williamr@2: * @return KErrNotFound if parameter was not found, KErrNone otherwise williamr@2: */ williamr@2: IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal values to set; an empty array resets the value williamr@2: * @return KErrNotFound if parameter was not found, williamr@2: * KErrNoMemory if out of memory williamr@2: * KErrNone otherwise williamr@2: */ williamr@2: IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter that is defined for a particular SIP server williamr@2: * @param aServerType a SIP server type williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set; zero-length descriptor resets the value williamr@2: * @return KErrNotFound if parameter was not found, williamr@2: * KErrNoMemory if out of memory; williamr@2: * KErrNone otherwise williamr@2: */ williamr@2: IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal); williamr@2: williamr@2: /** williamr@2: * Creates deep copy of the object williamr@2: * @return deep copied instance williamr@2: * @leave KErrNoMemory if out of memory williamr@2: */ williamr@2: IMPORT_C CSIPManagedProfile* CloneL() const; williamr@2: williamr@2: public: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: * @param aSIPRegistry a SIP profile client providing connection to SIP williamr@2: * profile server. williamr@2: */ williamr@2: static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry); williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: * @param aSIPRegistry a SIP profile client providing connection to SIP williamr@2: * profile server. williamr@2: * Constructs an object and adds the pointer to the cleanup stack; williamr@2: */ williamr@2: static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry); williamr@2: williamr@2: private: williamr@2: williamr@2: /** williamr@2: * Constructor. williamr@2: */ williamr@2: CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set; zero-length descriptor resets the value williamr@2: * @param aVal a value to set williamr@2: */ williamr@2: void SetParameterL(TUint32 aParam, const TDesC8& aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set williamr@2: */ williamr@2: void SetParameterL(TUint32 aParam, TUint32 aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set williamr@2: */ williamr@2: void SetParameterL(TUint32 aParam, TBool aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter that is defined for a particular SIP server williamr@2: * @param aServerType a SIP server type williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal a value to set; zero-length descriptor resets the value williamr@2: */ williamr@2: void SetParameterL(TUint32 aServerType, williamr@2: TUint32 aParam, const TDesC8& aVal); williamr@2: williamr@2: /** williamr@2: * Sets profile parameter williamr@2: * @param aParam a parameter to set williamr@2: * @param aVal values to set; an empty array resets the value williamr@2: */ williamr@2: IMPORT_C void SetParameterL(TUint32 aParam, const MDesC8Array& aVal); williamr@2: }; williamr@2: williamr@2: #endif // CSIPMANAGEDPROFILE_H