uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h
branchRCL_3
changeset 8 46927d61fef3
parent 0 15bf7259bb7c
child 9 3ac8bf5c5014
equal deleted inserted replaced
7:88b23e2e82e1 8:46927d61fef3
    23 
    23 
    24 class CMemoryMonitor;
    24 class CMemoryMonitor;
    25 class RFs;
    25 class RFs;
    26 class RWsSession;
    26 class RWsSession;
    27 
    27 
       
    28 enum TGOomMonitorFlags
       
    29 	{
       
    30 	KGOomNone = 0,
       
    31 	KGOomUseSwRendering
       
    32 	};
    28 
    33 
    29 /**
    34 /**
    30 * Panic codes with category "OomMonitorPlugin"
    35 * Panic codes with category "OomMonitorPlugin"
    31 */
    36 */
    32 enum TGOomMonitorPluginPanic
    37 enum TGOomMonitorPluginPanic
    64 public:
    69 public:
    65 	/**
    70 	/**
    66 	* FreeRam is called when the system RAM level becomes
    71 	* FreeRam is called when the system RAM level becomes
    67 	* low. This plugin is requested to help free some RAM.
    72 	* low. This plugin is requested to help free some RAM.
    68 	*/
    73 	*/
    69 	virtual void FreeRam(TInt aBytesToFree) = 0;
    74 	//virtual void FreeRam(TInt aBytesToFree);
    70 
    75 	virtual void FreeRam(TInt aBytesToFree, TInt aFlags) = 0;
    71 	/**
    76 	/**
    72 	* MemoryGood is called when the system RAM level becomes
    77 	* MemoryGood is called when the system RAM level becomes
    73 	* good after being low.The plugin may take this opportunity
    78 	* good after being low.The plugin may take this opportunity
    74 	* to start using RAM again.
    79 	* to start using RAM again.
    75 	* Nb It is assumed that the plugin will not immediately
    80 	* Nb It is assumed that the plugin will not immediately
    76 	* cause a large increase in memory use, but that memory may be
    81 	* cause a large increase in memory use, but that memory may be
    77 	* used over time, otherwise the plugin may cause oscillation
    82 	* used over time, otherwise the plugin may cause oscillation
    78 	* between low and good memory states.
    83 	* between low and good memory states.
    79 	*/
    84 	*/
    80 	virtual void MemoryGood() = 0;
    85 	//virtual void MemoryGood();
       
    86 	virtual void MemoryGood(TInt aFlags) = 0;
    81 
    87 
    82 public:
    88 public:
    83     /**
    89     /**
    84     * Get a handle to the file server.
    90     * Get a handle to the file server.
    85     * @return a connected file server session.
    91     * @return a connected file server session.
   112 	* this version of the function should not need to be implemented.
   118 	* this version of the function should not need to be implemented.
   113 	* The definition of this function should change once the alf plugin is stable and finetuned
   119 	* The definition of this function should change once the alf plugin is stable and finetuned
   114     * @param aBytesToFree The minimum number of bytes of free memory that the plugin should try to free.
   120     * @param aBytesToFree The minimum number of bytes of free memory that the plugin should try to free.
   115 	*/
   121 	*/
   116 
   122 
   117     virtual void FreeRam(TInt aBytesToFree) = 0;
   123     virtual void FreeRam(TInt aBytesToFree, TInt aFlags) = 0;
   118 
   124 	
   119 	/**
   125 	/**
   120 	* MemoryGood is called when the system RAM level becomes
   126 	* MemoryGood is called when the system RAM level becomes
   121 	* good after being low.The plugin may take this opportunity
   127 	* good after being low.The plugin may take this opportunity
   122 	* to start using RAM again.
   128 	* to start using RAM again.
   123 	* Nb It is assumed that the plugin will not immediately
   129 	* Nb It is assumed that the plugin will not immediately
   124 	* cause a large increase in memory use, but that memory may be
   130 	* cause a large increase in memory use, but that memory may be
   125 	* used over time, otherwise the plugin may cause oscillation
   131 	* used over time, otherwise the plugin may cause oscillation
   126 	* between low and good memory states.
   132 	* between low and good memory states.
   127 	*/
   133 	*/
   128 	virtual void MemoryGood() = 0;
   134 	virtual void MemoryGood(TInt aFlags) = 0;
       
   135 	
   129 	};
   136 	};
   130 
   137 
   131 
   138 
   132 
   139 
   133 /**
   140 /**
   168     IMPORT_C static CAppGOomMonitorPlugin* NewL(TUid aAppUid);
   175     IMPORT_C static CAppGOomMonitorPlugin* NewL(TUid aAppUid);
   169 
   176 
   170 private:
   177 private:
   171 	CAppGOomMonitorPlugin(TUid aAppUid);
   178 	CAppGOomMonitorPlugin(TUid aAppUid);
   172 
   179 
   173 	void FreeRam(TInt aFreeMemory);
   180 	/*void FreeRam(TInt aFreeMemory);
   174 	void MemoryGood();
   181 	void MemoryGood();
       
   182 	*/
       
   183 	void FreeRam(TInt aBytesToFree, TInt aFlags);
       
   184 	void MemoryGood(TInt aFlags);
   175 
   185 
   176     void SendMessageToApp(TInt aMessage);
   186     void SendMessageToApp(TInt aMessage);
   177 
   187 
   178 private:
   188 private:
   179     TUid iAppUid;
   189     TUid iAppUid;