sysresmonitoring/oommonitor/src/oomactionref.cpp
branchRCL_3
changeset 1 0fdb7f6b0309
child 19 924385140d98
equal deleted inserted replaced
0:2e3d3ce01487 1:0fdb7f6b0309
       
     1 /*
       
     2 * Copyright (c) 2006 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 OOM actions (e.g. closing applications and running plugins).
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "oomactionref.h"
       
    21 
       
    22 TActionRef::TActionRef(TActionType aType, TInt aPriority, TOomSyncMode aSyncMode, TInt aRamEstimate, COomRunPlugin& aRunPlugin, TUint aWgIndexOfTargetApp)
       
    23     : iType(aType), iPriority(aPriority), iSyncMode(aSyncMode), iRamEstimate(aRamEstimate), iWgIndex(aWgIndexOfTargetApp), iRunPlugin(&aRunPlugin)
       
    24     {   
       
    25     }
       
    26 
       
    27 TActionRef::TActionRef(TActionType aType, TInt aPriority, TOomSyncMode aSyncMode, TInt aRamEstimate, TInt aWgId, TUint aWgIndex)
       
    28 : iType(aType), iPriority(aPriority), iSyncMode(aSyncMode), iRamEstimate(aRamEstimate), iWgId(aWgId), iWgIndex(aWgIndex), iRunPlugin(NULL)
       
    29     {   
       
    30     }
       
    31 
       
    32     
       
    33 TActionRef::TActionType TActionRef::Type() const
       
    34     {
       
    35     return iType;
       
    36     }
       
    37 
       
    38 TUint TActionRef::Priority() const
       
    39     {
       
    40     return iPriority;
       
    41     }
       
    42 
       
    43 TOomSyncMode TActionRef::SyncMode() const
       
    44     {
       
    45     return iSyncMode;
       
    46     }
       
    47     
       
    48 TInt TActionRef::RamEstimate() const
       
    49     {
       
    50     return iRamEstimate;
       
    51     }
       
    52 
       
    53 TInt TActionRef::WgId() const
       
    54     {
       
    55     return iWgId;
       
    56     }
       
    57 
       
    58 TInt TActionRef::WgIndex() const
       
    59     {
       
    60     return iWgIndex;
       
    61     }
       
    62 
       
    63 COomRunPlugin& TActionRef::RunPlugin()
       
    64     {
       
    65     return *iRunPlugin;
       
    66     }