wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlangenericplugin.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2008-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 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:  Interface for instantiating Generic WLAN Plugins
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLANGENERICPLUGIN_H_
       
    20 #define WLANGENERICPLUGIN_H_
       
    21 
       
    22 #include <e32def.h>
       
    23 #include <e32cmn.h> // TUid
       
    24 #include <e32base.h>
       
    25 
       
    26 NONSHARABLE_CLASS( CGenericWlanPlugin ): public CBase
       
    27     {
       
    28 public:
       
    29     
       
    30     /**
       
    31      * Maximum size of threads heap.
       
    32      */
       
    33     static const TInt KMaxHeapSize = 0x10000;
       
    34     
       
    35     /**
       
    36      * Information structure of plugin.
       
    37      */
       
    38     struct TPluginArrayEntry
       
    39         {
       
    40         TUid iUid;
       
    41         CActiveScheduler * iActiveScheduler;
       
    42         };
       
    43 
       
    44     /**
       
    45      * Constructor.
       
    46      */
       
    47     CGenericWlanPlugin();
       
    48     
       
    49     /**
       
    50      * Destructor.
       
    51      */
       
    52     ~CGenericWlanPlugin();
       
    53     
       
    54     /**
       
    55      * Start all plugins having Generic WLAN Plugin interface UID.
       
    56      */
       
    57     void StartPlugins();
       
    58 
       
    59     /**
       
    60      * Stop all started plugins.
       
    61      */
       
    62     void StopPlugins();
       
    63 
       
    64 private:
       
    65 
       
    66     /**
       
    67      * Main function for thread.
       
    68      * 
       
    69      * Create cleanup stack for thread.
       
    70      * 
       
    71      * @param aPluginArrayEntryPtr Pointer to plugin information.
       
    72      * @return Symbian specific error code.
       
    73      */
       
    74     static TInt GenericWlanPluginThreadMain( TAny* aPluginArrayEntryPtr );
       
    75     
       
    76     /**
       
    77      * Load ECom plugin.
       
    78      * 
       
    79      * Create active scheduler for thread and load ECom plugin which 
       
    80      * implementation UID is aPluginArrayEntryPtr->iUid.
       
    81      * 
       
    82      * @param aPluginArrayEntryPtr Pointer to plugin information.
       
    83      */
       
    84     static void LoadGenericWlanPluginL( TPluginArrayEntry * aPluginArrayEntryPtr );
       
    85     
       
    86 private: // Data
       
    87     /**
       
    88      * UID and Active Scheduler for each thread.
       
    89      */
       
    90     RArray<TPluginArrayEntry> iPluginArray;
       
    91     };
       
    92 
       
    93 #endif  // WLANGENERICPLUGIN_H_
       
    94             
       
    95 // End of File