epoc32/include/mw/sip_subconevents.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
2:2fe1408b6811 3:e1b950c65cb4
       
     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_subconevents.h
       
    15 // SIP extension events definition
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @publishedAll
       
    24  @released since v9.2
       
    25 */
       
    26  
       
    27 #ifndef SIPSCPR_SUBCONEVENTS_H
       
    28 #define SIPSCPR_SUBCONEVENTS_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 SIP event parameter.See the assisting *.rss file. */
       
    34 const TInt KSubConSIPEventsUid = 0x10274CAE;
       
    35 
       
    36 /** The numeric value of Response event type identifier for SIP extension parameter set  */
       
    37 const TInt KSubConSIPResponseEventType = 1;
       
    38 
       
    39 /** The numeric value of AuthenticationRequired event type identifier for SIP extension parameter set  */
       
    40 const TInt KSubConSIPAuthenticationRequiredEventType = 2;
       
    41 
       
    42 /** The numeric value of Notification event type identifier for SIP extension parameter set  */
       
    43 const TInt KSubConSIPNotificationEventType = 3;
       
    44 
       
    45 
       
    46 class CSubConSIPResponseEvent : public CSubConNotificationEvent
       
    47 /** CSubConSIPResponseEvent is used to get and set the response elements of the most recent response  
       
    48 
       
    49 @publishedAll
       
    50 @released since v9.2 */
       
    51 	{
       
    52 public:
       
    53 	/**
       
    54 	 Identifies the  predefined type of Response 		 .
       
    55 	 */
       
    56     enum PredefinedResponses
       
    57         {
       
    58         /** The numeric value of Invalid Response */
       
    59         EInvalidResponse = 0
       
    60         };
       
    61         
       
    62 	inline static CSubConSIPResponseEvent* NewL();
       
    63 	/** Constructor. */
       
    64 	inline CSubConSIPResponseEvent();
       
    65 	/** Destructor. */
       
    66 	virtual ~CSubConSIPResponseEvent();
       
    67 	/** Sets Response Code of the SIP Response. **/	
       
    68 	inline void SetResponse(TInt aResponse);
       
    69 	/** Gets Response Code of the SIP Response. **/	
       
    70 	inline TInt GetResponse() const;
       
    71 
       
    72 protected:
       
    73 	/** The Response Code of the SIP reasponse. */
       
    74     TInt iResponse;
       
    75 	DATA_VTABLE
       
    76 	};
       
    77 	
       
    78 
       
    79 class CSubConSIPAuthenticationRequiredEvent : public CSubConNotificationEvent
       
    80 /** CSubConSIPAuthenticationRequiredEvent is used  when SIP authentication is required
       
    81 
       
    82 @publishedAll
       
    83 @released since v9.2 */
       
    84 	{
       
    85 public:
       
    86         
       
    87 	inline static CSubConSIPAuthenticationRequiredEvent* NewL();
       
    88 	/** Constructor. */
       
    89 	inline CSubConSIPAuthenticationRequiredEvent();
       
    90 	/** Destructor. */
       
    91 	virtual ~CSubConSIPAuthenticationRequiredEvent();
       
    92 	/** Sets Realm field of the SIP header. **/	
       
    93 	inline void SetRealmL(const TPtrC8& aRealm);
       
    94 	/** Gets Realm field of the SIP header. **/	
       
    95 	inline const TPtrC8& GetRealm() const;
       
    96 
       
    97 protected:
       
    98 	/** The Realm entry of Authenticate field in a SIP header. */
       
    99 	RBuf8	iRealm;
       
   100 	DATA_VTABLE
       
   101 	};
       
   102 
       
   103 
       
   104 class CSubConSIPNotificationEvent : public CSubConNotificationEvent
       
   105 /** CSubConSIPNotificationEvent is used for receiving SIP event notifications 
       
   106 
       
   107 @publishedAll
       
   108 @released since v9.2 */
       
   109 	{
       
   110 public:
       
   111   	inline static CSubConSIPNotificationEvent* NewL();
       
   112   	/** Constructor. */
       
   113 	inline CSubConSIPNotificationEvent();
       
   114 	/** Destructor. */
       
   115 	virtual ~CSubConSIPNotificationEvent();
       
   116 	/** Sets Notification for an event. **/	
       
   117 	inline void SetNotificationL(const TPtrC8 & aNotification);
       
   118 	/** Gets Notification for an event. **/	
       
   119 	inline const TPtrC8& GetNotification() const;
       
   120 
       
   121 protected:
       
   122 	/** The Notification entry. */
       
   123     RBuf8 iNotification;
       
   124 	DATA_VTABLE
       
   125 	};	
       
   126 	
       
   127 
       
   128 class CSIPSubConnExtensionEventsFactory : public CBase
       
   129 /** Factory used to create instances of the SIP SubConnection Extension Events
       
   130 
       
   131 @publishedAll
       
   132 @released since v9.2 
       
   133 */
       
   134 	{
       
   135 public:
       
   136 	static CSubConNotificationEvent* NewL(TAny* aConstructionParameters);
       
   137 	};
       
   138 
       
   139 #include <sip_subconevents.inl>
       
   140 
       
   141 #endif // SIPSCPR_SUBCONEVENTS_H