1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // SIPSCPR_subconparams.h
15 // SIP extension parameters definition
27 #ifndef SIP_SUBCONPARAMS_H
28 #define SIP_SUBCONPARAMS_H
31 #include <comms-infras/metabuffer.h>
33 /** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */
34 const TInt KSubConSIPParametersUid = 0x10274C18;
36 /** The numeric value of Invite identifier for SIP extension parameter set */
37 const TInt KSubConSIPInviteParamsType = 1;
39 /** The numeric value of Subscribe identifier for SIP extension parameter set */
40 const TInt KSubConSIPSubscribeParamsType = 2;
42 /** The numeric value of Authentication of SIP extension parameter set */
43 const TInt KSubConSIPAuthenticateParamsType = 3;
45 class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet
47 This contains the SIP Invite parameters that will be passed via subconnection
55 Creates a new SubConSIPInvite parameter set object.
56 @param aFamily ,contains family related info
57 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
58 @return A pointer to the newly allocated object.
59 @leave KErrArgument if the data is not of type TParameterSetType.
61 inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
62 inline static CSubConSIPInviteParamSet* NewL();
65 inline CSubConSIPInviteParamSet();
67 virtual ~CSubConSIPInviteParamSet();
69 /** Getters for SIP header. */
70 /** Gets Request URI field of the SIP header. **/
71 inline const TPtrC8 GetRequestUri() const;
72 /** Gets From field of the SIP header. **/
73 inline const TPtrC8 GetFrom() const;
74 /** Gets To field of the SIP header. **/
75 inline const TPtrC8 GetTo() const;
76 /** Gets Contact field of the SIP header. **/
77 inline const TPtrC8 GetContact() const;
78 /** Gets ContentType field of the SIP header. **/
79 inline const TPtrC8 GetContentType() const;
80 /** Gets ContentSubType field of the SIP header. **/
81 inline const TPtrC8 GetContentSubType() const;
82 /** Gets Content field of the SIP header. **/
83 inline const TPtrC8 GetContent() const;
85 /** Setters for SIP header.
86 /** Sets Request URI field of the SIP header. **/
87 inline void SetRequestUriL(const TPtrC8 & aReqUri);
88 /** Sets From field of the SIP header. **/
89 inline void SetFromL(const TPtrC8 & aFrom);
90 /** Sets To field of the SIP header. **/
91 inline void SetToL(const TPtrC8 & aTo);
92 /** Sets Contact field of the SIP header. **/
93 inline void SetContactL(const TPtrC8 & aContact);
94 /** Sets Content Type field of the SIP header. **/
95 inline void SetContentTypeL(const TPtrC8 & aContentType);
96 /** Sets Content Sub Type field of the SIP header. **/
97 inline void SetContentSubTypeL(const TPtrC8 & aContentSubType);
98 /** Sets Content field of the SIP header. **/
99 inline void SetContentL(const TPtrC8 & aContent);
104 /** The Request URI field of the SIP header. */
106 /** The From field of the SIP header. */
108 /** The To field of the SIP header. */
110 /** The Contact field of the SIP header. */
112 /** The Content Type field of the SIP header. */
114 /** The Content Sub Type field of the SIP header. */
115 RBuf8 iContentSubType;
116 /** The Content field of the SIP header. */
122 class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet
124 This contains the SIP Subscribe parameters that will be passed via subconnection
132 Creates a new SubConSIPSubscribe parameter set object.
133 @param aFamily ,contains family related info
134 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
135 @return A pointer to the newly allocated object.
136 @leave KErrArgument if the data is not of type TParameterSetType.
138 inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
139 inline static CSubConSIPSubscribeParamSet* NewL();
142 inline CSubConSIPSubscribeParamSet();
145 virtual ~CSubConSIPSubscribeParamSet();
147 /** Getters for SIP header. */
148 /** Gets Request URI field of the SIP header. **/
149 inline const TPtrC8 GetRequestUri() const;
150 /** Gets From field of the SIP header. **/
151 inline const TPtrC8 GetFrom() const;
152 /** Gets To field of the SIP header. **/
153 inline const TPtrC8 GetTo() const;
154 /** Gets Contact field of the SIP header. **/
155 inline const TPtrC8 GetContact() const;
156 /** Gets Event Type field of the SIP header. **/
157 inline const TPtrC8 GetEventType() const;
158 /** Gets Accept Type field of the SIP header. **/
159 inline const TPtrC8 GetAcceptType() const;
160 /** Gets Accept Sub Type field of the SIP header. **/
161 inline const TPtrC8 GetAcceptSubType() const;
162 /** Gets Expires field of the SIP header. **/
163 inline const TInt GetExpires() const;
164 /** Gets Auto Refresh field of the SIP header. **/
165 inline const TBool GetAutoRefresh() const;
167 /** Setters for SIP header. */
168 /** Sets Request URI field of the SIP header. **/
169 inline void SetRequestUriL(const TPtrC8 & aReqUri);
170 /** Sets From field of the SIP header. **/
171 inline void SetFromL(const TPtrC8 & aFrom);
172 /** Sets To field of the SIP header. **/
173 inline void SetToL(const TPtrC8 & aTo);
174 /** Sets Contact field of the SIP header. **/
175 inline void SetContactL(const TPtrC8 & aContact);
176 /** Sets Event Type field of the SIP header. **/
177 inline void SetEventTypeL(const TPtrC8 & aEventType);
178 /** Sets Accept Type field of the SIP header. **/
179 inline void SetAcceptTypeL(const TPtrC8 & aAcceptType);
180 /** Sets Accept Sub Type field of the SIP header. **/
181 inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType);
182 /** Sets Expires Sub Type field of the SIP header. **/
183 inline void SetExpires(TInt aExpires);
184 /** Sets AutoRfresh field of the SIP header. **/
185 inline void SetAutoRefresh(TBool aAutoRefresh);
191 /** The Request URI field of the SIP header. */
193 /** The From field of the SIP header. */
195 /** The To field of the SIP header. */
197 /** The Contact field of the SIP header. */
199 /** The Event Type field of the SIP header. */
201 /** The Accept Type field of the SIP header. */
203 /** The Accept Sub Type field of the SIP header. */
204 RBuf8 iAcceptSubType;
205 /** The Expires field of the SIP header. */
207 /** The AutoRefresh field of the SIP header. */
211 class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet
213 This contains the SIP Authenticate parameters that will be passed via subconnection
221 Creates a new SubConSIPAuthenticate parameter set object.
222 @param aFamily ,contains family related info
223 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
224 @return A pointer to the newly allocated object.
225 @leave KErrArgument if the data is not of type TParameterSetType.
227 inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
228 inline static CSubConSIPAuthenticateParamSet* NewL();
231 inline CSubConSIPAuthenticateParamSet();
234 virtual ~CSubConSIPAuthenticateParamSet();
236 /** Getters for SIP header. */
237 /** Gets Username field of the SIP header. **/
238 inline const TPtrC8 GetUserName() const;
239 /** Gets Password field of the SIP header. **/
240 inline const TPtrC8 GetPassword() const;
241 /** Gets Realm field of the SIP header. **/
242 inline const TPtrC8 GetRealm() const;
244 /** Setters for SIP header. */
245 /** Sets Username field of the SIP header. **/
246 inline void SetUserNameL(const TPtrC8 & aUserName);
247 /** Sets Password field of the SIP header. **/
248 inline void SetPasswordL(const TPtrC8 & aPassword);
249 /** Sets Realm field of the SIP header. **/
250 inline void SetRealmL(const TPtrC8 & aRealm);
255 /** The Username entry of Authenticate field in a SIP header. */
257 /** The Password entry of Authenticate field in a SIP header. */
259 /** The Realm entry of Authenticate field in a SIP header. */
265 class CSIPSubConnExtensionParamsFactory : public CBase
266 /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets.
273 static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters);
276 #include <sip_subconparams.inl>
278 #endif // SIP_SUBCONPARAMS_H