epoc32/include/mw/sipmanagedprofile.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.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 // FORWARD DECLARATIONS
    73 
    74 class CSIPManagedProfileRegistry;
    75 
    76 
    77 // CLASS DECLARATION
    78 
    79 /**
    80 *  @publishedAll
    81 *  @released
    82 *
    83 *  Class contains profile information of particular SIP service
    84 *  provider. Class provides functions for setting and 
    85 *  getting profile parameters.
    86 * 
    87 *  @lib sipprofilecli.lib
    88 */
    89 class CSIPManagedProfile: public CSIPProfile
    90     {
    91     public:  // Constructors and destructor
    92         /**
    93         * Destructor. 
    94         */                
    95         IMPORT_C ~CSIPManagedProfile();
    96 
    97     public: // New functions
    98         /**
    99         * Sets profile type information; 
   100         * @param aSIPProfileTypeInfo profile type information
   101         */
   102         IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo);
   103 
   104         /** 
   105         * Sets profile parameter
   106         * @param aParam a parameter to set; zero-length descriptor resets the value
   107         * @param aVal a value to set
   108         * @return KErrNotFound if parameter was not found,
   109         *         KErrNoMemory if out of memory;
   110         *         KErrNone otherwise
   111         */
   112         IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal); 
   113 
   114         /** 
   115         * Sets profile parameter
   116         * @param aParam a parameter to set
   117         * @param aVal a value to set
   118         * @return KErrNotFound if parameter was not found, KErrNone otherwise
   119         */
   120         IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal);
   121 
   122         /** 
   123         * Sets profile parameter
   124         * @param aParam a parameter to set
   125         * @param aVal a value to set
   126         * @return KErrNotFound if parameter was not found, KErrNone otherwise
   127         */
   128         IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal);
   129     
   130         /** 
   131         * Sets profile parameter
   132         * @param aParam a parameter to set
   133         * @param aVal values to set; an empty array resets the value
   134         * @return KErrNotFound if parameter was not found, 
   135         *         KErrNoMemory if out of memory          
   136         *          KErrNone otherwise        
   137         */
   138         IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal);
   139         
   140         /** 
   141         * Sets profile parameter that is defined for a particular SIP server
   142         * @param aServerType a SIP server type
   143         * @param aParam a parameter to set
   144         * @param aVal a value to set; zero-length descriptor resets the value
   145         * @return KErrNotFound if parameter was not found,
   146         *          KErrNoMemory if out of memory;
   147         *         KErrNone otherwise
   148         */
   149         IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal);
   150 
   151         /** 
   152         * Creates deep copy of the object
   153         * @return deep copied instance
   154         * @leave KErrNoMemory if out of memory
   155         */
   156         IMPORT_C CSIPManagedProfile* CloneL() const;
   157 
   158     public:
   159         /**
   160         * Two-phased constructor.
   161         * @param aSIPRegistry a SIP profile client providing connection to SIP 
   162         *         profile server.
   163         */
   164         static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry);
   165 
   166         /**
   167         * Two-phased constructor.
   168         * @param aSIPRegistry a SIP profile client providing connection to SIP 
   169         *         profile server.
   170         * Constructs an object and adds the pointer to the cleanup stack;
   171         */
   172         static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry);
   173 
   174     private:
   175 
   176         /**
   177         * Constructor. 
   178         */                
   179         CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry);
   180 
   181         /** 
   182         * Sets profile parameter
   183         * @param aParam a parameter to set; zero-length descriptor resets the value
   184         * @param aVal a value to set
   185         */
   186         void SetParameterL(TUint32 aParam, const TDesC8& aVal);
   187 
   188         /** 
   189         * Sets profile parameter
   190         * @param aParam a parameter to set
   191         * @param aVal a value to set
   192         */
   193         void SetParameterL(TUint32 aParam, TUint32 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, TBool aVal);
   201 
   202         /** 
   203         * Sets profile parameter that is defined for a particular SIP server
   204         * @param aServerType a SIP server type
   205         * @param aParam a parameter to set
   206         * @param aVal a value to set; zero-length descriptor resets the value
   207         */
   208         void SetParameterL(TUint32 aServerType,
   209             TUint32 aParam, const TDesC8& aVal);
   210 
   211         /** 
   212         * Sets profile parameter
   213         * @param aParam a parameter to set
   214         * @param aVal values to set; an empty array resets the value
   215         */
   216         void SetParameterL(TUint32 aParam, const MDesC8Array& aVal);
   217     };
   218 
   219 #endif // CSIPMANAGEDPROFILE_H