williamr@2: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // SIPSCPR_subconparams.h williamr@2: // SIP extension parameters definition williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released since v9.2 williamr@2: */ williamr@2: williamr@2: #ifndef SIP_SUBCONPARAMS_H williamr@2: #define SIP_SUBCONPARAMS_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: /** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */ williamr@2: const TInt KSubConSIPParametersUid = 0x10274C18; williamr@2: williamr@2: /** The numeric value of Invite identifier for SIP extension parameter set */ williamr@2: const TInt KSubConSIPInviteParamsType = 1; williamr@2: williamr@2: /** The numeric value of Subscribe identifier for SIP extension parameter set */ williamr@2: const TInt KSubConSIPSubscribeParamsType = 2; williamr@2: williamr@2: /** The numeric value of Authentication of SIP extension parameter set */ williamr@2: const TInt KSubConSIPAuthenticateParamsType = 3; williamr@2: williamr@2: class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet williamr@2: /** williamr@2: This contains the SIP Invite parameters that will be passed via subconnection williamr@2: to the SIP stack williamr@2: @publishedAll williamr@2: @released since v9.2 williamr@2: */ williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Creates a new SubConSIPInvite parameter set object. williamr@2: @param aFamily ,contains family related info williamr@2: @param aType contains parameter Type such as (Requested, Acceptable and Granted) williamr@2: @return A pointer to the newly allocated object. williamr@2: @leave KErrArgument if the data is not of type TParameterSetType. williamr@2: */ williamr@2: inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); williamr@2: inline static CSubConSIPInviteParamSet* NewL(); williamr@2: williamr@2: /** Constructor. */ williamr@2: inline CSubConSIPInviteParamSet(); williamr@2: /** Destructor. */ williamr@2: virtual ~CSubConSIPInviteParamSet(); williamr@2: williamr@2: /** Getters for SIP header. */ williamr@2: /** Gets Request URI field of the SIP header. **/ williamr@2: inline const TPtrC8 GetRequestUri() const; williamr@2: /** Gets From field of the SIP header. **/ williamr@2: inline const TPtrC8 GetFrom() const; williamr@2: /** Gets To field of the SIP header. **/ williamr@2: inline const TPtrC8 GetTo() const; williamr@2: /** Gets Contact field of the SIP header. **/ williamr@2: inline const TPtrC8 GetContact() const; williamr@2: /** Gets ContentType field of the SIP header. **/ williamr@2: inline const TPtrC8 GetContentType() const; williamr@2: /** Gets ContentSubType field of the SIP header. **/ williamr@2: inline const TPtrC8 GetContentSubType() const; williamr@2: /** Gets Content field of the SIP header. **/ williamr@2: inline const TPtrC8 GetContent() const; williamr@2: williamr@2: /** Setters for SIP header. williamr@2: /** Sets Request URI field of the SIP header. **/ williamr@2: inline void SetRequestUriL(const TPtrC8 & aReqUri); williamr@2: /** Sets From field of the SIP header. **/ williamr@2: inline void SetFromL(const TPtrC8 & aFrom); williamr@2: /** Sets To field of the SIP header. **/ williamr@2: inline void SetToL(const TPtrC8 & aTo); williamr@2: /** Sets Contact field of the SIP header. **/ williamr@2: inline void SetContactL(const TPtrC8 & aContact); williamr@2: /** Sets Content Type field of the SIP header. **/ williamr@2: inline void SetContentTypeL(const TPtrC8 & aContentType); williamr@2: /** Sets Content Sub Type field of the SIP header. **/ williamr@2: inline void SetContentSubTypeL(const TPtrC8 & aContentSubType); williamr@2: /** Sets Content field of the SIP header. **/ williamr@2: inline void SetContentL(const TPtrC8 & aContent); williamr@2: williamr@2: DATA_VTABLE williamr@2: protected: williamr@2: williamr@2: /** The Request URI field of the SIP header. */ williamr@2: RBuf8 iReqUri; williamr@2: /** The From field of the SIP header. */ williamr@2: RBuf8 iFrom; williamr@2: /** The To field of the SIP header. */ williamr@2: RBuf8 iTo; williamr@2: /** The Contact field of the SIP header. */ williamr@2: RBuf8 iContact; williamr@2: /** The Content Type field of the SIP header. */ williamr@2: RBuf8 iContentType; williamr@2: /** The Content Sub Type field of the SIP header. */ williamr@2: RBuf8 iContentSubType; williamr@2: /** The Content field of the SIP header. */ williamr@2: RBuf8 iContent; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet williamr@2: /** williamr@2: This contains the SIP Subscribe parameters that will be passed via subconnection williamr@2: to the SIP stack williamr@2: @publishedAll williamr@2: @released since v9.2 williamr@2: */ williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Creates a new SubConSIPSubscribe parameter set object. williamr@2: @param aFamily ,contains family related info williamr@2: @param aType contains parameter Type such as (Requested, Acceptable and Granted) williamr@2: @return A pointer to the newly allocated object. williamr@2: @leave KErrArgument if the data is not of type TParameterSetType. williamr@2: */ williamr@2: inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); williamr@2: inline static CSubConSIPSubscribeParamSet* NewL(); williamr@2: williamr@2: /** Constructor. */ williamr@2: inline CSubConSIPSubscribeParamSet(); williamr@2: williamr@2: /** Destructor. */ williamr@2: virtual ~CSubConSIPSubscribeParamSet(); williamr@2: williamr@2: /** Getters for SIP header. */ williamr@2: /** Gets Request URI field of the SIP header. **/ williamr@2: inline const TPtrC8 GetRequestUri() const; williamr@2: /** Gets From field of the SIP header. **/ williamr@2: inline const TPtrC8 GetFrom() const; williamr@2: /** Gets To field of the SIP header. **/ williamr@2: inline const TPtrC8 GetTo() const; williamr@2: /** Gets Contact field of the SIP header. **/ williamr@2: inline const TPtrC8 GetContact() const; williamr@2: /** Gets Event Type field of the SIP header. **/ williamr@2: inline const TPtrC8 GetEventType() const; williamr@2: /** Gets Accept Type field of the SIP header. **/ williamr@2: inline const TPtrC8 GetAcceptType() const; williamr@2: /** Gets Accept Sub Type field of the SIP header. **/ williamr@2: inline const TPtrC8 GetAcceptSubType() const; williamr@2: /** Gets Expires field of the SIP header. **/ williamr@2: inline const TInt GetExpires() const; williamr@2: /** Gets Auto Refresh field of the SIP header. **/ williamr@2: inline const TBool GetAutoRefresh() const; williamr@2: williamr@2: /** Setters for SIP header. */ williamr@2: /** Sets Request URI field of the SIP header. **/ williamr@2: inline void SetRequestUriL(const TPtrC8 & aReqUri); williamr@2: /** Sets From field of the SIP header. **/ williamr@2: inline void SetFromL(const TPtrC8 & aFrom); williamr@2: /** Sets To field of the SIP header. **/ williamr@2: inline void SetToL(const TPtrC8 & aTo); williamr@2: /** Sets Contact field of the SIP header. **/ williamr@2: inline void SetContactL(const TPtrC8 & aContact); williamr@2: /** Sets Event Type field of the SIP header. **/ williamr@2: inline void SetEventTypeL(const TPtrC8 & aEventType); williamr@2: /** Sets Accept Type field of the SIP header. **/ williamr@2: inline void SetAcceptTypeL(const TPtrC8 & aAcceptType); williamr@2: /** Sets Accept Sub Type field of the SIP header. **/ williamr@2: inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType); williamr@2: /** Sets Expires Sub Type field of the SIP header. **/ williamr@2: inline void SetExpires(TInt aExpires); williamr@2: /** Sets AutoRfresh field of the SIP header. **/ williamr@2: inline void SetAutoRefresh(TBool aAutoRefresh); williamr@2: williamr@2: williamr@2: DATA_VTABLE williamr@2: protected: williamr@2: williamr@2: /** The Request URI field of the SIP header. */ williamr@2: RBuf8 iReqUri; williamr@2: /** The From field of the SIP header. */ williamr@2: RBuf8 iFrom; williamr@2: /** The To field of the SIP header. */ williamr@2: RBuf8 iTo; williamr@2: /** The Contact field of the SIP header. */ williamr@2: RBuf8 iContact; williamr@2: /** The Event Type field of the SIP header. */ williamr@2: RBuf8 iEventType; williamr@2: /** The Accept Type field of the SIP header. */ williamr@2: RBuf8 iAcceptType; williamr@2: /** The Accept Sub Type field of the SIP header. */ williamr@2: RBuf8 iAcceptSubType; williamr@2: /** The Expires field of the SIP header. */ williamr@2: TInt iExpires; williamr@2: /** The AutoRefresh field of the SIP header. */ williamr@2: TBool iAutoRefresh; williamr@2: }; williamr@2: williamr@2: class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet williamr@2: /** williamr@2: This contains the SIP Authenticate parameters that will be passed via subconnection williamr@2: to the SIP stack williamr@2: @publishedAll williamr@2: @released since v9.2 williamr@2: */ williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Creates a new SubConSIPAuthenticate parameter set object. williamr@2: @param aFamily ,contains family related info williamr@2: @param aType contains parameter Type such as (Requested, Acceptable and Granted) williamr@2: @return A pointer to the newly allocated object. williamr@2: @leave KErrArgument if the data is not of type TParameterSetType. williamr@2: */ williamr@2: inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); williamr@2: inline static CSubConSIPAuthenticateParamSet* NewL(); williamr@2: williamr@2: /** Constructor. */ williamr@2: inline CSubConSIPAuthenticateParamSet(); williamr@2: williamr@2: /** Destructor. */ williamr@2: virtual ~CSubConSIPAuthenticateParamSet(); williamr@2: williamr@2: /** Getters for SIP header. */ williamr@2: /** Gets Username field of the SIP header. **/ williamr@2: inline const TPtrC8 GetUserName() const; williamr@2: /** Gets Password field of the SIP header. **/ williamr@2: inline const TPtrC8 GetPassword() const; williamr@2: /** Gets Realm field of the SIP header. **/ williamr@2: inline const TPtrC8 GetRealm() const; williamr@2: williamr@2: /** Setters for SIP header. */ williamr@2: /** Sets Username field of the SIP header. **/ williamr@2: inline void SetUserNameL(const TPtrC8 & aUserName); williamr@2: /** Sets Password field of the SIP header. **/ williamr@2: inline void SetPasswordL(const TPtrC8 & aPassword); williamr@2: /** Sets Realm field of the SIP header. **/ williamr@2: inline void SetRealmL(const TPtrC8 & aRealm); williamr@2: williamr@2: DATA_VTABLE williamr@2: protected: williamr@2: williamr@2: /** The Username entry of Authenticate field in a SIP header. */ williamr@2: RBuf8 iUserName; williamr@2: /** The Password entry of Authenticate field in a SIP header. */ williamr@2: RBuf8 iPassword; williamr@2: /** The Realm entry of Authenticate field in a SIP header. */ williamr@2: RBuf8 iRealm; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: class CSIPSubConnExtensionParamsFactory : public CBase williamr@2: /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets. williamr@2: williamr@2: @publishedAll williamr@2: @released since v9.2 williamr@2: */ williamr@2: { williamr@2: public: williamr@2: static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); williamr@2: }; williamr@2: williamr@2: #include williamr@2: williamr@2: #endif // SIP_SUBCONPARAMS_H