--- a/appsupport_plat/oom_monitor_plugin_api/inc/oommonitorplugin.h Fri May 14 16:01:13 2010 +0300
+++ b/appsupport_plat/oom_monitor_plugin_api/inc/oommonitorplugin.h Thu May 27 13:01:09 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -99,6 +99,44 @@
};
+class COomMonitorPluginV2 : public COomMonitorPlugin
+ {
+public: // From COomMonitorPlugin
+ /**
+ * FreeRam is called when the system RAM level becomes
+ * low. This plugin is requested to help free some RAM.
+ *
+ * Note that OomMonitorV2 will not call this version of the function so it does not need to be implemented.
+ */
+ IMPORT_C virtual void FreeRam();
+
+ /**
+ * MemoryGood is called when the system RAM level becomes
+ * good after being low.The plugin may take this opportunity
+ * to start using RAM again.
+ * Nb It is assumed that the plugin will not immediately
+ * cause a large increase in memory use, but that memory may be
+ * used over time, otherwise the plugin may cause oscillation
+ * between low and good memory states.
+ */
+ virtual void MemoryGood() = 0;
+
+public:
+ /**
+ * FreeRam is called when the system RAM level becomes
+ * low. This plugin is requested to help free some RAM.
+ * Note that it is desirable to delete all memory associated with this plugin if
+ * not using a disconnected chunk. The reason for this is that by only releasing a small amount
+ * of the memory you reduce the chances of that memory being at the end of the chunk and therefore
+ * reduce the likelihood of it being released to the system.
+ * @param aBytesToFree The minimum number of bytes of free memory that the plugin should try to free.
+ */
+ virtual void FreeRam(TInt aBytesToFree) = 0;
+
+ };
+
+
+
/**
* CAppOomMonitorPlugin is a specialised OOM monitor plugin
* that sends messages to applications when the memory state