1.1 --- a/epoc32/include/cs_subconevents.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/cs_subconevents.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,285 @@
1.4 -cs_subconevents.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// Header file for the Automated Test Tool
1.19 +//
1.20 +//
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 + @publishedAll
1.27 + @released
1.28 +*/
1.29 +
1.30 +#ifndef __CS_SUBCONEVENTS_H__
1.31 +#define __CS_SUBCONEVENTS_H__
1.32 +#include <e32base.h>
1.33 +#include <e32std.h>
1.34 +#include <comms-infras/metadata.h>
1.35 +#include <comms-infras/metatype.h>
1.36 +
1.37 +#include <es_sock.h>
1.38 +using Meta::RMetaDataEComContainer;
1.39 +
1.40 +const TUint32 KSubConGenericEventParamsGranted = 0x1;
1.41 +const TUint32 KSubConGenericEventDataClientJoined = 0x2;
1.42 +const TUint32 KSubConGenericEventDataClientLeft = 0x4;
1.43 +const TUint32 KSubConGenericEventSubConDown = 0x8;
1.44 +const TUint32 KSubConGenericEventParamsChanged = 0x10;
1.45 +const TUint32 KSubConGenericEventParamsRejected = 0x20;
1.46 +
1.47 +class CSubConGenEventParamsGranted : public CSubConNotificationEvent
1.48 +/** Subconnection parameters granted event.
1.49 +
1.50 +Provides an interface for granted parameters event. This event will contain
1.51 +a negotiated generic parameter set and zero or more negotiated extension parameter sets.
1.52 +
1.53 +Notification of this event occurs after a request to RSubConnection::SetParameters()
1.54 +has been made and negotiation with the network has been completed.
1.55 +A notification will be received for each family contained in the parameter
1.56 +bundle that was negotiated successfully. This event presents a generic set
1.57 +and zero or more extension sets (providing they are supported by the
1.58 +underlying sub-connection provider technology) of the parameter family
1.59 +identified by the Id return from GetFamily().
1.60 +
1.61 +The following operations are also provided:
1.62 +
1.63 +GetGenericSet()/SetGenericSet() - Accessor function for Generic Parameter Sets.
1.64 +GetExtensionSet() - Get extension parameter set of a particular index.
1.65 +AddExtensionSetL() - Add extension parameter set.
1.66 +GetFamily()/SetFamily() - Accessor function for parameter family type.
1.67 +
1.68 +@publishedAll
1.69 +@released since v9.1 */
1.70 +{
1.71 +public:
1.72 + inline static CSubConGenEventParamsGranted* NewL();
1.73 +
1.74 + inline CSubConGenEventParamsGranted();
1.75 +
1.76 + inline const CSubConGenericParameterSet* const GetGenericSet() const;
1.77 + inline void SetGenericSet(CSubConGenericParameterSet* aGenericSet);
1.78 +
1.79 + inline const CSubConExtensionParameterSet* const GetExtensionSet(TUint aIndex) const;
1.80 + inline void AddExtensionSetL(CSubConExtensionParameterSet* aExtensionSet);
1.81 + inline TInt GetNumExtensionSets();
1.82 +
1.83 + inline TUint32 GetFamily() const;
1.84 + inline void SetFamily(TUint32 aFamily);
1.85 +
1.86 + virtual ~CSubConGenEventParamsGranted();
1.87 +
1.88 +protected:
1.89 + DATA_VTABLE
1.90 +
1.91 + TUint32 iFamily;
1.92 + CSubConGenericParameterSet* iGenericSet;
1.93 + RMetaDataEComContainer iExtensionSets;
1.94 + };
1.95 +
1.96 +class CSubConGenEventParamsChanged : public CSubConGenEventParamsGranted
1.97 +/** Subconnection parameters changed event.
1.98 +
1.99 +Provides an interface for changed parameters event. This event will contain
1.100 +only error code i.e, the reason for changing already negotiated parameters.
1.101 +
1.102 +This event occurs when the properties of a parameter family has been renegotiated
1.103 +due to some event on the network. It is not sent in response to a request to change
1.104 +the properties. The change could be the result of an error or just that the level
1.105 +of QoS has improved/worsened. If a new set of parameters are available they'll be
1.106 +presented as with the CSubConGenEventParamsGranted event.
1.107 +
1.108 +The error status is presented via the Error() method.
1.109 +
1.110 +
1.111 +@publishedAll
1.112 +@released since v9.1 */
1.113 + {
1.114 +public:
1.115 + inline static CSubConGenEventParamsChanged* NewL();
1.116 +
1.117 + inline CSubConGenEventParamsChanged();
1.118 +
1.119 + inline TInt Error() const;
1.120 + inline void SetError(TInt aError);
1.121 +
1.122 + virtual ~CSubConGenEventParamsChanged();
1.123 +
1.124 +protected:
1.125 + DATA_VTABLE
1.126 +
1.127 + TInt iError;
1.128 + };
1.129 +
1.130 +class CSubConGenEventParamsRejected : public CSubConNotificationEvent
1.131 +/** Subconnection parameters rejected event.
1.132 +
1.133 +Provides an interface for rejected parameters event. This event will occur if
1.134 +the negotiation with the network has failed for some reason. It will contain
1.135 +the family type for which rejected event is generated & corresponding error
1.136 +code i.e, the reason for rejecting the parameter set.
1.137 +
1.138 +Notification of this event occurs after a request to SetParameters() has been made
1.139 +and negotiation with the network has failed for some reason. It could be an error
1.140 +within the handset software/configuration, or that the network could not provide
1.141 +the acceptable (minimum) level of QoS. The reason for failure and the parameter
1.142 +family are presented by the accessor methods Error() and FamilyId(). Like the
1.143 +CSubConGenEventParamsGranted event, a notification for CSubConGenEventParamsRejected
1.144 +is received for each family in the parameter bundle that could not be negotiated successfully.
1.145 +
1.146 +The following operations are also provided:
1.147 +
1.148 +Error()/SetError() - Accessor function for error value.
1.149 +FamilyId()/SetFamilyId() - Accessor function for family parameter type.
1.150 +
1.151 +@publishedAll
1.152 +@released since v9.1 */
1.153 + {
1.154 +public:
1.155 + inline static CSubConGenEventParamsRejected* NewL();
1.156 +
1.157 + inline CSubConGenEventParamsRejected();
1.158 +
1.159 + inline TInt Error() const;
1.160 + inline void SetError(TInt aError);
1.161 + inline TInt FamilyId() const;
1.162 + inline void SetFamilyId ( TInt aFamilyId );
1.163 +
1.164 + virtual ~CSubConGenEventParamsRejected();
1.165 +
1.166 +protected:
1.167 + DATA_VTABLE
1.168 +
1.169 + TInt iError;
1.170 + TInt iFamilyId;
1.171 + };
1.172 +
1.173 +class CSubConGenEventDataClientBase : public CSubConNotificationEvent
1.174 +/** Provides interface for source and destination end points of the data client
1.175 +along with IAP of the connection.
1.176 +
1.177 +It is a base class for CSubConGenEventDataClientJoined & CSubConGenEventDataClientLeft
1.178 +
1.179 +The following operations are also provided:
1.180 +
1.181 +GetIap()/SetIap() - Accessor functions for Internet Access Point.
1.182 +GetSourceAdress()/SetSourceAdress() - Accessor functions for source end points.
1.183 +GetDestAdress()/SetDestAdress() - Accessor functions for destination end points.
1.184 +
1.185 +@internalComponent
1.186 +@released since v9.1 */
1.187 + {
1.188 +public:
1.189 + inline CSubConGenEventDataClientBase();
1.190 + inline TUint GetIap() const;
1.191 + inline void SetIap(TUint aIap);
1.192 +
1.193 + inline const TSockAddr& GetSourceAdress() const;
1.194 + inline void SetSourceAddress(const TSockAddr& aSourceAddress);
1.195 +
1.196 + inline const TSockAddr& GetDestAdress() const;
1.197 + inline void SetDestAddress(const TSockAddr& aDestAddress);
1.198 +
1.199 + virtual ~CSubConGenEventDataClientBase();
1.200 +
1.201 +protected:
1.202 + DATA_VTABLE
1.203 +
1.204 + TSockAddr iSourceAddress;
1.205 + TSockAddr iDestAddress;
1.206 + TUint iIap;
1.207 + };
1.208 +
1.209 +class CSubConGenEventDataClientJoined : public CSubConGenEventDataClientBase
1.210 +/** Data client joined event.
1.211 +
1.212 +When an end-point(socket) was added in a sub-connection, CSubConGenEventDataClientJoined event is generated.
1.213 +
1.214 +The base class CSubConGenEventDataClientBase contains sorce & destination
1.215 +end points along with IAP of the connection.
1.216 +
1.217 +@publishedAll
1.218 +@released since v9.1 */
1.219 + {
1.220 +public:
1.221 + inline static CSubConGenEventDataClientJoined* NewL();
1.222 +
1.223 + inline CSubConGenEventDataClientJoined();
1.224 + virtual ~CSubConGenEventDataClientJoined();
1.225 +
1.226 +protected:
1.227 + DATA_VTABLE
1.228 + };
1.229 +
1.230 +class CSubConGenEventDataClientLeft : public CSubConGenEventDataClientBase
1.231 +/** Data client left event.
1.232 +
1.233 +When an end-point(socket) was removed from a sub-connection, CSubConGenEventDataClientLeft event is generated.
1.234 +
1.235 +The base class CSubConGenEventDataClientBase contains sorce & destination
1.236 +end points along with IAP of the connection.
1.237 +
1.238 +@publishedAll
1.239 +@released since v9.1 */
1.240 +{
1.241 +public:
1.242 + inline static CSubConGenEventDataClientLeft* NewL();
1.243 +
1.244 + inline CSubConGenEventDataClientLeft();
1.245 +
1.246 + virtual ~CSubConGenEventDataClientLeft();
1.247 +
1.248 +protected:
1.249 + DATA_VTABLE
1.250 + };
1.251 +
1.252 +class CSubConGenEventSubConDown : public CSubConNotificationEvent
1.253 +/** Subconnection down event.
1.254 +
1.255 +This event occurs when the underlying sub-connection has been lost.
1.256 +This could be due to request for it to be closed, or some error on the network.
1.257 +The error status is presented via the Error() method
1.258 +
1.259 +@publishedAll
1.260 +@released since v9.1 */
1.261 +{
1.262 +public:
1.263 + inline static CSubConGenEventSubConDown* NewL();
1.264 +
1.265 + inline CSubConGenEventSubConDown();
1.266 +
1.267 + inline TInt Error() const;
1.268 + inline void SetError(TInt aError);
1.269 +
1.270 + virtual ~CSubConGenEventSubConDown();
1.271 +
1.272 +protected:
1.273 + DATA_VTABLE
1.274 +
1.275 + TInt iError;
1.276 + };
1.277 +
1.278 +/** Sub connection generic event factory.
1.279 +
1.280 +@internalComponent
1.281 +@released since v9.1 */
1.282 +class CSubConGenEventsFactory : public CBase
1.283 + {
1.284 +public:
1.285 + static CSubConNotificationEvent* NewL(TAny* aConstructionParameters);
1.286 + };
1.287 +
1.288 +#include <cs_subconevents.inl>
1.289 +#endif // __CS_SUBCONEVENTS_H__