37
|
1 |
/**
|
|
2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Header file for the default SubConnection Provider
|
|
16 |
*
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
/**
|
|
23 |
@file deft_scpr.h
|
|
24 |
*/
|
|
25 |
|
|
26 |
#ifndef __DEFT_CPR_H__
|
|
27 |
#define __DEFT_CPR_H__
|
|
28 |
|
|
29 |
#include <e32base.h>
|
|
30 |
#include <e32std.h>
|
|
31 |
#include <ss_subconnprov.h>
|
|
32 |
#include <ss_connprov.h>
|
|
33 |
#include "ipscprlog.h"
|
|
34 |
|
|
35 |
|
|
36 |
class CConnDataTransfer;
|
|
37 |
class CEmptySubConnectionProvider : public CSubConnectionProviderBase, public MConnectionEnumerateClients, public MConnectionDataClient
|
|
38 |
/**
|
|
39 |
Defines the IP Connection Provider. Class provides a mapping from ESock Subconnection
|
|
40 |
function calls to QoS.PRT messages.
|
|
41 |
|
|
42 |
@internalComponent
|
|
43 |
|
|
44 |
@released Since v9.0
|
|
45 |
*/
|
|
46 |
{
|
|
47 |
protected:
|
|
48 |
// Construction
|
|
49 |
CEmptySubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider) :
|
|
50 |
CSubConnectionProviderBase(aFactory, aConnProvider)
|
|
51 |
{
|
|
52 |
__IPCPRLOG(IpCprLog::Printf(_L("CEmptySubConnectionProvider [this=%08x]:\tCEmptySubConnectionProvider() [MConnectionDataClient=%08x]"),
|
|
53 |
this, (MConnectionDataClient*)this));
|
|
54 |
}
|
|
55 |
|
|
56 |
~CEmptySubConnectionProvider();
|
|
57 |
|
|
58 |
virtual MConnectionDataClient* DoSelfConnectionDataClient();
|
|
59 |
|
|
60 |
//MConnectionEnumerateClients
|
|
61 |
virtual void EnumerateClientsL(TUint& aCount, TDes8& aDes, CConnectionProviderBase::TEnumClients aClientType);
|
|
62 |
|
|
63 |
//MConnectionDataClient
|
|
64 |
virtual void ConnectionError(TInt aStage, TInt aError);
|
|
65 |
|
|
66 |
virtual void DoControlClientJoiningL(MSubConnectionControlClient& aControlClient);
|
|
67 |
virtual void DoControlClientLeaving(MSubConnectionControlClient& aControlClient);
|
|
68 |
};
|
|
69 |
|
|
70 |
|
|
71 |
/**
|
|
72 |
Defines the default IP Connection Provider.
|
|
73 |
|
|
74 |
@internalComponent
|
|
75 |
|
|
76 |
@released Since v9.0
|
|
77 |
*/
|
|
78 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
79 |
class CDefaultSubConnectionProvider : public CEmptySubConnectionProvider, public MSubConnectionControlClient
|
|
80 |
#else
|
|
81 |
class CDefaultSubConnectionProvider : public CEmptySubConnectionProvider
|
|
82 |
#endif
|
|
83 |
//SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
84 |
{
|
|
85 |
public:
|
|
86 |
|
|
87 |
// Construction
|
|
88 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
89 |
CDefaultSubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider, RSubConnection::TSubConnType aType)
|
|
90 |
: CEmptySubConnectionProvider(aFactory, aConnProvider), iSubConnType(aType)
|
|
91 |
#else
|
|
92 |
CDefaultSubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider)
|
|
93 |
: CEmptySubConnectionProvider(aFactory, aConnProvider)
|
|
94 |
#endif
|
|
95 |
{
|
|
96 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
97 |
__IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tCDefaultSubConnectionProvider() [MSubConnectionControlClient=%08x] [MConnectionDataClient=%08x]"),
|
|
98 |
this, (MSubConnectionControlClient*)this, (MConnectionDataClient*)this));
|
|
99 |
#else
|
|
100 |
__IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tCDefaultSubConnectionProvider() [MConnectionDataClient=%08x]"),
|
|
101 |
this, (MConnectionDataClient*)this));
|
|
102 |
#endif
|
|
103 |
}
|
|
104 |
|
|
105 |
~CDefaultSubConnectionProvider();
|
|
106 |
|
|
107 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
108 |
//-=========================================================
|
|
109 |
// MSubConnectionControlClient methods
|
|
110 |
//-=========================================================
|
|
111 |
/** Override this to inform the sub-connection client (e.g. socket, host resolver etc.) that
|
|
112 |
the sub-connection is going down
|
|
113 |
|
|
114 |
@param aSubConnProvider the sub-connection provider going down */
|
|
115 |
virtual void SubConnectionGoingDown(CSubConnectionProviderBase& aSubConnProvider);
|
|
116 |
|
|
117 |
/** Override this to notify the control client of a sub-connection event, eg. layer up etc.
|
|
118 |
|
|
119 |
@param aSubConnProvider The provider which the event was generated on
|
|
120 |
@param aNotifyType The type of event
|
|
121 |
@param aError Error code, if any
|
|
122 |
@param aEvent The notification object containing specialized information */
|
|
123 |
virtual void SubConnectionEvent(CSubConnectionProviderBase& aSubConnProvider, MConnectionDataClient::TNotify aNotifyType, TInt aError, const CSubConNotificationEvent* aEvent);
|
|
124 |
|
|
125 |
|
|
126 |
virtual void LayerUp(CSubConnectionProviderBase& aSubConnProvider, TInt aError);
|
|
127 |
virtual void IncomingConnection(CSubConnectionProviderBase* aSubConnProvider, CSubConParameterBundle* aParameterBundle, TInt aError);
|
|
128 |
#endif
|
|
129 |
// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
130 |
|
|
131 |
protected:
|
|
132 |
//-=========================================================
|
|
133 |
// CSubConnectionProviderBase methods
|
|
134 |
//-=========================================================
|
|
135 |
// Methods to be overriden be derived subconnection provider
|
|
136 |
virtual void DoControlClientJoiningL(MSubConnectionControlClient& aControlClient); //Fix for DEF096132
|
|
137 |
virtual void DoDataClientJoiningL(MSubConnectionDataClient& aDataClient);
|
|
138 |
virtual void DoDataClientLeaving(MSubConnectionDataClient& aDataClient);
|
|
139 |
virtual void DoSourceAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource);
|
|
140 |
virtual void DoDestinationAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aDestination);
|
|
141 |
virtual void DoDataClientRouted(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource, const TSockAddr& aDestination, const TDesC8& aConnectionInfo);
|
|
142 |
virtual void DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle);
|
|
143 |
virtual TInt DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
|
|
144 |
|
|
145 |
virtual void DoStartL();
|
|
146 |
virtual void DoStop();
|
|
147 |
virtual CSubConnectionProviderBase* DoNextLayer();
|
|
148 |
virtual CConnDataTransfer& DoDataTransferL();
|
|
149 |
|
|
150 |
//MConnectionDataClient
|
|
151 |
virtual TAny* FetchInterfaceInstanceL(CConnectionProviderBase& aProvider, const STypeId& aTid);
|
|
152 |
virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
|
|
153 |
virtual void Notify(TNotify aNotifyType, CConnectionProviderBase* aConnProvider, TInt aError, const CConNotificationEvent* aConNotificationEvent);
|
|
154 |
virtual void AttachToNext(CSubConnectionProviderBase* aSubConnProvider);
|
|
155 |
|
|
156 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
157 |
virtual void DoControlClientLeaving(MSubConnectionControlClient& aControlClient);
|
|
158 |
private:
|
|
159 |
const RSubConnection::TSubConnType iSubConnType;
|
|
160 |
#endif
|
|
161 |
|
|
162 |
|
|
163 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
164 |
TUint32 iAppId;
|
|
165 |
CSubConnectionProviderBase * iSubConNextLayer;
|
|
166 |
#endif
|
|
167 |
};
|
|
168 |
#endif
|
|
169 |
// __DEFT_CPR_H__
|
|
170 |
|