sysresmonitoring/oommonitor/inc/oomidletimerule.h
branchRCL_3
changeset 1 0fdb7f6b0309
child 19 924385140d98
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysresmonitoring/oommonitor/inc/oomidletimerule.h	Fri Feb 19 22:58:54 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2006 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Configuration representation classes for Out of Memory Monitor.
+*
+*/
+
+
+#ifndef OOMIDLETIMERULE_
+#define OOMIDLETIMERULE_
+
+#include <e32base.h>
+
+#include "oomruleconfig.h"
+
+/**
+ *  A rule to modify the priority of an app close action if it has been idle for a period of time
+ *
+ *  @lib oommonitor.lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(COomIdleTimeRule) : public CBase, public MOomRuleConfig
+    {
+public:
+    static COomIdleTimeRule* NewL(TTimeIntervalSeconds aIdleTime, TInt aPriority);
+    
+    TBool RuleIsApplicable(const COomWindowGroupList& aWindowGroupList, TInt aAppIndexInWindowGroup) const;
+
+    inline TUint Priority() const;
+    
+    ~COomIdleTimeRule();
+    
+private:
+    COomIdleTimeRule(TTimeIntervalSeconds aIdleTime, TInt aPriority);
+    
+private:
+    TTimeIntervalSeconds iIdleTime; // The idle time after which to apply the given priority
+    TInt iPriority; // The priority to apply after the given idle time
+    };
+
+#include "oomidletimerule.inl"
+
+#endif /*OOMIDLETIMERULE_*/