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