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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // SIPSCPR_subconparams.h
15 // SIP extension parameters definition
25 #ifndef SIP_SUBCONPARAMS_H
26 #define SIP_SUBCONPARAMS_H
29 #include <comms-infras/es_parameterfamily.h>
31 /** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */
32 const TInt KSubConSIPParametersUid = 0x10274C18;
34 /** The numeric value of Invite identifier for SIP extension parameter set */
35 const TInt KSubConSIPInviteParamsType = 1;
37 /** The numeric value of Subscribe identifier for SIP extension parameter set */
38 const TInt KSubConSIPSubscribeParamsType = 2;
40 /** The numeric value of Authentication of SIP extension parameter set */
41 const TInt KSubConSIPAuthenticateParamsType = 3;
43 class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet
45 This contains the SIP Invite parameters that will be passed via subconnection
53 Creates a new SubConSIPInvite parameter set object.
54 @param aFamily ,contains family related info
55 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
56 @return A pointer to the newly allocated object.
57 @leave KErrArgument if the data is not of type TParameterSetType.
59 inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
60 inline static CSubConSIPInviteParamSet* NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType);
61 inline static CSubConSIPInviteParamSet* NewL();
64 inline CSubConSIPInviteParamSet();
66 virtual ~CSubConSIPInviteParamSet();
68 /** Getters for SIP header. */
69 /** Gets Request URI field of the SIP header. **/
70 inline const TPtrC8 GetRequestUri() const;
71 /** Gets From field of the SIP header. **/
72 inline const TPtrC8 GetFrom() const;
73 /** Gets To field of the SIP header. **/
74 inline const TPtrC8 GetTo() const;
75 /** Gets Contact field of the SIP header. **/
76 inline const TPtrC8 GetContact() const;
77 /** Gets ContentType field of the SIP header. **/
78 inline const TPtrC8 GetContentType() const;
79 /** Gets ContentSubType field of the SIP header. **/
80 inline const TPtrC8 GetContentSubType() const;
81 /** Gets Content field of the SIP header. **/
82 inline const TPtrC8 GetContent() const;
84 /** Setters for SIP header.
85 /** Sets Request URI field of the SIP header. **/
86 inline void SetRequestUriL(const TPtrC8 & aReqUri);
87 /** Sets From field of the SIP header. **/
88 inline void SetFromL(const TPtrC8 & aFrom);
89 /** Sets To field of the SIP header. **/
90 inline void SetToL(const TPtrC8 & aTo);
91 /** Sets Contact field of the SIP header. **/
92 inline void SetContactL(const TPtrC8 & aContact);
93 /** Sets Content Type field of the SIP header. **/
94 inline void SetContentTypeL(const TPtrC8 & aContentType);
95 /** Sets Content Sub Type field of the SIP header. **/
96 inline void SetContentSubTypeL(const TPtrC8 & aContentSubType);
97 /** Sets Content field of the SIP header. **/
98 inline void SetContentL(const TPtrC8 & aContent);
103 /** The Request URI field of the SIP header. */
105 /** The From field of the SIP header. */
107 /** The To field of the SIP header. */
109 /** The Contact field of the SIP header. */
111 /** The Content Type field of the SIP header. */
113 /** The Content Sub Type field of the SIP header. */
114 RBuf8 iContentSubType;
115 /** The Content field of the SIP header. */
121 class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet
123 This contains the SIP Subscribe parameters that will be passed via subconnection
131 Creates a new SubConSIPSubscribe parameter set object.
132 @param aFamily ,contains family related info
133 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
134 @return A pointer to the newly allocated object.
135 @leave KErrArgument if the data is not of type TParameterSetType.
137 inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
138 inline static CSubConSIPSubscribeParamSet* NewL();
141 inline CSubConSIPSubscribeParamSet();
144 virtual ~CSubConSIPSubscribeParamSet();
146 /** Getters for SIP header. */
147 /** Gets Request URI field of the SIP header. **/
148 inline const TPtrC8 GetRequestUri() const;
149 /** Gets From field of the SIP header. **/
150 inline const TPtrC8 GetFrom() const;
151 /** Gets To field of the SIP header. **/
152 inline const TPtrC8 GetTo() const;
153 /** Gets Contact field of the SIP header. **/
154 inline const TPtrC8 GetContact() const;
155 /** Gets Event Type field of the SIP header. **/
156 inline const TPtrC8 GetEventType() const;
157 /** Gets Accept Type field of the SIP header. **/
158 inline const TPtrC8 GetAcceptType() const;
159 /** Gets Accept Sub Type field of the SIP header. **/
160 inline const TPtrC8 GetAcceptSubType() const;
161 /** Gets Expires field of the SIP header. **/
162 inline const TInt GetExpires() const;
163 /** Gets Auto Refresh field of the SIP header. **/
164 inline const TBool GetAutoRefresh() const;
166 /** Setters for SIP header. */
167 /** Sets Request URI field of the SIP header. **/
168 inline void SetRequestUriL(const TPtrC8 & aReqUri);
169 /** Sets From field of the SIP header. **/
170 inline void SetFromL(const TPtrC8 & aFrom);
171 /** Sets To field of the SIP header. **/
172 inline void SetToL(const TPtrC8 & aTo);
173 /** Sets Contact field of the SIP header. **/
174 inline void SetContactL(const TPtrC8 & aContact);
175 /** Sets Event Type field of the SIP header. **/
176 inline void SetEventTypeL(const TPtrC8 & aEventType);
177 /** Sets Accept Type field of the SIP header. **/
178 inline void SetAcceptTypeL(const TPtrC8 & aAcceptType);
179 /** Sets Accept Sub Type field of the SIP header. **/
180 inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType);
181 /** Sets Expires Sub Type field of the SIP header. **/
182 inline void SetExpires(TInt aExpires);
183 /** Sets AutoRfresh field of the SIP header. **/
184 inline void SetAutoRefresh(TBool aAutoRefresh);
190 /** The Request URI field of the SIP header. */
192 /** The From field of the SIP header. */
194 /** The To field of the SIP header. */
196 /** The Contact field of the SIP header. */
198 /** The Event Type field of the SIP header. */
200 /** The Accept Type field of the SIP header. */
202 /** The Accept Sub Type field of the SIP header. */
203 RBuf8 iAcceptSubType;
204 /** The Expires field of the SIP header. */
206 /** The AutoRefresh field of the SIP header. */
210 class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet
212 This contains the SIP Authenticate parameters that will be passed via subconnection
220 Creates a new SubConSIPAuthenticate parameter set object.
221 @param aFamily ,contains family related info
222 @param aType contains parameter Type such as (Requested, Acceptable and Granted)
223 @return A pointer to the newly allocated object.
224 @leave KErrArgument if the data is not of type TParameterSetType.
226 inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
227 inline static CSubConSIPAuthenticateParamSet* NewL();
230 inline CSubConSIPAuthenticateParamSet();
233 virtual ~CSubConSIPAuthenticateParamSet();
235 /** Getters for SIP header. */
236 /** Gets Username field of the SIP header. **/
237 inline const TPtrC8 GetUserName() const;
238 /** Gets Password field of the SIP header. **/
239 inline const TPtrC8 GetPassword() const;
240 /** Gets Realm field of the SIP header. **/
241 inline const TPtrC8 GetRealm() const;
243 /** Setters for SIP header. */
244 /** Sets Username field of the SIP header. **/
245 inline void SetUserNameL(const TPtrC8 & aUserName);
246 /** Sets Password field of the SIP header. **/
247 inline void SetPasswordL(const TPtrC8 & aPassword);
248 /** Sets Realm field of the SIP header. **/
249 inline void SetRealmL(const TPtrC8 & aRealm);
254 /** The Username entry of Authenticate field in a SIP header. */
256 /** The Password entry of Authenticate field in a SIP header. */
258 /** The Realm entry of Authenticate field in a SIP header. */
264 class CSIPSubConnExtensionParamsFactory : public CBase
265 /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets.
272 static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters);
275 #include "SIP_subconparams.inl"
277 #endif // SIP_SUBCONPARAMS_H