Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
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 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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * Part of : SIP Profile Client
17 * Interface : SDK API, SIP Profile API
18 * The class providing profile data of SIP service provider
32 #include "sipregistrationcontext.h"
33 #include "sipprofiletypeinfo.h"
35 // FORWARD DECLARATIONS
36 class CSIPConcreteProfile;
37 class CSIPProfileRegistry;
38 class CSIPProfileRegistryBase;
41 * SIP Profile ID which value is type of TUint32
43 const TUint32 KSIPProfileId = 1;
46 * SIP Provider Name which value is type of TDesC8
48 const TUint32 KSIPProviderName = 2;
51 * Access Point ID which value is type of TUint32
53 const TUint32 KSIPAccessPointId = 3;
56 * Signaling compression (SigComp) which value is type of TBool.
57 * ETrue indicates that SigComp is enabled
59 const TUint32 KSIPSigComp = 4;
62 * Security Negotiation which value is type of TBool. ETrue indicates that
63 * Security Negotiation is enabled
65 const TUint32 KSIPSecurityNegotiation = 5;
68 * Auto Registration which value is type of TBool. ETrue indicates that
69 * profile is enabled for auto registration
71 const TUint32 KSIPAutoRegistration = 6;
74 * Defined user's address-of-record which value is type of TDesC8
76 const TUint32 KSIPUserAor = 7;
79 * Registration which value is type of TBool. ETrue indicates that
80 * profile is registered
82 const TUint32 KSIPProfileRegistered = 8;
85 * Users's registered address-of-records which value is of type MDesC8Array.
86 * Note that array will contain AORs only in case the profile is registered.
88 const TUint32 KSIPRegisteredAors = 9;
91 * Negotiated security mechanism during registration procedure which value
93 * Note that descriptor will contain value only in case the profile is
96 const TUint32 KSIPNegotiatedSecurityMechanism = 10;
99 * Default profile which value is type of TBool.
100 * ETrue indicates that profile is default
102 const TUint32 KSIPDefaultProfile = 11;
105 * "Contact" header parameters used during registration which value
106 * is of type MDesC8Array. Each array element contains one "Contact"-header
109 const TUint32 KSIPContactHeaderParams = 12;
112 * The user's registered "Contact"-header including the whole value of the header
113 * except for the header's name ("Contact:").
114 * The value is of type TDesC8.
115 * Note that the value is available only in case the profile is registered.
117 const TUint32 KSIPRegisteredContact = 13;
120 * SNAP (Service Network Access Point) ID which value is type of TUint32.
121 * This is an optional parameter. When this parameter is configured,
122 * KSIPAccessPointId has a meaningful value only when the profile is registered.
123 * The value of KSIPSnapId must be greater than zero.
125 const TUint32 KSIPSnapId = 14;
128 * A unique Contact-header's user-part
129 * generated automatically by the SIP implementation.
130 * The value is of type TDesC8.
131 * This parameter is read-only and
132 * trying to set it will fail with KErrAccessDenied.
134 const TUint32 KSIPContactHeaderUser = 15;
137 * Sets the KSoIpTOS socket option (see in_sock.h) for
138 * all SIP signalling related to this profile.
139 * The value is of type TUint32.
141 const TUint32 KSIPSoIpTOS = 16;
144 * Sets the Access Point Name.
145 * This is an Optional Parameter.
146 * Access Point Name which value is type of TDesC8,
148 const TUint32 KSIPAccessPointName = 17;
151 * Sets the SNAP Name.
152 * This is an Optional Parameter.
153 * SNAP Name which value is type of TDesC8,
155 const TUint32 KSIPSnapName = 18;
160 const TUint32 KSIPRegistrar = 130;
165 const TUint32 KSIPOutboundProxy = 131;
168 * HTTP Digest user name which value is type of TDesC8
170 const TUint32 KSIPDigestUserName = 150;
173 * HTTP Digest realm which value is type of TDesC8
175 const TUint32 KSIPDigestRealm = 151;
178 * SIP server's address which value is of type TDesC8
180 const TUint32 KSIPServerAddress = 152;
187 * Class contains profile information of particular SIP service
188 * provider. Class provides functions for quering profile parameter
190 * @lib sipprofilecli.lib
192 class CSIPProfile: public CBase, public MSIPRegistrationContext
194 public: // Constructors and destructor
197 * @capability NetworkServices
199 IMPORT_C ~CSIPProfile();
201 public: // New functions
203 * Gets profile type information
204 * @return profile type information
206 IMPORT_C const TSIPProfileTypeInfo& Type() const;
209 * Gets profile parameter
210 * @param aParam a parameter to get
211 * @param aVal on return will contain parameter value
212 * @return KErrNotFound if parameter was not found, KErrNone otherwise
214 IMPORT_C TInt GetParameter(TUint32 aParam, TDesC8 const *& aVal) const;
217 * Gets profile parameter
218 * @param aParam a parameter to get
219 * @param aVal on return will contain parameter value
220 * @return KErrNotFound if parameter was not found, KErrNone otherwise
222 IMPORT_C TInt GetParameter(TUint32 aParam, TUint32& aVal) const;
225 * Gets profile parameter
226 * @param aParam a parameter to get
227 * @param aVal on return will contain parameter value
228 * @return KErrNotFound if parameter was not found, KErrNone otherwise
230 IMPORT_C TInt GetParameter(TUint32 aParam, TBool& aVal) const;
233 * Gets profile parameter
234 * @param aParam a parameter to get
235 * @param aVal on return will contain parameter value
236 * @return KErrNotFound if parameter was not found, KErrNone otherwise
238 IMPORT_C TInt GetParameter(TUint32 aParam, MDesC8Array const *& aVal) const;
241 * Gets profile parameter that is defined for a particular SIP server
242 * @param aServer a SIP server type
243 * @param aParam a parameter to get
244 * @param aVal on return will contain parameter value
245 * @return KErrNotFound if parameter was not found, KErrNone otherwise
247 IMPORT_C TInt GetParameter(TUint32 aServerType, TUint32 aParam, TDesC8 const *& aVal) const;
249 public: //Functions from base class
251 * Tests if the registration context can be
252 * used for creating SIP messages/dialogs
253 * Profile can be used, when CSIPProfileRegistry::IsEnabled() == ETrue
254 * and Status() == ERegistered.
255 * @return ETrue if can be used, EFalse otherwise
258 TBool IsContextActive() const;
262 * For internal use only
266 TUint32 ContextId() const;
269 public: //New functions
272 * Two-phased constructor.
273 * @param aSIPRegistry a SIP profile client providing connection to SIP
277 static CSIPProfile* NewL(CSIPProfileRegistry* aSIPRegistry);
280 * Two-phased constructor.
281 * @param aSIPRegistry a SIP profile client providing connection to SIP
283 * Constructs an object and adds the pointer to the cleanup stack;
286 static CSIPProfile* NewLC(CSIPProfileRegistry* aSIPRegistry);
289 * Sets profiles enabled state
290 * @param aEnabled ETrue if enabled
293 void SetEnabled(TBool aEnabled);
296 * Sets concrete profile that holds actual data
297 * @param aProfile profile instance containing data
300 void SetConcreteProfile(CSIPConcreteProfile* aProfile);
303 * Clears concrete profile that holds actual data
306 void ClearConcreteProfile();
309 * Gets concrete profile that holds actual data
310 * @return concrete profile holding data
313 CSIPConcreteProfile& ConcreteProfile();
316 * Gets concrete profile that holds actual data
317 * @return concrete profile holding data
320 const CSIPConcreteProfile& ConcreteProfile() const;
323 * Checks if the profile is enabled
324 * @return ETrue if enabled, EFalse otherwise
327 TBool IsEnabled() const;
330 * Gets last occurred error during registration
331 * @return last occurred error code, KErrNone if no error
333 TInt LastRegistrationError() const;
336 * sets pointer to registry for profile
338 void SetRegistry(CSIPProfileRegistryBase* aRegistry);
341 * Clears pointer to registry from profile
343 void ClearRegistry();
350 CSIPProfile(CSIPProfileRegistryBase* aRegistry);
353 * 2nd phase constructor.
362 CSIPConcreteProfile* iSIPProfile;
367 CSIPProfileRegistryBase* iSIPProfileRegistry;
374 #endif // CSIPPROFILE_H