2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
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
25 #ifndef CSIPMANAGEDPROFILE_H
26 #define CSIPMANAGEDPROFILE_H
34 #include "sipprofile.h"
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;
43 /** SIP HTTP Digest password which value is type of TDesC8.
44 * Note that this parameter cannot be retrieved */
45 const TUint32 KSIPDigestPassword = 501;
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;
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;
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;
72 // FORWARD DECLARATIONS
74 class CSIPManagedProfileRegistry;
83 * Class contains profile information of particular SIP service
84 * provider. Class provides functions for setting and
85 * getting profile parameters.
87 * @lib sipprofilecli.lib
89 class CSIPManagedProfile: public CSIPProfile
91 public: // Constructors and destructor
95 IMPORT_C ~CSIPManagedProfile();
97 public: // New functions
99 * Sets profile type information;
100 * @param aSIPProfileTypeInfo profile type information
102 IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo);
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;
112 IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal);
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
120 IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal);
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
128 IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal);
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
138 IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal);
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;
149 IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal);
152 * Creates deep copy of the object
153 * @return deep copied instance
154 * @leave KErrNoMemory if out of memory
156 IMPORT_C CSIPManagedProfile* CloneL() const;
160 * Two-phased constructor.
161 * @param aSIPRegistry a SIP profile client providing connection to SIP
164 static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry);
167 * Two-phased constructor.
168 * @param aSIPRegistry a SIP profile client providing connection to SIP
170 * Constructs an object and adds the pointer to the cleanup stack;
172 static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry);
179 CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry);
182 * Sets profile parameter
183 * @param aParam a parameter to set; zero-length descriptor resets the value
184 * @param aVal a value to set
186 void SetParameterL(TUint32 aParam, const TDesC8& aVal);
189 * Sets profile parameter
190 * @param aParam a parameter to set
191 * @param aVal a value to set
193 void SetParameterL(TUint32 aParam, TUint32 aVal);
196 * Sets profile parameter
197 * @param aParam a parameter to set
198 * @param aVal a value to set
200 void SetParameterL(TUint32 aParam, TBool aVal);
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
208 void SetParameterL(TUint32 aServerType,
209 TUint32 aParam, const TDesC8& aVal);
212 * Sets profile parameter
213 * @param aParam a parameter to set
214 * @param aVal values to set; an empty array resets the value
216 void SetParameterL(TUint32 aParam, const MDesC8Array& aVal);
219 #endif // CSIPMANAGEDPROFILE_H