|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : OomExampleAppUi.h 00004 * Part of : OomMonitor Example Application 00005 * Description : ?Description 00006 * Version : %version: 1 % << Don't touch! Updated by Synergy at check-out. 00007 * 00008 * Copyright © 2009 Nokia. All rights reserved. 00009 * This material, including documentation and any related computer 00010 * programs, is protected by copyright controlled by Nokia. All 00011 * rights are reserved. Copying, including reproducing, storing, 00012 * adapting or translating, any or all of this material requires the 00013 * prior written consent of Nokia. This material also contains 00014 * confidential information which may not be disclosed to others 00015 * without the prior written consent of Nokia. 00016 * ============================================================================ 00017 * Template version: 4.2 00018 */ 00019 00020 #ifndef __OOMEXAMPLEAPPUI_h__ 00021 #define __OOMEXAMPLEAPPUI_h__ 00022 00023 #include <aknappui.h> 00024 #include <oommonitorclient.h> 00025 00026 #include "memoryrequester.h" 00027 00028 class COomExampleAppView; 00029 00030 /** 00031 * COomExampleAppUi application UI class. 00032 * Interacts with the user through the UI and request message processing 00033 * from the handler class 00034 */ 00035 class COomExampleAppUi : public CAknAppUi, public MMemoryRequesterObserver 00036 { 00037 public: 00038 // Constructors and destructor 00039 00040 /** 00041 * ConstructL. 00042 * 2nd phase constructor. 00043 */ 00044 void ConstructL(); 00045 00046 /** 00047 * COomExampleAppUi. 00048 * C++ default constructor. This needs to be public due to 00049 * the way the framework constructs the AppUi 00050 */ 00051 COomExampleAppUi(); 00052 00053 /** 00054 * ~COomExampleAppUi. 00055 * Virtual Destructor. 00056 */ 00057 virtual ~COomExampleAppUi(); 00058 00059 private: 00060 00061 /** 00062 * From CEikAppUi, HandleCommandL. 00063 * Takes care of command handling. 00064 * @param aCommand Command to be handled. 00065 */ 00066 void HandleCommandL(TInt aCommand); 00067 00068 //From MMemoryRequesterObserver 00069 virtual void MemoryRequestCompleteL(TInt aResult); 00070 00071 void HandleSynchronouslyRequestFreeMemoryMenuItemSelectedL(); 00072 void HandleAsynchronouslyRequestFreeMemoryMenuItemSelectedL(); 00073 void HandleNormalMenuItemSelectedL(); 00074 void HandleHighMenuItemSelectedL(); 00075 void HandleBusyMenuItemSelectedL(); 00076 TInt MemoryToRequestL(TInt& aKilobytesRequested); 00077 void DoAllocateMemoryL(TBool aAllocate, TInt aResult); 00078 00079 private: // data 00080 00081 TInt iBytesRequested; 00082 00083 ROomMonitorSession iOomMonitorSession; 00084 00085 /** 00086 * The application view 00087 * Own 00088 */ 00089 COomExampleAppView* iAppView; 00090 00091 /** 00092 * 00093 * Own 00094 */ 00095 CMemoryRequester* iMemoryRequester; 00096 }; 00097 00098 #endif // __OOMEXAMPLEAPPUI_h__ 00099
|
© Nokia 2009 |