37
|
1 |
/**
|
|
2 |
* Copyright (c) 2005-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 |
* This temporary shim layer contanis the interfaces defined by MConnectionNotify, CConnectionProvdBase and CInterface.
|
|
16 |
* However only the connection-related part of CInterface appears here, the rest is in CNifManSubConnectionShim.
|
|
17 |
*
|
|
18 |
*
|
|
19 |
*/
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
/**
|
|
24 |
@file SHIMCPR.H
|
|
25 |
@internalComponent
|
|
26 |
*/
|
|
27 |
|
|
28 |
#if !defined(__SS_SHIMCPR_H__)
|
|
29 |
#define __SS_SHIMCPR_H__
|
|
30 |
|
|
31 |
#include <ss_connprov.h> // for CConnectionProviderFactoryBase
|
|
32 |
#include <cflog.h>
|
|
33 |
#include <es_prot.h> // for MConnectionNotify and CConnectionProvdBase
|
|
34 |
#include <comms-infras/ss_log.h> // for KESockConnectionTag
|
|
35 |
|
|
36 |
#define KShimCprTag KESockConnectionTag
|
|
37 |
_LIT8(KShimCprSubTag, "shimcpr"); // logging tag
|
|
38 |
|
|
39 |
|
|
40 |
class CConnectionProvdBase;
|
|
41 |
class CNifManSubConnectionShim;
|
|
42 |
class CConnectionProviderFactoryShim;
|
|
43 |
class CConnectionSettingsShim;
|
|
44 |
class CConnection;
|
|
45 |
class MProviderSelector;
|
|
46 |
class CSubConnectionLinkShimClient;
|
|
47 |
class CConnectionSelectorShim;
|
|
48 |
NONSHARABLE_CLASS(CConnectionProviderShim) : public CConnectionProviderBase, MConnectionNotify
|
|
49 |
{
|
|
50 |
friend class CConnectionProviderFactoryShim;
|
|
51 |
friend class CConnectionSelectorShim; //to get/set the aggregarted CConnectionProvdBase
|
|
52 |
|
|
53 |
|
|
54 |
public:
|
|
55 |
CConnectionProvdBase& Provider()
|
|
56 |
{
|
|
57 |
ASSERT(iProvider);
|
|
58 |
return *iProvider;
|
|
59 |
}
|
|
60 |
CSubConnectionLinkShimClient* QuerySubSessions(TInt32 aTypeId, const CConnection* aConnection);
|
|
61 |
|
|
62 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
63 |
// The public function which will set the pointer to the factiory
|
|
64 |
void SetFactoryIfactory(CConnectionProviderFactoryShim *aFactoryShim);
|
|
65 |
#endif // SYMBIAN_NETWORKING_UMTSR5
|
|
66 |
|
|
67 |
protected:
|
|
68 |
virtual ~CConnectionProviderShim();
|
|
69 |
|
|
70 |
|
|
71 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
72 |
CConnectionProviderShim(CConnectionProviderFactoryBase& aFactory)
|
|
73 |
: CConnectionProviderBase(aFactory), iSubConnectionType(KInvalidFactoryId)
|
|
74 |
{
|
|
75 |
__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tCConnectionProviderShim()"),
|
|
76 |
this));
|
|
77 |
}
|
|
78 |
#else
|
|
79 |
CConnectionProviderShim(CConnectionProviderFactoryBase& aFactory)
|
|
80 |
: CConnectionProviderBase(aFactory)
|
|
81 |
{
|
|
82 |
__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tCConnectionProviderShim()"),
|
|
83 |
this));
|
|
84 |
}
|
|
85 |
#endif
|
|
86 |
// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
87 |
|
|
88 |
|
|
89 |
void ConstructL();
|
|
90 |
static CConnectionProviderShim* NewL(CConnectionProviderFactoryBase& aFactory);
|
|
91 |
|
|
92 |
void ConnectionJoiningL( const CConnection& aConnection );
|
|
93 |
void ConnectionLeaving( const CConnection& aConnection );
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
protected:
|
|
98 |
// Define methods from the interface specified by MConnectionNotify
|
|
99 |
virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo);
|
|
100 |
virtual void ConnectionError(TInt aError);
|
|
101 |
virtual void LinkLayerOpen(TInt aError);
|
|
102 |
virtual void LinkLayerClosed(TInt aError);
|
|
103 |
virtual void ProgressNotification(TInt aStage, TInt aError);
|
|
104 |
virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError);
|
|
105 |
virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
|
|
106 |
virtual void InterfaceStateChangeNotification(TDesC8& aInfo);
|
|
107 |
virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume);
|
|
108 |
virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume);
|
|
109 |
virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent);
|
|
110 |
|
|
111 |
virtual TBool ShouldIDeleteNow();
|
|
112 |
|
|
113 |
protected:
|
|
114 |
//CConnectionProviderBase virtuals
|
|
115 |
virtual void DoDataClientJoiningL(MConnectionDataClient& aDataClient);
|
|
116 |
virtual void DoDataClientLeaving(MConnectionDataClient& aDataClient);
|
|
117 |
virtual void DoControlClientJoiningL(MConnectionControlClient& aControlClient);
|
|
118 |
virtual void DoControlClientLeaving(MConnectionControlClient& aControlClient);
|
|
119 |
|
|
120 |
virtual void DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage);
|
|
121 |
virtual TInt DoStop(TInt aError, const RMessagePtr2* aMessage);
|
|
122 |
|
|
123 |
virtual TInt DoCanDoSubConnection(RSubConnection::TSubConnType aSubConnType) const;
|
|
124 |
|
|
125 |
virtual CConnectionProviderBase* DoNextLayer() const ;
|
|
126 |
virtual void DoJoinNextLayerL(CConnectionProviderBase* aNextLayer);
|
|
127 |
|
|
128 |
virtual void DoProgressL(Meta::SMetaData& aBuffer) const;
|
|
129 |
virtual void DoLastProgressError(Meta::SMetaData& aBuffer);
|
|
130 |
virtual void DoRequestServiceChangeNotificationL();
|
|
131 |
virtual void DoCancelServiceChangeNotification();
|
|
132 |
virtual void DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage);
|
|
133 |
virtual TInt DoAllSubConnectionNotificationEnable();
|
|
134 |
virtual TInt DoCancelAllSubConnectionNotification();
|
|
135 |
virtual void DoSendIoctlMessageL(const RMessage2& aMessage);
|
|
136 |
virtual void DoSendCancelIoctl();
|
|
137 |
virtual TInt DoEnumerateSubConnectionsL(TUint& aCount);
|
|
138 |
virtual TUint DoEnumerateClientsL(HBufC8*& aClientInfoBuffer, TEnumClients aClientType);
|
|
139 |
virtual void DoConnectionControlActivityL( TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage );
|
|
140 |
virtual CConnectionSettings& DoSettingsAccessL();
|
|
141 |
|
|
142 |
CConnectionProvdBase* GetNifSession();
|
|
143 |
void InitialiseL(CConnectionProvdBase* aStarterSession);
|
|
144 |
void SetBlockProgressesL(CConnectionProvdBase* aStarterSession);
|
|
145 |
void AddRefL(CConnectionSelectorShim* aSelector);
|
|
146 |
void ReleaseRef(CConnectionSelectorShim* aSelector);
|
|
147 |
|
|
148 |
private:
|
|
149 |
CNifManSubConnectionShim* FindSubConnection(TSubConnectionUniqueId aId);
|
|
150 |
void ReleaseRef();
|
|
151 |
|
|
152 |
private:
|
|
153 |
CConnectionProvdBase *iProvider; // Enable access to 'old' NIFMAN layer
|
|
154 |
CConnectionSettingsShim* iConnectionSettings;
|
|
155 |
TUint iUsageProfile;
|
|
156 |
RPointerArray<const CConnection> iConnections;
|
|
157 |
// TInt iRefCount; //to keep a connection up while selection is going on
|
|
158 |
RPointerArray<CNifManSubConnectionShim> iNifManSubConnections;
|
|
159 |
#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
160 |
TInt iSubConnectionType;
|
|
161 |
#endif // SYMBIAN_NETWORKING_3GPPDEFAULTQOS
|
|
162 |
RPointerArray<CConnectionSelectorShim> iSelectors;
|
|
163 |
TBool iHasAnyControlClientJoined:1;
|
|
164 |
TBool iIsAlreadyUninitialised:1;
|
|
165 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
166 |
// The handle to the factory object that creates the CConnectionProviderShim
|
|
167 |
CConnectionProviderFactoryShim *iFactoryShim;
|
|
168 |
#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
169 |
|
|
170 |
|
|
171 |
};
|
|
172 |
|
|
173 |
#endif
|
|
174 |
// __SS_SHIMCPR_H__
|