wlan_bearer/wlannwif/inc/CLanxBearer.h
changeset 0 c40eb8fe8501
child 3 6524e815f76f
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Defines LanxBearer class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 7 %
       
    20 */
       
    21 
       
    22 #ifndef CLANXBEARER_H
       
    23 #define CLANXBEARER_H
       
    24 
       
    25 #include <in_iface.h>
       
    26 #include <comms-infras/nifif.h>
       
    27 #include <e32uid.h>
       
    28 #include <nifvar.h>
       
    29 #include <nifutl.h>
       
    30 #include <es_ini.h>
       
    31 #include <es_mbuf.h>
       
    32 #include <comms-infras/ss_protflow.h>
       
    33 #include <comms-infras/ss_flowbinders.h>
       
    34 
       
    35 class CLANLinkCommon;
       
    36 class TLanProvision;
       
    37 
       
    38 NONSHARABLE_CLASS(CLanxBearer) : public CBase, public ESock::MLowerDataSender, public ESock::MLowerControl
       
    39 {
       
    40 public:
       
    41 	CLanxBearer(CLANLinkCommon* aLink);
       
    42 	virtual void ConstructL();
       
    43 	
       
    44 	// from MLowerControl
       
    45 	virtual TInt GetName(TDes& aName);
       
    46 	virtual TInt BlockFlow(TBlockOption aOption);
       
    47 	virtual TInt GetConfig(TBinderConfig& aConfig) = 0;
       
    48 	//
       
    49 	
       
    50 	virtual void StartSending(CProtocolBase* aProtocol);
       
    51 
       
    52 	//Additional methods.
       
    53 	virtual TBool WantsProtocol(TUint16 aProtocolCode, const TUint8* aPayload ) = 0;
       
    54 	virtual void Process( RMBufChain& aPdu ) = 0;
       
    55 
       
    56 	virtual void UpdateMACAddr();
       
    57     CLANLinkCommon* Link() const;
       
    58     
       
    59 	// Support for CFProtocol based binding sequence
       
    60 	virtual const TDesC8& ProtocolName() const = 0;
       
    61 	void SetUpperPointers(ESock::MUpperDataReceiver* aReceiver, ESock::MUpperControl* aControl);
       
    62 	TBool MatchesUpperControl(const ESock::MUpperControl* aControl) const;
       
    63 
       
    64 	// Support for provisioning
       
    65 	virtual void SetProvisionL(const Meta::SMetaData* aProvision) = 0;
       
    66 
       
    67 protected: // Data
       
    68 	ESock::MUpperControl* iUpperControl;
       
    69 	ESock::MUpperDataReceiver* iUpperReceiver;
       
    70 	CLANLinkCommon* iLink;
       
    71 	TInterfaceName iIfName;
       
    72 
       
    73 	// cache connection info to avoid dbms access after resume sending scenario
       
    74 	TSoIfConnectionInfo iSoIfConnectionInfo;
       
    75 	TBool iSoIfConnectionInfoCached;
       
    76 };
       
    77     
       
    78 inline CLANLinkCommon* CLanxBearer::Link() const
       
    79 {
       
    80 	return iLink;
       
    81 }
       
    82 
       
    83 #endif // CLANXBEARER_H