wlan_plat/wlan_hal_api/inc/wlanpddiface.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:  Interface used by WLAN LDD for 
       
    15 *                attaching and extracting interfaces
       
    16 *                and for getting WLAN PDD capabilities
       
    17 *
       
    18 */
       
    19 
       
    20 /*
       
    21 * %version: 5 %
       
    22 */
       
    23 
       
    24 #ifndef WLANPDDIFACE_H
       
    25 #define WLANPDDIFACE_H
       
    26 
       
    27 #include <wlanwha.h>
       
    28 #include <klib.h>
       
    29 
       
    30 class MWlanOsa;
       
    31 class MWlanOsaExt;
       
    32 
       
    33 /**
       
    34  *  Interface used by WLAN LDD for attaching and extracting interfaces 
       
    35  *  and for getting WLAN PDD capabilities.
       
    36  *
       
    37  *  @since S60 v5.0
       
    38  */
       
    39 class MWlanPddIface : public DBase
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     typedef TUint32 TCapab;
       
    45 
       
    46     struct SCapabilities
       
    47         {
       
    48         static const TCapab KCachedMemory = ( 1 << 0 ); 
       
    49         
       
    50         /** Capabilities bitmap */
       
    51         TCapab iCapabilities;
       
    52         /** 
       
    53          * Host processor's cache line length.
       
    54          * Relevant only when iCapabilities includes KCachedMemory
       
    55          */
       
    56         TInt iCacheLineLength;
       
    57         };
       
    58 
       
    59 public:
       
    60 
       
    61 	/**
       
    62 	 * Destructor.
       
    63 	 *
       
    64 	 * @since S60 v5.0
       
    65 	 */
       
    66     virtual ~MWlanPddIface() {};
       
    67     
       
    68     /**
       
    69      * Attach osa and osa extension interface
       
    70      *
       
    71      * @since S60 v5.0
       
    72      * @param aWlanOsa osa interface object
       
    73      * @param aWlanOsaExt osa extension interface object
       
    74      * @return ETrue for success any other for failure
       
    75      */
       
    76     virtual TBool Attach( MWlanOsa& aWlanOsa, MWlanOsaExt& aWlanOsaExt ) = 0;
       
    77 
       
    78     /**
       
    79      * Extract wha interface
       
    80      *
       
    81      * @since S60 v5.0
       
    82      * @return wha interface object
       
    83      */
       
    84     virtual WHA::Wha& Extract() = 0;
       
    85     
       
    86     /**
       
    87      * Gets lower layer capabilities.
       
    88      *
       
    89      * Overriding method allocates dynamically an SCapabilities structure
       
    90      * providing information about the capabilities of the lower layer.
       
    91      * It is the caller's responsibility to deallocate the structure.
       
    92      * Note! This method has a default implementation returning just a 
       
    93      * NULL pointer in order to maintain backwards sw compatibility with
       
    94      * a WLAN PDD which doesn't implement (i.e. override) this method.
       
    95      * @since S60 v5.0
       
    96      * @param aCapabilities Pointer to capabilities structure
       
    97      */
       
    98     virtual void GetCapabilities( SCapabilities*& aCapabilities )
       
    99         {
       
   100         aCapabilities = NULL;
       
   101         };
       
   102     };
       
   103 
       
   104 
       
   105 #endif // WLANPDDIFACE_H