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 class is an example implementation of a bearer-mobile network session layer. It is intended as a guide only and does
|
|
16 |
* not employ any advanced bearer selection algorithms.
|
|
17 |
* This is part of an ECOM plug-in
|
|
18 |
*
|
|
19 |
*
|
|
20 |
*/
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
/**
|
|
25 |
@file IPCPRPROVIDER.H
|
|
26 |
@internalComponent
|
|
27 |
*/
|
|
28 |
|
|
29 |
#if !defined(__SS_IPCPRPROVIDER_H__)
|
|
30 |
#define __SS_IPCPRPROVIDER_H__
|
|
31 |
|
|
32 |
#include "ipcprfactory.h" // for CIPConnectionSelector
|
|
33 |
#include <es_sock.h>
|
|
34 |
#include <es_prot.h>
|
|
35 |
#include <ss_connprov.h> // for CConnectionProviderBase and MConnectionControlClient
|
|
36 |
#include <comms-infras/ss_log.h> // for KESockConnectionTag
|
|
37 |
|
|
38 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
39 |
|
|
40 |
#include "MAppIdInfo.h"
|
|
41 |
|
|
42 |
#endif
|
|
43 |
|
|
44 |
#define KIpcprTag KESockConnectionTag
|
|
45 |
_LIT8(KIpcprSubTag, "ipcpr"); // logging tag
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
class CConnectionSettings;
|
|
51 |
/**
|
|
52 |
@internalComponent
|
|
53 |
@released Since 9.1
|
|
54 |
*/
|
|
55 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
56 |
NONSHARABLE_CLASS(CIPNetworkConnectionProvider) : public CConnectionProviderBase, public MConnectionControlClient,
|
|
57 |
public MConnectionAppIdInfo
|
|
58 |
{
|
|
59 |
#else // SYMBIAN_NETWORKING_UMTSR5
|
|
60 |
|
|
61 |
NONSHARABLE_CLASS(CIPNetworkConnectionProvider) : public CConnectionProviderBase, public MConnectionControlClient
|
|
62 |
{
|
|
63 |
|
|
64 |
#endif // SYMBIAN_NETWORKING_UMTSR5
|
|
65 |
|
|
66 |
public:
|
|
67 |
static CIPNetworkConnectionProvider* NewL(CConnectionProviderFactoryBase& aFactory);
|
|
68 |
|
|
69 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
70 |
// Interface from MConnectionAppIdInfo
|
|
71 |
virtual TUint32 GetAppSecureId();
|
|
72 |
|
|
73 |
void SetAppSecurId(TUint32 aSecureId);
|
|
74 |
#endif // SYMBIAN_NETWORKING_UMTSR5
|
|
75 |
|
|
76 |
protected:
|
|
77 |
CIPNetworkConnectionProvider(CConnectionProviderFactoryBase& aFactory) :
|
|
78 |
CConnectionProviderBase(aFactory)
|
|
79 |
{
|
|
80 |
__CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tCIPNetworkConnectionProvider [MConnectionControlClient=%08x]"),
|
|
81 |
this, (MConnectionControlClient*)this));
|
|
82 |
}
|
|
83 |
~CIPNetworkConnectionProvider();
|
|
84 |
|
|
85 |
/////////////////////////////////////////////////////////////////////////////
|
|
86 |
// from MConnectionControlClient
|
|
87 |
virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
|
|
88 |
virtual void ProgressNotification(TInt aStage, TInt aError);
|
|
89 |
virtual void ConnectionError(TInt aStage, TInt aError);
|
|
90 |
virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
|
|
91 |
virtual void SubConnectionEvent(CSubConnectionProviderBase* aSubConnNextLayerProvider, const TSubConnectionEvent& aSubConnectionEvent);
|
|
92 |
virtual void LayerUp(TInt aError);
|
|
93 |
virtual TCtlType CtlType() const;
|
|
94 |
|
|
95 |
////////////////////////////////////////////////////////////////////////////
|
|
96 |
// from CConnectionProviderBase
|
|
97 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
98 |
virtual TAny* DoFetchInterfaceInstanceL( const STypeId& aTid );
|
|
99 |
#endif
|
|
100 |
|
|
101 |
virtual void DoDataClientJoiningL(MConnectionDataClient& aDataClient);
|
|
102 |
virtual void DoDataClientLeaving(MConnectionDataClient& aDataClient);
|
|
103 |
virtual void DoControlClientJoiningL(MConnectionControlClient& aControlClient);
|
|
104 |
virtual void DoControlClientLeaving(MConnectionControlClient& aControlClient);
|
|
105 |
|
|
106 |
virtual void DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage);
|
|
107 |
virtual TInt DoStop(TInt aError, const RMessagePtr2* aMessage);
|
|
108 |
|
|
109 |
virtual void DoProgressL(Meta::SMetaData& aBuffer) const;
|
|
110 |
virtual void DoLastProgressError(Meta::SMetaData& aBuffer);
|
|
111 |
virtual void DoRequestServiceChangeNotificationL();
|
|
112 |
virtual void DoCancelServiceChangeNotification();
|
|
113 |
virtual void DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage);
|
|
114 |
virtual TInt DoAllSubConnectionNotificationEnable();
|
|
115 |
virtual TInt DoCancelAllSubConnectionNotification();
|
|
116 |
virtual void DoSendIoctlMessageL(const RMessage2& aMessage);
|
|
117 |
virtual void DoSendCancelIoctl();
|
|
118 |
virtual TInt DoEnumerateSubConnectionsL(TUint& aCount);
|
|
119 |
virtual TUint DoEnumerateClientsL(HBufC8*& aClientInfoBuffer, TEnumClients aClientType);
|
|
120 |
virtual void DoConnectionControlActivityL( TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage );
|
|
121 |
|
|
122 |
virtual CConnectionSettings& DoSettingsAccessL();
|
|
123 |
|
|
124 |
virtual TInt DoCanDoSubConnection(RSubConnection::TSubConnType aSubConnType) const;
|
|
125 |
|
|
126 |
virtual CConnectionProviderBase* DoNextLayer() const;
|
|
127 |
virtual void DoJoinNextLayerL(CConnectionProviderBase* aNextLayer);
|
|
128 |
|
|
129 |
protected:
|
|
130 |
void UpdateUsageProfile(MConnectionControlClient* aControlClient);
|
|
131 |
|
|
132 |
private:
|
|
133 |
CConnectionProviderBase* iShimCpr;
|
|
134 |
TMetaDes8* iMDes;
|
|
135 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
136 |
// Added as per the requirements of PREQ 635 to block sockets
|
|
137 |
TUint32 iAppSecureId;
|
|
138 |
#endif // SYMBIAN_NETWORKING_UMTSR5
|
|
139 |
};
|
|
140 |
|
|
141 |
#endif // __SS_IPCPRPROVIDER_H__
|