epoc32/include/sip_subconparams.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // SIPSCPR_subconparams.h
    15 // SIP extension parameters definition
    16 // 
    17 //
    18 
    19 
    20 
    21 /**
    22  @file
    23  @publishedAll
    24  @released since v9.2
    25 */
    26 
    27 #ifndef SIP_SUBCONPARAMS_H
    28 #define SIP_SUBCONPARAMS_H
    29 
    30 #include <es_sock.h>
    31 #include <comms-infras/metabuffer.h>
    32 
    33 /** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */
    34 const TInt KSubConSIPParametersUid = 0x10274C18;
    35 
    36 /** The numeric value of Invite identifier for SIP extension parameter set  */
    37 const TInt KSubConSIPInviteParamsType = 1;
    38 
    39 /** The numeric value of Subscribe identifier for SIP extension parameter set  */
    40 const TInt KSubConSIPSubscribeParamsType = 2;
    41 
    42 /** The numeric value of Authentication of SIP extension parameter set  */
    43 const TInt KSubConSIPAuthenticateParamsType = 3;
    44 
    45 class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet
    46 /** 
    47 This contains the SIP Invite parameters that will be passed via subconnection
    48 to the SIP stack
    49 @publishedAll
    50 @released since v9.2 
    51 */
    52 {
    53 public:
    54      /**
    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.
    60 	 */   
    61 	inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
    62 	inline static CSubConSIPInviteParamSet* NewL();
    63 	
    64 	/** Constructor. */
    65 	inline CSubConSIPInviteParamSet();
    66 	/** Destructor. */
    67 	virtual ~CSubConSIPInviteParamSet();
    68 	
    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;
    84 	
    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);
   100 	
   101 	DATA_VTABLE
   102 protected:
   103 
   104 	/** The Request URI field of the SIP header. */
   105 	RBuf8	iReqUri;
   106 	/** The From field of the SIP header. */
   107 	RBuf8	iFrom;
   108 	/** The To field of the SIP header. */
   109 	RBuf8	iTo;
   110 	/** The Contact field of the SIP header. */
   111 	RBuf8	iContact;
   112 	/** The Content Type field of the SIP header. */
   113 	RBuf8	iContentType;
   114 	/** The Content Sub Type field of the SIP header. */
   115 	RBuf8	iContentSubType;
   116 	/** The Content field of the SIP header. */
   117 	RBuf8	iContent;
   118 	};
   119 	
   120 	
   121 	
   122 class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet
   123 /** 
   124 This contains the SIP Subscribe parameters that will be passed via subconnection
   125 to the SIP stack
   126 @publishedAll
   127 @released since v9.2 
   128 */
   129 {
   130 public:
   131     /**
   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.
   137 	 */    
   138 	inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
   139 	inline static CSubConSIPSubscribeParamSet* NewL();
   140 	
   141 	/** Constructor. */
   142 	inline CSubConSIPSubscribeParamSet();
   143 	
   144 	/** Destructor. */
   145     virtual ~CSubConSIPSubscribeParamSet();
   146     
   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;
   166 	
   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);
   186 	
   187 	
   188 	DATA_VTABLE
   189 protected:
   190 	
   191 	/** The Request URI field of the SIP header. */
   192 	RBuf8	iReqUri;
   193 	/** The From field of the SIP header. */
   194 	RBuf8	iFrom;
   195 	/** The To field of the SIP header. */
   196 	RBuf8	iTo;
   197 	/** The Contact field of the SIP header. */
   198 	RBuf8	iContact;
   199 	/** The Event Type field of the SIP header. */
   200 	RBuf8	iEventType;
   201 	/** The Accept Type field of the SIP header. */
   202 	RBuf8	iAcceptType;
   203 	/** The Accept Sub Type field of the SIP header. */
   204 	RBuf8	iAcceptSubType;
   205 	/** The Expires field of the SIP header. */
   206 	TInt	iExpires;
   207 	/** The AutoRefresh field of the SIP header. */
   208 	TBool   iAutoRefresh;
   209 };
   210 	
   211 class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet
   212 /** 
   213 This contains the SIP Authenticate parameters that will be passed via subconnection
   214 to the SIP stack
   215 @publishedAll
   216 @released since v9.2 
   217 */
   218 {
   219 public:
   220     /**
   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.
   226 	 */    
   227 	inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
   228 	inline static CSubConSIPAuthenticateParamSet* NewL();
   229 	
   230 	/** Constructor. */
   231 	inline CSubConSIPAuthenticateParamSet();
   232 	
   233 	/** Destructor. */
   234 	virtual ~CSubConSIPAuthenticateParamSet();
   235 	
   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;
   243 	
   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);
   251 	
   252 	DATA_VTABLE
   253 protected:
   254 
   255 	/** The Username entry of Authenticate field in a SIP header. */
   256 	RBuf8	iUserName;
   257 	/** The Password entry of Authenticate field in a SIP header. */
   258 	RBuf8	iPassword;
   259 	/** The Realm entry of Authenticate field in a SIP header. */
   260 	RBuf8	iRealm;	
   261 };
   262 
   263 
   264 
   265 class CSIPSubConnExtensionParamsFactory : public CBase
   266 /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets.
   267 
   268 @publishedAll
   269 @released since v9.2 
   270 */
   271 	{
   272 public:
   273 	static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters);
   274 	};
   275 
   276 #include <sip_subconparams.inl>
   277 
   278 #endif // SIP_SUBCONPARAMS_H