connectivitylayer/isce/isirouter_dll/inc/isilink.h
changeset 0 63b37f68c1ce
child 9 8486d82aef45
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 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 the License "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 #ifndef __ISILINK_H__
       
    21 #define __ISILINK_H__
       
    22 
       
    23 // Includes
       
    24 #include "mmuxlinkif.h"         // For MMuxLinkIf
       
    25 #include "misirouterlinkif.h"   // For MISIRouterLinkIf
       
    26 
       
    27 // Forward declarations
       
    28 class MMuxLinkIf;
       
    29 class MLinkMuxIf;
       
    30 class MISILinkRouterIf;
       
    31 
       
    32 /*
       
    33 * Class repsenting ISI router link to transceiver.
       
    34 * Each link has one transceiver and one protocol.
       
    35 * Responsible of storing the transceiver related state information.
       
    36 */
       
    37 NONSHARABLE_CLASS( DISILink ) : public DBase, public MMuxLinkIf, public MISIRouterLinkIf
       
    38     {
       
    39 
       
    40     public:
       
    41 
       
    42         /*
       
    43         * Default contructor
       
    44         */
       
    45         DISILink();
       
    46 
       
    47         /*
       
    48         * Contructor
       
    49         * @param aRouter, router interface
       
    50         * @param aMediaId, protocol id of this link
       
    51         * @param aTrxId, transceiver id of this link.
       
    52         */
       
    53         DISILink( MISILinkRouterIf* aRouter, const TUint8 aMediaId, const TUint8 aTrxId );
       
    54 
       
    55         /*
       
    56         * Destructor
       
    57         */
       
    58         ~DISILink();
       
    59 
       
    60         // From MMuxLinkIf start
       
    61         /*
       
    62         * See comments from MMuxLinkIf.
       
    63         */
       
    64         void Receive( TDes8& aMsg );
       
    65 
       
    66         /*
       
    67         * See comments from MMuxLinkIf.
       
    68         */
       
    69         void EnqueTrxPresenceChangedDfc( TBool aPresent );
       
    70         // From MMuxLinkIf end
       
    71 
       
    72         // From MISIRouterLinkIf start
       
    73         /*
       
    74         * See comments from MISIRouterLinkIf.
       
    75         */
       
    76         void Release();
       
    77 
       
    78         /*
       
    79         * See comments from MISIRouterLinkIf.
       
    80         */
       
    81         TBool Send( TDes8& aMsg );
       
    82         // From MISIRouterLinkIf end
       
    83         
       
    84     private:
       
    85 
       
    86         // Not owned, can be called from 1...N thread, router responsible of it's own states guarding.
       
    87         MISILinkRouterIf*   iRouter;
       
    88         // Not owned, called always from one router thread.
       
    89         MLinkMuxIf*         iMux;
       
    90         // Links unique media identifier.
       
    91         // Written only once fron one thread no need to sync.
       
    92         TUint8              iMediaId;
       
    93         TUint8              iTrxId;
       
    94         // Trx state, synchronized with callers fast mutex
       
    95         TBool               iTrxPresent;
       
    96 
       
    97     };
       
    98 
       
    99 #endif /* __ISILINK_H__ */