linklayercontrol/networkinterfacemgr/netcfgext/inc/nifconfigurationcontrol.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 /**
       
     2 * Copyright (c) 2003-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 * Declares network layer configuration classes supported by NIFMAN 
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file NIFConfigurationControl.h
       
    24  @internalComponent
       
    25 */
       
    26 
       
    27 #if !defined (__NIFCONFIGURATIONCONTROL_H__)
       
    28 #define __NIFCONFIGURATIONCONTROL_H__
       
    29 
       
    30 #include <e32base.h>
       
    31 #include <ecom/ecom.h>
       
    32 #include <comms-infras/nifprvar.h>
       
    33 
       
    34 #include <comms-infras/rconfigdaemonmess.h>
       
    35 #include <comms-infras/ss_api_ext.h>
       
    36 
       
    37 class MNifIfNotify;
       
    38 /**
       
    39 An abstract base for NIFMAN configuration controls covering the concrete implementation as to
       
    40 how to configure network layer
       
    41 @internalComponent
       
    42 @version 0.03
       
    43 @date	26/05/2004
       
    44 **/
       
    45 class CNifConfigurationControl : public CActive
       
    46 	{
       
    47 protected:
       
    48 	CNifConfigurationControl(MNifIfNotify& aNifIfNotify);
       
    49 		
       
    50 public:
       
    51 	IMPORT_C static CNifConfigurationControl* NewL(MNifIfNotify& aNifIfNotify);
       
    52 		
       
    53 	/**
       
    54 	ConfigureNetworkL - called when NIFMAN wants to start network configuration process
       
    55 	@internalComponent
       
    56 	@version 0.01
       
    57 	**/
       
    58 	virtual void ConfigureNetworkL() = 0;
       
    59 		
       
    60 	/**
       
    61 	LinkLayerDown - used to inform the daemon that link layer renegotiation has started.
       
    62 	@internalComponent
       
    63 	@version 0.01
       
    64 	**/
       
    65 	virtual void LinkLayerDown() = 0;
       
    66 	
       
    67 	/**
       
    68 	LinkLayerUp - used to inform the daemon that link layer renegotiation has completed.
       
    69 	@internalComponent
       
    70 	@version 0.01
       
    71 	**/
       
    72 	virtual void LinkLayerUp() = 0;
       
    73 	
       
    74 	/**
       
    75 	Deregister - called when NIFMAN needs to deregister/unconfigure the network
       
    76 	@internalComponent
       
    77 	**/
       
    78 	virtual void Deregister(TInt aCause) = 0;
       
    79    		
       
    80 	virtual void SendIoctlMessageL(const ESock::RLegacyResponseMsg& aMessage) = 0;
       
    81 
       
    82    	virtual void CancelControl() = 0;
       
    83    	
       
    84    	virtual void AsyncDelete() = 0;
       
    85 
       
    86 	/**
       
    87 	Notification - used to inform the daemon of notification events.
       
    88 	@internalComponent
       
    89 	@version 0.01
       
    90 	**/
       
    91 	virtual void EventNotification(TNetworkAdaptorEventType aEventType, TUint aEvent, const TDesC8& aEventData, TAny* aSource) = 0;
       
    92 
       
    93 protected:
       
    94 	/**
       
    95     iNifIfNotify - to access comm database and notify NIFMAN.
       
    96     Note that this is a pointer to allow it to be zeroed when detaching from
       
    97     NIFMAN (during asynchronous destruction) to avoid a dangling pointer.
       
    98     @internalComponent
       
    99     @version 0.01
       
   100 	**/
       
   101 	MNifIfNotify* iNifIfNotify;
       
   102 	};
       
   103 
       
   104 inline CNifConfigurationControl::CNifConfigurationControl(MNifIfNotify& aNifIfNotify) :
       
   105 CActive(EPriorityStandard),
       
   106 iNifIfNotify(&aNifIfNotify)
       
   107 /**
       
   108 CNifConfigurationControl - constructor
       
   109 @param aNifIfNotify - client of the control
       
   110 @internalComponent
       
   111 @version 0.01
       
   112 **/
       
   113 	{
       
   114 	}
       
   115 
       
   116 /**
       
   117  NIF configuration interface to be able create plug-ins using ECOM
       
   118  @internalComponent
       
   119  @version 0.01
       
   120  @date	12/08/2003
       
   121 **/
       
   122 class CNifConfigurationIf : public CNifConfigurationControl
       
   123 	{
       
   124   	friend class CNifConfigurationControl; //to access iDtor_ID_Key from ::NewL
       
   125 
       
   126 public:
       
   127    	CNifConfigurationIf(MNifIfNotify& aNifIfNotify);
       
   128    	
       
   129 protected:
       
   130 	virtual ~CNifConfigurationIf();
       
   131 
       
   132 private:
       
   133    	// Instance identifier key
       
   134    	TUid iDtor_ID_Key;
       
   135 	};
       
   136 
       
   137 inline CNifConfigurationIf::CNifConfigurationIf(MNifIfNotify& aNifIfNotify) :
       
   138    CNifConfigurationControl(aNifIfNotify)
       
   139 /**
       
   140  CNifConfigurationIf - constructor
       
   141  @param aNifIfNotify - client of the control
       
   142  @internalComponent
       
   143  @version 0.01
       
   144 **/
       
   145 	{
       
   146 	}
       
   147 
       
   148 //keep the destructor inline even though it's virtual so that 
       
   149 //the plug-in doesn't have to link against us
       
   150 inline CNifConfigurationIf::~CNifConfigurationIf()
       
   151     {
       
   152     REComSession::DestroyedImplementation(iDtor_ID_Key);
       
   153     }
       
   154 
       
   155 #endif
       
   156 
       
   157