wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlannotificationhandler.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Class to receive asynchronous notifications from WLAN drivers.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLANNOTIFICATIONHANDLER_H
       
    20 #define WLANNOTIFICATIONHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "umac_types.h"
       
    25 #include "am_platform_libraries.h"
       
    26 
       
    27 class RWlanLogicalChannel;
       
    28 
       
    29 /**
       
    30  * Callback interface
       
    31  */
       
    32 class MWlanNotificationCallback
       
    33     {
       
    34     public:
       
    35         virtual void OnNotify(const TIndication& aIndication) = 0;
       
    36     };
       
    37 
       
    38 /**
       
    39  * Active Object that receives notifications from driver side
       
    40  * @since S60 v.3.0
       
    41  * @lib wlmserversrv.lib
       
    42  */
       
    43 NONSHARABLE_CLASS( CWlanNotificationHandler ) : public CActive
       
    44     {
       
    45 public: // Constructors and destructor
       
    46 
       
    47     static CWlanNotificationHandler* NewL(
       
    48         RWlanLogicalChannel& aChannel,
       
    49         MWlanNotificationCallback& aClient );
       
    50 
       
    51     /**
       
    52      * C++ default constructor.
       
    53      * @param aService Interface to request notifirations.
       
    54      * @param aClient  Interface to forward notifications.
       
    55      */
       
    56     CWlanNotificationHandler( 
       
    57         RWlanLogicalChannel& aChannel,
       
    58         MWlanNotificationCallback& aClient );
       
    59 
       
    60     /**
       
    61      * Destructor.
       
    62      */
       
    63     virtual ~CWlanNotificationHandler();
       
    64 
       
    65 public: // New methods
       
    66 
       
    67     /**
       
    68      * Activate the handler
       
    69      * Handler starts to listen for notifications
       
    70      * @since S60 v.3.1
       
    71      * @return error code
       
    72      */
       
    73     TInt Start();
       
    74     
       
    75     /**
       
    76      * Deactivate the handler
       
    77      * Handler stops to listen for received management frames
       
    78      * @since S60 v.3.1
       
    79      */
       
    80     void Stop();
       
    81 
       
    82 public: // Methods from base classes
       
    83 
       
    84     /**
       
    85      * From CActive
       
    86      * Cancel waiting.
       
    87      */
       
    88     void DoCancel();
       
    89 
       
    90     /**
       
    91      * From CActive 
       
    92      * Receive an event..
       
    93      */
       
    94     void RunL();
       
    95 
       
    96 protected:
       
    97 
       
    98     /**
       
    99      * ConstructL
       
   100      */
       
   101     void ConstructL();
       
   102 
       
   103     /**
       
   104      * Wait for an event
       
   105      */
       
   106     void IssueRequest();
       
   107     
       
   108 private: // data
       
   109 
       
   110     /**
       
   111      * Provider of the asynchronous service
       
   112      */
       
   113     RWlanLogicalChannel& iChannel;
       
   114 
       
   115     /**
       
   116      * Reference to the client
       
   117      */
       
   118     MWlanNotificationCallback& iClient;
       
   119 
       
   120     /**
       
   121      * The indication message to be sent to the client
       
   122      */
       
   123     TIndication iIndication;
       
   124 
       
   125     };
       
   126 
       
   127 #endif // WLANNOTIFICATIONHANDLER_H