uiacceltk/hitchcock/goommonitor/src/goomactionref.cpp
changeset 0 15bf7259bb7c
child 3 d8a3531bc6b8
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:  Classes for executing GOOM actions (e.g. closing applications and running plugins).
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "goomactionref.h"
       
    20 
       
    21 TActionRef::TActionRef(TActionType aType, TInt aPriority, TGOomSyncMode aSyncMode, TInt aRamEstimate, CGOomRunPlugin& aRunPlugin, TUint aWgIndexOfTargetApp)
       
    22     : iType(aType), iPriority(aPriority), iSyncMode(aSyncMode), iRamEstimate(aRamEstimate), iWgIndex(aWgIndexOfTargetApp), iRunPlugin(&aRunPlugin)
       
    23     {   
       
    24     }
       
    25 
       
    26 TActionRef::TActionRef(TActionType aType, TInt aPriority, TGOomSyncMode aSyncMode, TInt aRamEstimate, TInt aWgId, TUint aWgIndex)
       
    27 : iType(aType), iPriority(aPriority), iSyncMode(aSyncMode), iRamEstimate(aRamEstimate), iWgId(aWgId), iWgIndex(aWgIndex), iRunPlugin(NULL)
       
    28     {   
       
    29     }
       
    30 
       
    31     
       
    32 TActionRef::TActionType TActionRef::Type() const
       
    33     {
       
    34     return iType;
       
    35     }
       
    36 
       
    37 TUint TActionRef::Priority() const
       
    38     {
       
    39     return iPriority;
       
    40     }
       
    41 
       
    42 void TActionRef::SetPriority(TUint aPriority)
       
    43     {
       
    44     iPriority = aPriority;
       
    45     }
       
    46 
       
    47 TGOomSyncMode TActionRef::SyncMode() const
       
    48     {
       
    49     return iSyncMode;
       
    50     }
       
    51     
       
    52 TInt TActionRef::RamEstimate() const
       
    53     {
       
    54     return iRamEstimate;
       
    55     }
       
    56 
       
    57 TInt TActionRef::WgId() const
       
    58     {
       
    59     return iWgId;
       
    60     }
       
    61 
       
    62 TInt TActionRef::WgIndex() const
       
    63     {
       
    64     return iWgIndex;
       
    65     }
       
    66 
       
    67 CGOomRunPlugin& TActionRef::RunPlugin()
       
    68     {
       
    69     return *iRunPlugin;
       
    70     }