epoc32/include/sipmanagedprofile.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 sipmanagedprofile.h
     1 /*
       
     2 * Copyright (c) 2003-2009 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : sipmanagedprofile.h
       
    16 * Part of     : SIP Profile Client
       
    17 * Interface   : SDK API, SIP Profile API
       
    18 * The class providing profile management of SIP service provider
       
    19 * Version     : 1.0
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CSIPMANAGEDPROFILE_H
       
    26 #define CSIPMANAGEDPROFILE_H
       
    27 
       
    28 // INCLUDES
       
    29 
       
    30 #include <e32base.h>
       
    31 #include <e32std.h>
       
    32 #include <badesca.h>
       
    33 
       
    34 #include "sipprofile.h"
       
    35 
       
    36 //CONSTANTS
       
    37 
       
    38 /** SIP Provider Name which value is type of TDesC8.
       
    39 * Note that this parameter can only be retrieved
       
    40 * if it has been explicitly configured */
       
    41 const TUint32 KSIPPrivateIdentity = 500;
       
    42 
       
    43 /** SIP HTTP Digest password which value is type of TDesC8.
       
    44 * Note that this parameter cannot be retrieved */
       
    45 const TUint32 KSIPDigestPassword = 501;
       
    46 
       
    47 /** 
       
    48 * SIP headers to be added to outgoing SIP requests generated 
       
    49 * by SIP Profile Agent. The value is of type MDesC8Array.
       
    50 * Each array element represents a complete SIP header (name and value). */
       
    51 const TUint32 KSIPHeaders = 502;
       
    52 
       
    53 /** 
       
    54 * Setting for enabling/disabling IMS registration with certain types of
       
    55 * smart card applications. The value is of type TUint32.
       
    56 * If no value for this setting is configured, registration is allowed 
       
    57 * with all types of smart card applications (SIM/USIM/ISIM).
       
    58 * If the value is configured, the following values are possible:
       
    59 * 1: Registration is allowed only when USIM or ISIM is present.
       
    60 * 2: Registration is allowed only when ISIM present */
       
    61 const TUint32 KSIPAllowIMSRegistration = 503;
       
    62 
       
    63 /**
       
    64 * Setting for enabling/disabling editing the profile after its creation.
       
    65 * Serves as an indication for the clients that the profile 
       
    66 * update and deletion operations are restricted. 
       
    67 * The SIP Profile Agent implementation does not understand
       
    68 * the semantics of the parameter.
       
    69 * The value is of type TBool. */
       
    70 const TUint32 KSIPProfileLocked = 504;
       
    71 
       
    72 /**
       
    73 * Defines how autoregistration profile behaves on home network/roaming
       
    74 * situations. If value is ETrue, automatic registration is not allowed
       
    75 * while roaming.
       
    76 * The value is of type TBool. */
       
    77 const TUint32 KSIPAllowAutoRegistrationOnlyOnHomeNetwork = 505;
       
    78 
       
    79 // FORWARD DECLARATIONS
       
    80 
       
    81 class CSIPManagedProfileRegistry;
       
    82 
       
    83 
       
    84 // CLASS DECLARATION
       
    85 
       
    86 /**
       
    87 *  @publishedAll
       
    88 *  @released
       
    89 *
       
    90 *  Class contains profile information of particular SIP service
       
    91 *  provider. Class provides functions for setting and 
       
    92 *  getting profile parameters.
       
    93 * 
       
    94 *  @lib sipprofilecli.lib
       
    95 */
       
    96 class CSIPManagedProfile: public CSIPProfile
       
    97     {
       
    98     public:  // Constructors and destructor
       
    99         /**
       
   100         * Destructor. 
       
   101         */                
       
   102         IMPORT_C ~CSIPManagedProfile();
       
   103 
       
   104     public: // New functions
       
   105         /**
       
   106         * Sets profile type information; 
       
   107         * @param aSIPProfileTypeInfo profile type information
       
   108         */
       
   109         IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo);
       
   110 
       
   111         /** 
       
   112         * Sets profile parameter
       
   113         * @param aParam a parameter to set; zero-length descriptor resets the value
       
   114         * @param aVal a value to set
       
   115         * @return KErrNotFound if parameter was not found,
       
   116         *         KErrNoMemory if out of memory;
       
   117         *         KErrNone otherwise
       
   118         */
       
   119         IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal); 
       
   120 
       
   121         /** 
       
   122         * Sets profile parameter
       
   123         * @param aParam a parameter to set
       
   124         * @param aVal a value to set
       
   125         * @return KErrNotFound if parameter was not found, KErrNone otherwise
       
   126         */
       
   127         IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal);
       
   128 
       
   129         /** 
       
   130         * Sets profile parameter
       
   131         * @param aParam a parameter to set
       
   132         * @param aVal a value to set
       
   133         * @return KErrNotFound if parameter was not found, KErrNone otherwise
       
   134         */
       
   135         IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal);
       
   136     
       
   137         /** 
       
   138         * Sets profile parameter
       
   139         * @param aParam a parameter to set
       
   140         * @param aVal values to set; an empty array resets the value
       
   141         * @return KErrNotFound if parameter was not found, 
       
   142         *         KErrNoMemory if out of memory          
       
   143         *          KErrNone otherwise        
       
   144         */
       
   145         IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal);
       
   146         
       
   147         /** 
       
   148         * Sets profile parameter that is defined for a particular SIP server
       
   149         * @param aServerType a SIP server type
       
   150         * @param aParam a parameter to set
       
   151         * @param aVal a value to set; zero-length descriptor resets the value
       
   152         * @return KErrNotFound if parameter was not found,
       
   153         *          KErrNoMemory if out of memory;
       
   154         *         KErrNone otherwise
       
   155         */
       
   156         IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal);
       
   157 
       
   158         /** 
       
   159         * Creates deep copy of the object
       
   160         * @return deep copied instance
       
   161         * @leave KErrNoMemory if out of memory
       
   162         */
       
   163         IMPORT_C CSIPManagedProfile* CloneL() const;
       
   164 
       
   165     public:
       
   166         /**
       
   167         * Two-phased constructor.
       
   168         * @param aSIPRegistry a SIP profile client providing connection to SIP 
       
   169         *         profile server.
       
   170         */
       
   171         static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry);
       
   172 
       
   173         /**
       
   174         * Two-phased constructor.
       
   175         * @param aSIPRegistry a SIP profile client providing connection to SIP 
       
   176         *         profile server.
       
   177         * Constructs an object and adds the pointer to the cleanup stack;
       
   178         */
       
   179         static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry);
       
   180 
       
   181     private:
       
   182 
       
   183         /**
       
   184         * Constructor. 
       
   185         */                
       
   186         CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry);
       
   187 
       
   188         /** 
       
   189         * Sets profile parameter
       
   190         * @param aParam a parameter to set; zero-length descriptor resets the value
       
   191         * @param aVal a value to set
       
   192         */
       
   193         void SetParameterL(TUint32 aParam, const TDesC8& aVal);
       
   194 
       
   195         /** 
       
   196         * Sets profile parameter
       
   197         * @param aParam a parameter to set
       
   198         * @param aVal a value to set
       
   199         */
       
   200         void SetParameterL(TUint32 aParam, TUint32 aVal);
       
   201 
       
   202         /** 
       
   203         * Sets profile parameter
       
   204         * @param aParam a parameter to set
       
   205         * @param aVal a value to set
       
   206         */
       
   207         void SetParameterL(TUint32 aParam, TBool aVal);
       
   208 
       
   209         /** 
       
   210         * Sets profile parameter that is defined for a particular SIP server
       
   211         * @param aServerType a SIP server type
       
   212         * @param aParam a parameter to set
       
   213         * @param aVal a value to set; zero-length descriptor resets the value
       
   214         */
       
   215         void SetParameterL(TUint32 aServerType,
       
   216             TUint32 aParam, const TDesC8& aVal);
       
   217 
       
   218         /** 
       
   219         * Sets profile parameter
       
   220         * @param aParam a parameter to set
       
   221         * @param aVal values to set; an empty array resets the value
       
   222         */
       
   223         IMPORT_C void SetParameterL(TUint32 aParam, const MDesC8Array& aVal);
       
   224     };
       
   225 
       
   226 #endif // CSIPMANAGEDPROFILE_H