bluetoothcommsprofiles/btpan/bnep/CBnepLocalDevice.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef __CBNEPLOCALDEVICE_H
       
    22 #define __CBNEPLOCALDEVICE_H 
       
    23 
       
    24 #include <networking/pktdrv.h>
       
    25 #include "MPanDevice.h"
       
    26 
       
    27 class CBTAddrSubscriber;
       
    28 class CLANLinkCommon;
       
    29 
       
    30 
       
    31 /**
       
    32 Flow control constants for CPktDrvBase::Send() method
       
    33 */
       
    34 const TUint KFlowOff = 0;
       
    35 const TUint KReadyForMoreData = 1;
       
    36 
       
    37 /**
       
    38    The local device
       
    39    There will always be one (and only one) of these objects owned by the bridge
       
    40    It acts as a link between the ethernet nif and the PAN network.  This is
       
    41    mainly of relevance when the local role is as a GN, as the bridge will be
       
    42    routing packets between the PANUs.
       
    43 */
       
    44 NONSHARABLE_CLASS(CBnepLocalDevice) : public CPktDrvBase, 
       
    45                          			  public MPanDevice  
       
    46     {
       
    47 
       
    48 public:
       
    49     ~CBnepLocalDevice();
       
    50     void BDADDRChanged ();
       
    51 	void RemoteDeviceReady ();
       
    52 	void AllRemoteDevicesDisconnected ();
       
    53     TInt Control (TUint UNUSEDPARAMETER1, TUint UNUSEDPARAMETER2, TDes8& UNUSEDPARAMETER3, TAny* UNUSEDPARAMETER4 = 0);
       
    54     TUint8* GetInterfaceAddress () const;
       
    55     TInt GetMulticastList (const THWAddr* UNUSEDPARAMETER1, TInt& UNUSEDPARAMETER2) const;
       
    56     TInt GetRxMode () const;
       
    57     TInt InterfacePowerDown ();
       
    58     TInt InterfacePowerUp ();
       
    59     TInt InterfaceResume ();
       
    60     TInt InterfaceSleep ();
       
    61     static CBnepLocalDevice* NewL (CPktDrvFactory& aFactory, CLANLinkCommon* aParent);
       
    62     TInt Notification (TAgentToNifEventType aEvent, TAny* aInfo = 0);
       
    63     virtual void Process (RBnepFrame& aFrame);
       
    64     TInt ResetInterface ();
       
    65     TInt Send (RMBufChain& aPkt);
       
    66     TInt SetInterfaceAddress (const THWAddr& UNUSEDPARAMETER1);
       
    67     TInt SetMulticastList (const THWAddr* UNUSEDPARAMETER1, TInt UNUSEDPARAMETER2);
       
    68     TInt SetRxMode (TRxMode UNUSEDPARAMETER1);
       
    69     TInt StartInterface ();
       
    70     TInt StopInterface ();
       
    71     void Stop ();
       
    72     CBTAddrSubscriber *iSubscriber;
       
    73 private:
       
    74     CBnepLocalDevice (CPktDrvFactory& aFactory, CLANLinkCommon* aParent);
       
    75     void ConstructL (CLANLinkCommon* UNUSEDPARAMETER1);
       
    76 private: 
       
    77     TBool iInterfaceStarted;
       
    78 	TBool iBDAddressAvailable;
       
    79 	TBool iLinkLayerUp;
       
    80 
       
    81     };
       
    82 #endif