wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmnotification.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  notification class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLMNOTIFICATION_H
       
    20 #define WLMNOTIFICATION_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "wlmsession.h"
       
    24 #include "am_platform_libraries.h"
       
    25 
       
    26 class CWlmSession;
       
    27 
       
    28 /**
       
    29 * Base class for all notification types.
       
    30 *
       
    31 * Basically this only determines the interface how Server is forwarding 
       
    32 * notifications to Sessions or WAL.
       
    33 *
       
    34 * @lib wlmserversrv.lib
       
    35 * @since Series 60 3.0
       
    36 */
       
    37 class CNotificationBase : public CBase
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CNotificationBase() {};
       
    45 
       
    46        // New methods
       
    47 
       
    48     public: // New functions
       
    49 
       
    50         /**
       
    51          * AddNotification
       
    52          * @since Series 60 3.0
       
    53          * @param aNotification identifier
       
    54          * @param aData content of the notification
       
    55          */
       
    56         virtual void AddNotification(
       
    57             TUint aNotification,
       
    58             TDes8& aData ) = 0;            
       
    59     };
       
    60 
       
    61 /**
       
    62 * Forwards notifications to a session.
       
    63 *
       
    64 * @lib wlmserversrv.dll
       
    65 * @since Series 60 3.0
       
    66 */
       
    67 NONSHARABLE_CLASS( CSessionNotification ) : public CNotificationBase
       
    68     {
       
    69     public:  // Constructors and destructor
       
    70 
       
    71         /**
       
    72         * Two-phased constructor.
       
    73         * 
       
    74         * @param aSession Handle to the session.
       
    75         * @param aNotificationMask Notifications enabled for the session.
       
    76         * @return Pointer to the created instance, NULL if unable to create an instance.
       
    77         */
       
    78         static CSessionNotification* NewL(
       
    79             CWlmSession& aSession,
       
    80             TUint32 aNotificationMask );
       
    81 
       
    82         /**
       
    83         * Destructor.
       
    84         */
       
    85         virtual ~CSessionNotification();
       
    86 
       
    87     public: // Functions from base classes
       
    88 
       
    89         /**
       
    90          * AddNotification
       
    91          * @since Series 60 3.0
       
    92          * @param aNotification identifier
       
    93          * @param aData content of the notification
       
    94          */
       
    95         void AddNotification(
       
    96             TUint aNotification,
       
    97             TDes8& aData );
       
    98 
       
    99     private: // Methods
       
   100 
       
   101         /**
       
   102         * C++ default constructor.
       
   103         * 
       
   104         * @param aSession Handle to the session.
       
   105         * @param aNotificationMask Notifications enabled for the session.
       
   106         */
       
   107         CSessionNotification(
       
   108             CWlmSession& aSession,
       
   109             TUint32 aNotificationMask );
       
   110 
       
   111     private:    // Data
       
   112 
       
   113         /** Interface to session to forward notifications. */
       
   114         CWlmSession& iSession;
       
   115 
       
   116         /** Bitmask of active notifications. */
       
   117         TUint32 iNotificationMask;
       
   118     };
       
   119 
       
   120 #endif // WLMNOTIFICATION_H
       
   121             
       
   122 // End of File