1 // Copyright (c) 1997-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 // Header file for the Automated Test Tool
24 #ifndef __CS_SUBCONEVENTS_H__
25 #define __CS_SUBCONEVENTS_H__
28 #include <comms-infras/metadata.h>
29 #include <comms-infras/metatype.h>
32 using Meta::RMetaDataEComContainer;
34 const TUint32 KSubConGenericEventParamsGranted = 0x1;
35 const TUint32 KSubConGenericEventDataClientJoined = 0x2;
36 const TUint32 KSubConGenericEventDataClientLeft = 0x4;
37 const TUint32 KSubConGenericEventSubConDown = 0x8;
38 const TUint32 KSubConGenericEventParamsChanged = 0x10;
39 const TUint32 KSubConGenericEventParamsRejected = 0x20;
41 class CSubConGenEventParamsGranted : public CSubConNotificationEvent
42 /** Subconnection parameters granted event.
44 Provides an interface for granted parameters event. This event will contain
45 a negotiated generic parameter set and zero or more negotiated extension parameter sets.
47 Notification of this event occurs after a request to RSubConnection::SetParameters()
48 has been made and negotiation with the network has been completed.
49 A notification will be received for each family contained in the parameter
50 bundle that was negotiated successfully. This event presents a generic set
51 and zero or more extension sets (providing they are supported by the
52 underlying sub-connection provider technology) of the parameter family
53 identified by the Id return from GetFamily().
55 The following operations are also provided:
57 GetGenericSet()/SetGenericSet() - Accessor function for Generic Parameter Sets.
58 GetExtensionSet() - Get extension parameter set of a particular index.
59 AddExtensionSetL() - Add extension parameter set.
60 GetFamily()/SetFamily() - Accessor function for parameter family type.
63 @released since v9.1 */
66 inline static CSubConGenEventParamsGranted* NewL();
68 inline CSubConGenEventParamsGranted();
70 inline const CSubConGenericParameterSet* const GetGenericSet() const;
71 inline void SetGenericSet(CSubConGenericParameterSet* aGenericSet);
73 inline const CSubConExtensionParameterSet* const GetExtensionSet(TUint aIndex) const;
74 inline void AddExtensionSetL(CSubConExtensionParameterSet* aExtensionSet);
75 inline TInt GetNumExtensionSets();
77 inline TUint32 GetFamily() const;
78 inline void SetFamily(TUint32 aFamily);
80 virtual ~CSubConGenEventParamsGranted();
86 CSubConGenericParameterSet* iGenericSet;
87 RMetaDataEComContainer iExtensionSets;
90 class CSubConGenEventParamsChanged : public CSubConGenEventParamsGranted
91 /** Subconnection parameters changed event.
93 Provides an interface for changed parameters event. This event will contain
94 only error code i.e, the reason for changing already negotiated parameters.
96 This event occurs when the properties of a parameter family has been renegotiated
97 due to some event on the network. It is not sent in response to a request to change
98 the properties. The change could be the result of an error or just that the level
99 of QoS has improved/worsened. If a new set of parameters are available they'll be
100 presented as with the CSubConGenEventParamsGranted event.
102 The error status is presented via the Error() method.
106 @released since v9.1 */
109 inline static CSubConGenEventParamsChanged* NewL();
111 inline CSubConGenEventParamsChanged();
113 inline TInt Error() const;
114 inline void SetError(TInt aError);
116 virtual ~CSubConGenEventParamsChanged();
124 class CSubConGenEventParamsRejected : public CSubConNotificationEvent
125 /** Subconnection parameters rejected event.
127 Provides an interface for rejected parameters event. This event will occur if
128 the negotiation with the network has failed for some reason. It will contain
129 the family type for which rejected event is generated & corresponding error
130 code i.e, the reason for rejecting the parameter set.
132 Notification of this event occurs after a request to SetParameters() has been made
133 and negotiation with the network has failed for some reason. It could be an error
134 within the handset software/configuration, or that the network could not provide
135 the acceptable (minimum) level of QoS. The reason for failure and the parameter
136 family are presented by the accessor methods Error() and FamilyId(). Like the
137 CSubConGenEventParamsGranted event, a notification for CSubConGenEventParamsRejected
138 is received for each family in the parameter bundle that could not be negotiated successfully.
140 The following operations are also provided:
142 Error()/SetError() - Accessor function for error value.
143 FamilyId()/SetFamilyId() - Accessor function for family parameter type.
146 @released since v9.1 */
149 inline static CSubConGenEventParamsRejected* NewL();
151 inline CSubConGenEventParamsRejected();
153 inline TInt Error() const;
154 inline void SetError(TInt aError);
155 inline TInt FamilyId() const;
156 inline void SetFamilyId ( TInt aFamilyId );
158 virtual ~CSubConGenEventParamsRejected();
167 class CSubConGenEventDataClientBase : public CSubConNotificationEvent
168 /** Provides interface for source and destination end points of the data client
169 along with IAP of the connection.
171 It is a base class for CSubConGenEventDataClientJoined & CSubConGenEventDataClientLeft
173 The following operations are also provided:
175 GetIap()/SetIap() - Accessor functions for Internet Access Point.
176 GetSourceAdress()/SetSourceAdress() - Accessor functions for source end points.
177 GetDestAdress()/SetDestAdress() - Accessor functions for destination end points.
180 @released since v9.1 */
183 inline CSubConGenEventDataClientBase();
184 inline TUint GetIap() const;
185 inline void SetIap(TUint aIap);
187 inline const TSockAddr& GetSourceAdress() const;
188 inline void SetSourceAddress(const TSockAddr& aSourceAddress);
190 inline const TSockAddr& GetDestAdress() const;
191 inline void SetDestAddress(const TSockAddr& aDestAddress);
193 virtual ~CSubConGenEventDataClientBase();
198 TSockAddr iSourceAddress;
199 TSockAddr iDestAddress;
203 class CSubConGenEventDataClientJoined : public CSubConGenEventDataClientBase
204 /** Data client joined event.
206 When an end-point(socket) was added in a sub-connection, CSubConGenEventDataClientJoined event is generated.
208 The base class CSubConGenEventDataClientBase contains sorce & destination
209 end points along with IAP of the connection.
212 @released since v9.1 */
215 inline static CSubConGenEventDataClientJoined* NewL();
217 inline CSubConGenEventDataClientJoined();
218 virtual ~CSubConGenEventDataClientJoined();
224 class CSubConGenEventDataClientLeft : public CSubConGenEventDataClientBase
225 /** Data client left event.
227 When an end-point(socket) was removed from a sub-connection, CSubConGenEventDataClientLeft event is generated.
229 The base class CSubConGenEventDataClientBase contains sorce & destination
230 end points along with IAP of the connection.
233 @released since v9.1 */
236 inline static CSubConGenEventDataClientLeft* NewL();
238 inline CSubConGenEventDataClientLeft();
240 virtual ~CSubConGenEventDataClientLeft();
246 class CSubConGenEventSubConDown : public CSubConNotificationEvent
247 /** Subconnection down event.
249 This event occurs when the underlying sub-connection has been lost.
250 This could be due to request for it to be closed, or some error on the network.
251 The error status is presented via the Error() method
254 @released since v9.1 */
257 inline static CSubConGenEventSubConDown* NewL();
259 inline CSubConGenEventSubConDown();
261 inline TInt Error() const;
262 inline void SetError(TInt aError);
264 virtual ~CSubConGenEventSubConDown();
273 #include <cs_subconevents.inl>
274 #endif // __CS_SUBCONEVENTS_H__