epoc32/include/cs_subconevents.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     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  @file 
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef __CS_SUBCONEVENTS_H__
    25 #define __CS_SUBCONEVENTS_H__
    26 #include <e32base.h>
    27 #include <e32std.h>
    28 #include <comms-infras/metadata.h>
    29 #include <comms-infras/metatype.h>
    30 
    31 #include <es_sock.h>
    32 using Meta::RMetaDataEComContainer;
    33 
    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;
    40 
    41 class CSubConGenEventParamsGranted : public CSubConNotificationEvent
    42 /** Subconnection parameters granted event.
    43 
    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.
    46 
    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().
    54 
    55 The following operations are also provided:
    56 
    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.
    61 
    62 @publishedAll
    63 @released since v9.1 */
    64 {
    65 public:
    66 	inline static CSubConGenEventParamsGranted* NewL();
    67 
    68 	inline CSubConGenEventParamsGranted();
    69 
    70 	inline const CSubConGenericParameterSet* const GetGenericSet() const;
    71 	inline void SetGenericSet(CSubConGenericParameterSet* aGenericSet);
    72 
    73 	inline const CSubConExtensionParameterSet* const GetExtensionSet(TUint aIndex) const;
    74 	inline void AddExtensionSetL(CSubConExtensionParameterSet* aExtensionSet);
    75 	inline TInt GetNumExtensionSets();
    76 
    77 	inline TUint32 GetFamily() const;
    78 	inline void SetFamily(TUint32 aFamily);
    79 
    80 	virtual ~CSubConGenEventParamsGranted();
    81 
    82 protected:
    83 	DATA_VTABLE
    84 
    85 	TUint32 iFamily;
    86 	CSubConGenericParameterSet* iGenericSet;
    87 	RMetaDataEComContainer iExtensionSets;
    88 	};
    89 
    90 class CSubConGenEventParamsChanged : public CSubConGenEventParamsGranted
    91 /** Subconnection parameters changed event.
    92 
    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.
    95 
    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. 
   101 
   102 The error status is presented via the Error() method.
   103 
   104 
   105 @publishedAll
   106 @released since v9.1 */
   107 	{
   108 public:
   109 	inline static CSubConGenEventParamsChanged* NewL();
   110 
   111 	inline CSubConGenEventParamsChanged();
   112 
   113 	inline TInt Error() const;
   114 	inline void SetError(TInt aError);
   115 
   116 	virtual ~CSubConGenEventParamsChanged();
   117 
   118 protected:
   119 	DATA_VTABLE
   120 
   121 	TInt iError;
   122 	};
   123 
   124 class CSubConGenEventParamsRejected : public CSubConNotificationEvent
   125 /** Subconnection parameters rejected event.
   126 
   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.
   131 
   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.
   139 
   140 The following operations are also provided:
   141 
   142 Error()/SetError() - Accessor function for error value.
   143 FamilyId()/SetFamilyId() - Accessor function for family parameter type.
   144 
   145 @publishedAll
   146 @released since v9.1 */
   147 	{
   148 public:
   149 	inline static CSubConGenEventParamsRejected* NewL();
   150 
   151 	inline CSubConGenEventParamsRejected();
   152 
   153 	inline TInt Error() const;
   154 	inline void SetError(TInt aError);
   155 	inline TInt FamilyId() const;
   156 	inline void SetFamilyId ( TInt aFamilyId );
   157 
   158 	virtual ~CSubConGenEventParamsRejected();
   159 
   160 protected:
   161 	DATA_VTABLE
   162 
   163 	TInt iError;
   164 	TInt iFamilyId;
   165 	};
   166 
   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.
   170 
   171 It is a base class for CSubConGenEventDataClientJoined & CSubConGenEventDataClientLeft
   172 
   173 The following operations are also provided:
   174 
   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.
   178 
   179 @publishedAll
   180 @released since v9.1 */
   181 	{
   182 public:
   183 	inline CSubConGenEventDataClientBase();
   184 	inline TUint GetIap() const;
   185 	inline void SetIap(TUint aIap);
   186 
   187 	inline const TSockAddr& GetSourceAdress() const;
   188 	inline void SetSourceAddress(const TSockAddr& aSourceAddress);
   189 
   190 	inline const TSockAddr& GetDestAdress() const;
   191 	inline void SetDestAddress(const TSockAddr& aDestAddress);
   192 
   193 	virtual ~CSubConGenEventDataClientBase();
   194 
   195 protected:
   196 	DATA_VTABLE
   197 
   198 	TSockAddr iSourceAddress;
   199 	TSockAddr iDestAddress;
   200 	TUint	  iIap;
   201 	};
   202 
   203 class CSubConGenEventDataClientJoined : public CSubConGenEventDataClientBase
   204 /** Data client joined event.
   205 
   206 When an end-point(socket) was added in a sub-connection, CSubConGenEventDataClientJoined event is generated.
   207 
   208 The base class CSubConGenEventDataClientBase contains sorce & destination 
   209 end points along with IAP of the connection.
   210 
   211 @publishedAll
   212 @released since v9.1 */
   213 	{
   214 public:
   215 	inline static CSubConGenEventDataClientJoined* NewL();
   216 
   217 	inline CSubConGenEventDataClientJoined();
   218 	virtual ~CSubConGenEventDataClientJoined();
   219 
   220 protected:
   221 	DATA_VTABLE
   222 	};
   223 
   224 class CSubConGenEventDataClientLeft : public CSubConGenEventDataClientBase 
   225 /** Data client left event.
   226 
   227 When an end-point(socket) was removed from a sub-connection, CSubConGenEventDataClientLeft event is generated.
   228 
   229 The base class CSubConGenEventDataClientBase contains sorce & destination 
   230 end points along with IAP of the connection.
   231 
   232 @publishedAll
   233 @released since v9.1 */
   234 {
   235 public:
   236 	inline static CSubConGenEventDataClientLeft* NewL();
   237 
   238 	inline CSubConGenEventDataClientLeft();
   239 
   240 	virtual ~CSubConGenEventDataClientLeft();
   241 
   242 protected:
   243 	DATA_VTABLE
   244 	};
   245 
   246 class CSubConGenEventSubConDown : public CSubConNotificationEvent
   247 /** Subconnection down event.
   248 
   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
   252 
   253 @publishedAll
   254 @released since v9.1 */
   255 {
   256 public:
   257 	inline static CSubConGenEventSubConDown* NewL();
   258 
   259 	inline CSubConGenEventSubConDown();
   260 
   261 	inline TInt Error() const;
   262 	inline void SetError(TInt aError);
   263 
   264 	virtual ~CSubConGenEventSubConDown();
   265 
   266 protected:
   267 	DATA_VTABLE
   268 
   269 	TInt iError;
   270 	};
   271 
   272 
   273 #include <cs_subconevents.inl>
   274 #endif	// __CS_SUBCONEVENTS_H__
   275