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