uiacceltk/hitchcock/goommonitor/src/goomIdletimerule.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Configuration representation classes for Graphics Out of Memory Monitor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "goomidletimerule.h"
       
    20 #include "goomwindowgrouplist.h"
       
    21 #include "goomtraces.h"
       
    22 
       
    23 CGOomIdleTimeRule* CGOomIdleTimeRule::NewL(TTimeIntervalSeconds aIdleTime, TInt aPriority)
       
    24     {
       
    25     FUNC_LOG;
       
    26 
       
    27     CGOomIdleTimeRule* self = new (ELeave) CGOomIdleTimeRule(aIdleTime, aPriority);
       
    28     return self;
       
    29     }
       
    30 
       
    31 TBool CGOomIdleTimeRule::RuleIsApplicable(const CGOomWindowGroupList& aWindowGroupList, TInt aAppIndexInWindowGroup) const
       
    32     {
       
    33     FUNC_LOG;
       
    34 
       
    35     TBool applicable = EFalse;
       
    36     if (aAppIndexInWindowGroup >= 0)
       
    37         {
       
    38         applicable = (aWindowGroupList.IdleTime(aAppIndexInWindowGroup) >= iIdleTime);
       
    39         }
       
    40     return applicable;
       
    41     }
       
    42 
       
    43 CGOomIdleTimeRule::~CGOomIdleTimeRule()
       
    44     {
       
    45     FUNC_LOG;
       
    46     }
       
    47 
       
    48 CGOomIdleTimeRule::CGOomIdleTimeRule(TTimeIntervalSeconds aIdleTime, TInt aPriority) : iIdleTime(aIdleTime), iPriority(aPriority)
       
    49     {
       
    50     FUNC_LOG;
       
    51     }
       
    52