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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file SHIMCPRFACTORY.H |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #if !defined(__SHIMCPRFACTORY_H__) |
|
26 #define __SHIMCPRFACTORY_H__ |
|
27 |
|
28 #include <ss_connprov.h> // for CConnectionProviderFactoryBase |
|
29 #include <cflog.h> |
|
30 |
|
31 __CFLOG_STMT(_LIT8(KLogSubSysESOCK, "ESOCK");) // subsystem name |
|
32 |
|
33 |
|
34 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
35 |
|
36 // The class CConnectionProviderFactoryShim implements this interface as part of the 635 IAP locking mechanism. Since |
|
37 // each RConn::Start(), will instantiate its own selector, its then become the resposiblity of the factory to store the |
|
38 // status related to the IAP locking. This interface has the functions called by the selectors with the status of IAP lockied |
|
39 // and the IAP number to be locked |
|
40 |
|
41 class MIAPLockInfo |
|
42 { |
|
43 public: |
|
44 virtual void SetIAPLockStatus(TBool aLockStatus, TInt aLockedIAP)=0; |
|
45 virtual void GetIAPLockStatus(TBool &aLockStatus, TInt &aLockedIAP)=0; |
|
46 }; |
|
47 |
|
48 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
49 |
|
50 class CSubConnectioProviderLinkShim; |
|
51 |
|
52 const TUint KShimConnectionProviderFactoryId = 0x10207104; //the same as CSubConnectionProviderFactoryShim |
|
53 |
|
54 class CSubConnectionFactoryContainer; |
|
55 NONSHARABLE_CLASS(CConnectionProviderFactoryShim) : public CConnectionProviderFactoryBase, public MConnectionNotify |
|
56 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
57 , public MIAPLockInfo |
|
58 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
59 { |
|
60 public: |
|
61 static CConnectionProviderFactoryShim* NewL(TAny* aConstructionParameters); |
|
62 ~CConnectionProviderFactoryShim(); |
|
63 |
|
64 |
|
65 protected: |
|
66 void ConstructL(); |
|
67 CConnectionProviderFactoryShim(TUint aFactoryId, CConnectionFactoryContainer& aParentContainer); |
|
68 |
|
69 virtual CConnectionProviderBase* DoCreateProviderL(); |
|
70 virtual MProviderSelector* DoSelectProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage ); |
|
71 virtual MProviderSelector* DoSelectNextLayerProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage ); |
|
72 |
|
73 virtual void DoEnumerateConnectionsL(RPointerArray<TConnectionInfo>& aConnectionInfoPtrArray); |
|
74 |
|
75 //CCommsFactoryBase |
|
76 virtual TInt DoReceiveMessage( NetMessages::CMessage& aNetMessage ); |
|
77 |
|
78 //MConnectionNotify interface to catch the global events |
|
79 virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo); |
|
80 virtual void ConnectionError(TInt aError); |
|
81 virtual void LinkLayerOpen(TInt aError); |
|
82 virtual void LinkLayerClosed(TInt aError); |
|
83 virtual void ProgressNotification(TInt aStage, TInt aError); |
|
84 virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError); |
|
85 virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType); |
|
86 virtual void InterfaceStateChangeNotification(TDesC8& aInfo); |
|
87 virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume); |
|
88 virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume); |
|
89 |
|
90 virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent); |
|
91 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
92 public: |
|
93 |
|
94 // Interface MIAPLockInfo functions to store the status of IAP locking |
|
95 virtual void SetIAPLockStatus(TBool aLockStatus, TInt aLockedIAP); |
|
96 virtual void GetIAPLockStatus (TBool &aLockStatus, TInt &aLockedIAP); |
|
97 |
|
98 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
99 |
|
100 |
|
101 protected: |
|
102 CConnectionProvdBase* iNifmanSession; |
|
103 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
104 |
|
105 // This variable will tell the status whether the IAP is locked or not |
|
106 TBool iIsIAPLocked; |
|
107 // This variable will store the IAP number that is being locked. |
|
108 TInt iLockedIAP; |
|
109 |
|
110 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
111 }; |
|
112 |
|
113 #endif // __SHIMCPRFACTORY_H__ |
|