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