networkcontrol/ipcprshim/src/connectionSelectorShim.h
branchRCL_3
changeset 22 8d540f55e491
parent 21 abbed5a4b42a
child 23 425d8f4f7fa5
equal deleted inserted replaced
21:abbed5a4b42a 22:8d540f55e491
     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 CONNECTIONSELECTORSHIM.H
       
    22  @internalComponent
       
    23 */
       
    24 
       
    25 #if !defined(__CONNECTIONSELECTORSHIM_H__)
       
    26 #define __CONNECTIONSELECTORSHIM_H__
       
    27 
       
    28 #include <ss_fact.h>
       
    29 #include <ss_select.h>
       
    30 #include <ss_connprov.h>
       
    31 #include <es_prot.h>
       
    32 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    33 #include <comms-infras/nifif.h>
       
    34 #include <comms-infras/dbaccess.h>
       
    35 #include <commdbconnpref.h>
       
    36 #include "shimcprfactory.h" 
       
    37 #endif //SYMBIAN_NETWORKING_UMTSR5
       
    38 
       
    39 class CConnectionProviderShim;
       
    40 class CConnectionSelectorShim : public CBase, public MProviderSelector, public MConnectionNotify
       
    41 /**
       
    42 @internalTechnology
       
    43 @released Since 9.1
       
    44 */
       
    45 	{	
       
    46 	friend class CConnectionProviderFactoryShim;
       
    47 	
       
    48 public:	
       
    49 
       
    50 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    51 	
       
    52 	// This function will be called by the ShimCprFactory to set its interface for the information
       
    53 	// pertaining to the IAP lock status
       
    54 	void  SetFactoryIface(MIAPLockInfo * aFactoryIface);
       
    55 	
       
    56 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    57 	
       
    58 protected:
       
    59 	CConnectionSelectorShim(ISelectionNotify& aNotify);
       
    60 	virtual ~CConnectionSelectorShim();	
       
    61     void DeleteAsync();
       
    62 	
       
    63 public:
       
    64     TInt Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage);
       
    65       
       
    66     // From MConnectionNotify
       
    67 	virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo);
       
    68 	virtual void ConnectionError(TInt aError);
       
    69 	virtual void LinkLayerOpen(TInt aError);
       
    70 	virtual void LinkLayerClosed(TInt aError);
       
    71 	virtual void ProgressNotification(TInt aStage, TInt aError);
       
    72 	virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError);
       
    73 	virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
       
    74 	virtual void InterfaceStateChangeNotification(TDesC8& aInfo);
       
    75 	virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume);
       
    76 	virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume);
       
    77 	virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent);
       
    78 
       
    79 	//MProviderSelector
       
    80 	virtual TInt Cancel(TInt aReason, const RMessage2* aMessage);
       
    81 	virtual TInt Cancel();
       
    82 	void SetProviderNull();
       
    83 private:
       
    84 	static TInt AsyncDestructorCb(TAny* aInstance);
       
    85 	void CreateProviderL();
       
    86 	void HandleSelectionL();
       
    87 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    88 	void MaybeLockIapL();
       
    89 #endif	
       
    90 	TBool IsConnectionStoppingL();
       
    91 	
       
    92 private:
       
    93     CConnectionProvdBase* iSelectorSession;
       
    94     ISelectionNotify iNotify;
       
    95     CAsyncCallBack iAsyncDestructor;
       
    96     RBuf8 iSelectionInfo;
       
    97     CConnectionProviderShim* iConnProvider;
       
    98     TInt iError;
       
    99 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   100     TBool iSetProviderNull;
       
   101     TBool iIsLinkLayerOpen;
       
   102 #else
       
   103     TBool iSetProviderNull:1;
       
   104     TBool iIsLinkLayerOpen:1;
       
   105 #endif  
       
   106 	// New Variables added as required by 635 to achieve IAP locking
       
   107 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   108 	// The Connection Info, IAP , etc.
       
   109 	TSoIfConnectionInfo iConnectionInfo;
       
   110 	// The Secure ID of the current Application
       
   111     TSecureId 			iAppSecureId;
       
   112     // Interface to the Factor which Stores and get the IAP Lock Status
       
   113     MIAPLockInfo*		iFactoryIface;
       
   114 #endif 
       
   115 
       
   116 	};
       
   117 
       
   118 
       
   119 #endif	// __CONNECTIONSELECTORSHIM_H__
       
   120