aknwseventobserver.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : ?FileName.h
00004 *  Part of     : ?Subsystem_name / ?Module_name
00005 *  Interface   : ?Interface_category, ?Interface_name
00006 *  Description : ?Description
00007 *  Version     : ?Version
00008 *
00009 *  Copyright © 2002-2004 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #if !defined(__AKNWSEVENTOBSERVER_H__)
00022 #define __AKNWSEVENTOBSERVER_H__
00023 
00024 // INCLUDES
00025 #include <e32std.h>
00026 //#include <w32std.h>
00027 #include <coecntrl.h>
00028 
00029 // CONSTANTS
00030 
00031 enum TAknWsEventObserverPanic
00032         {
00033         EAknWsEventObserverFailedToAddObserver,
00034         EAknWsEventObserverUnknownObserverRemoved
00035         };
00036 
00037 GLREF_C void Panic(TAknWsEventObserverPanic aPanic);
00038 
00039 
00040 // CLASS DECLARATION
00041 
00048 class MAknWsEventObserver
00049         {
00050 public:
00051         virtual void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) = 0;
00052         };
00053 
00054 
00055 // CLASS DECLARATION
00056 
00063 class CAknWsEventMonitor: public CBase, public MAknWsEventObserver
00064 {
00065 public:
00066 
00070         static CAknWsEventMonitor* NewL();
00071 
00075         virtual ~CAknWsEventMonitor();
00076 
00080         void ConstructL();
00081 
00086         IMPORT_C void AddObserverL(MAknWsEventObserver* aEventObserver);
00087 
00092         IMPORT_C void RemoveObserver(const MAknWsEventObserver* aEventObserver);
00093 
00099         IMPORT_C void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
00100         
00106     IMPORT_C void Enable(TBool aEnable = ETrue);
00107         
00113         TBool IsEnabled();
00114         
00115         
00116 
00117 private:
00118         RPointerArray<MAknWsEventObserver>* iEventObservers;
00119         TBool iEnabled; // was TInt iSpare;
00120 
00121 private:
00122 // reserved virtual function space
00123         IMPORT_C virtual void Reserved_1();
00124 
00125 };
00126 
00127 
00128 // __AKNWSEVENTOBSERVER_H__
00129 #endif

Copyright © Nokia Corporation 2001-2008
Back to top