epoc32/include/cs_subconevents.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 cs_subconevents.h
     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 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 // Header file for the Automated Test Tool
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __CS_SUBCONEVENTS_H__
       
    27 #define __CS_SUBCONEVENTS_H__
       
    28 #include <e32base.h>
       
    29 #include <e32std.h>
       
    30 #include <comms-infras/metadata.h>
       
    31 #include <comms-infras/metatype.h>
       
    32 
       
    33 #include <es_sock.h>
       
    34 using Meta::RMetaDataEComContainer;
       
    35 
       
    36 const TUint32 KSubConGenericEventParamsGranted      =  0x1;
       
    37 const TUint32 KSubConGenericEventDataClientJoined   =  0x2;
       
    38 const TUint32 KSubConGenericEventDataClientLeft     =  0x4;
       
    39 const TUint32 KSubConGenericEventSubConDown         =  0x8;
       
    40 const TUint32 KSubConGenericEventParamsChanged      = 0x10;
       
    41 const TUint32 KSubConGenericEventParamsRejected     = 0x20;
       
    42 
       
    43 class CSubConGenEventParamsGranted : public CSubConNotificationEvent
       
    44 /** Subconnection parameters granted event.
       
    45 
       
    46 Provides an interface for granted parameters event. This event will contain
       
    47 a negotiated generic parameter set and zero or more negotiated extension parameter sets.
       
    48 
       
    49 Notification of this event occurs after a request to RSubConnection::SetParameters()  
       
    50 has been made and negotiation with the network has been completed.
       
    51 A notification will be received for each family contained in the parameter 
       
    52 bundle that was negotiated successfully. This event presents a generic set 
       
    53 and zero or more extension sets (providing they are supported by the 
       
    54 underlying sub-connection provider technology) of the parameter family 
       
    55 identified by the Id return from GetFamily().
       
    56 
       
    57 The following operations are also provided:
       
    58 
       
    59 GetGenericSet()/SetGenericSet() - Accessor function for Generic Parameter Sets.
       
    60 GetExtensionSet() - Get extension parameter set of a particular index.
       
    61 AddExtensionSetL() - Add extension parameter set.
       
    62 GetFamily()/SetFamily() - Accessor function for parameter family type.
       
    63 
       
    64 @publishedAll
       
    65 @released since v9.1 */
       
    66 {
       
    67 public:
       
    68 	inline static CSubConGenEventParamsGranted* NewL();
       
    69 
       
    70 	inline CSubConGenEventParamsGranted();
       
    71 
       
    72 	inline const CSubConGenericParameterSet* const GetGenericSet() const;
       
    73 	inline void SetGenericSet(CSubConGenericParameterSet* aGenericSet);
       
    74 
       
    75 	inline const CSubConExtensionParameterSet* const GetExtensionSet(TUint aIndex) const;
       
    76 	inline void AddExtensionSetL(CSubConExtensionParameterSet* aExtensionSet);
       
    77 	inline TInt GetNumExtensionSets();
       
    78 
       
    79 	inline TUint32 GetFamily() const;
       
    80 	inline void SetFamily(TUint32 aFamily);
       
    81 
       
    82 	virtual ~CSubConGenEventParamsGranted();
       
    83 
       
    84 protected:
       
    85 	DATA_VTABLE
       
    86 
       
    87 	TUint32 iFamily;
       
    88 	CSubConGenericParameterSet* iGenericSet;
       
    89 	RMetaDataEComContainer iExtensionSets;
       
    90 	};
       
    91 
       
    92 class CSubConGenEventParamsChanged : public CSubConGenEventParamsGranted
       
    93 /** Subconnection parameters changed event.
       
    94 
       
    95 Provides an interface for changed parameters event. This event will contain
       
    96 only error code i.e, the reason for changing already negotiated parameters.
       
    97 
       
    98 This event occurs when the properties of a parameter family has been renegotiated 
       
    99 due to some event on the network. It is not sent in response to a request to change 
       
   100 the properties. The change could be the result of an error or just that the level 
       
   101 of QoS has improved/worsened. If a new set of parameters are available they'll be 
       
   102 presented as with the CSubConGenEventParamsGranted event. 
       
   103 
       
   104 The error status is presented via the Error() method.
       
   105 
       
   106 
       
   107 @publishedAll
       
   108 @released since v9.1 */
       
   109 	{
       
   110 public:
       
   111 	inline static CSubConGenEventParamsChanged* NewL();
       
   112 
       
   113 	inline CSubConGenEventParamsChanged();
       
   114 
       
   115 	inline TInt Error() const;
       
   116 	inline void SetError(TInt aError);
       
   117 
       
   118 	virtual ~CSubConGenEventParamsChanged();
       
   119 
       
   120 protected:
       
   121 	DATA_VTABLE
       
   122 
       
   123 	TInt iError;
       
   124 	};
       
   125 
       
   126 class CSubConGenEventParamsRejected : public CSubConNotificationEvent
       
   127 /** Subconnection parameters rejected event.
       
   128 
       
   129 Provides an interface for rejected parameters event. This event will occur if
       
   130 the negotiation with the network has failed for some reason. It will contain
       
   131 the family type for which rejected event is generated & corresponding error 
       
   132 code i.e, the reason for rejecting the parameter set.
       
   133 
       
   134 Notification of this event occurs after a request to SetParameters() has been made 
       
   135 and negotiation with the network has failed for some reason. It could be an error 
       
   136 within the handset software/configuration, or that the network could not provide 
       
   137 the acceptable (minimum) level of QoS. The reason for failure and the parameter 
       
   138 family are presented by the accessor methods Error() and FamilyId(). Like the 
       
   139 CSubConGenEventParamsGranted event, a notification for CSubConGenEventParamsRejected 
       
   140 is received for each family in the parameter bundle that could not be negotiated successfully.
       
   141 
       
   142 The following operations are also provided:
       
   143 
       
   144 Error()/SetError() - Accessor function for error value.
       
   145 FamilyId()/SetFamilyId() - Accessor function for family parameter type.
       
   146 
       
   147 @publishedAll
       
   148 @released since v9.1 */
       
   149 	{
       
   150 public:
       
   151 	inline static CSubConGenEventParamsRejected* NewL();
       
   152 
       
   153 	inline CSubConGenEventParamsRejected();
       
   154 
       
   155 	inline TInt Error() const;
       
   156 	inline void SetError(TInt aError);
       
   157 	inline TInt FamilyId() const;
       
   158 	inline void SetFamilyId ( TInt aFamilyId );
       
   159 
       
   160 	virtual ~CSubConGenEventParamsRejected();
       
   161 
       
   162 protected:
       
   163 	DATA_VTABLE
       
   164 
       
   165 	TInt iError;
       
   166 	TInt iFamilyId;
       
   167 	};
       
   168 
       
   169 class CSubConGenEventDataClientBase : public CSubConNotificationEvent
       
   170 /** Provides interface for source and destination end points of the data client 
       
   171 along with IAP of the connection.
       
   172 
       
   173 It is a base class for CSubConGenEventDataClientJoined & CSubConGenEventDataClientLeft
       
   174 
       
   175 The following operations are also provided:
       
   176 
       
   177 GetIap()/SetIap() - Accessor functions for Internet Access Point.
       
   178 GetSourceAdress()/SetSourceAdress() - Accessor functions for source end points.
       
   179 GetDestAdress()/SetDestAdress() - Accessor functions for destination end points.
       
   180 
       
   181 @internalComponent
       
   182 @released since v9.1 */
       
   183 	{
       
   184 public:
       
   185 	inline CSubConGenEventDataClientBase();
       
   186 	inline TUint GetIap() const;
       
   187 	inline void SetIap(TUint aIap);
       
   188 
       
   189 	inline const TSockAddr& GetSourceAdress() const;
       
   190 	inline void SetSourceAddress(const TSockAddr& aSourceAddress);
       
   191 
       
   192 	inline const TSockAddr& GetDestAdress() const;
       
   193 	inline void SetDestAddress(const TSockAddr& aDestAddress);
       
   194 
       
   195 	virtual ~CSubConGenEventDataClientBase();
       
   196 
       
   197 protected:
       
   198 	DATA_VTABLE
       
   199 
       
   200 	TSockAddr iSourceAddress;
       
   201 	TSockAddr iDestAddress;
       
   202 	TUint	  iIap;
       
   203 	};
       
   204 
       
   205 class CSubConGenEventDataClientJoined : public CSubConGenEventDataClientBase
       
   206 /** Data client joined event.
       
   207 
       
   208 When an end-point(socket) was added in a sub-connection, CSubConGenEventDataClientJoined event is generated.
       
   209 
       
   210 The base class CSubConGenEventDataClientBase contains sorce & destination 
       
   211 end points along with IAP of the connection.
       
   212 
       
   213 @publishedAll
       
   214 @released since v9.1 */
       
   215 	{
       
   216 public:
       
   217 	inline static CSubConGenEventDataClientJoined* NewL();
       
   218 
       
   219 	inline CSubConGenEventDataClientJoined();
       
   220 	virtual ~CSubConGenEventDataClientJoined();
       
   221 
       
   222 protected:
       
   223 	DATA_VTABLE
       
   224 	};
       
   225 
       
   226 class CSubConGenEventDataClientLeft : public CSubConGenEventDataClientBase 
       
   227 /** Data client left event.
       
   228 
       
   229 When an end-point(socket) was removed from a sub-connection, CSubConGenEventDataClientLeft event is generated.
       
   230 
       
   231 The base class CSubConGenEventDataClientBase contains sorce & destination 
       
   232 end points along with IAP of the connection.
       
   233 
       
   234 @publishedAll
       
   235 @released since v9.1 */
       
   236 {
       
   237 public:
       
   238 	inline static CSubConGenEventDataClientLeft* NewL();
       
   239 
       
   240 	inline CSubConGenEventDataClientLeft();
       
   241 
       
   242 	virtual ~CSubConGenEventDataClientLeft();
       
   243 
       
   244 protected:
       
   245 	DATA_VTABLE
       
   246 	};
       
   247 
       
   248 class CSubConGenEventSubConDown : public CSubConNotificationEvent
       
   249 /** Subconnection down event.
       
   250 
       
   251 This event occurs when the underlying sub-connection has been lost.
       
   252 This could be due to request for it to be closed, or some error on the network.
       
   253 The error status is presented via the Error() method
       
   254 
       
   255 @publishedAll
       
   256 @released since v9.1 */
       
   257 {
       
   258 public:
       
   259 	inline static CSubConGenEventSubConDown* NewL();
       
   260 
       
   261 	inline CSubConGenEventSubConDown();
       
   262 
       
   263 	inline TInt Error() const;
       
   264 	inline void SetError(TInt aError);
       
   265 
       
   266 	virtual ~CSubConGenEventSubConDown();
       
   267 
       
   268 protected:
       
   269 	DATA_VTABLE
       
   270 
       
   271 	TInt iError;
       
   272 	};
       
   273 
       
   274 /** Sub connection generic event factory.
       
   275 
       
   276 @internalComponent
       
   277 @released since v9.1 */
       
   278 class CSubConGenEventsFactory : public CBase
       
   279 	{
       
   280 public:
       
   281 	static CSubConNotificationEvent* NewL(TAny* aConstructionParameters);
       
   282 	};
       
   283 
       
   284 #include <cs_subconevents.inl>
       
   285 #endif	// __CS_SUBCONEVENTS_H__