sysresmonitoring/oommonitor/inc/oomapplicationconfig.h
branchRCL_3
changeset 1 0fdb7f6b0309
child 18 0818dd463d41
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:  Configuration representation classes for Out of Memory Monitor.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef OOMAPPLICATIONCONFIG_
       
    20 #define OOMAPPLICATIONCONFIG_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class COomCloseAppConfig;
       
    25 class MOomRuleConfig;
       
    26 
       
    27 /*
       
    28  * A list of action configurations for a particular target application.
       
    29  *
       
    30  * All configured actions in this list must be for the same target application.
       
    31  * Actions may be configured to close the application or to run an OOM plugin.
       
    32  *  
       
    33  *  @lib oommonitor.lib
       
    34  *  @since S60 v5.0
       
    35  */
       
    36 NONSHARABLE_CLASS(COomApplicationConfig) : public CBase
       
    37     {
       
    38 public:
       
    39     
       
    40     /**
       
    41      * Two-phased constructor
       
    42      * @param aApplicationId the UID of the application
       
    43      */
       
    44 	static COomApplicationConfig* NewL(TUint aApplicationId);
       
    45     
       
    46 // Functions for getting configuration  
       
    47     
       
    48     /**
       
    49      * Return a pointer to the close app config, this may be NULL if no app close config has been configured
       
    50      * Ownership is NOT passed to the caller
       
    51      */
       
    52     inline COomCloseAppConfig* GetAppCloseConfig();
       
    53         
       
    54     inline TUint Id();
       
    55     
       
    56 // Functions for setting configuration  
       
    57 
       
    58     inline void SetAppCloseConfig(COomCloseAppConfig* aActionConfig);
       
    59     
       
    60     /**
       
    61      * Add a rule
       
    62      * 
       
    63      * This class takes ownership of the given rule
       
    64      * The rule would will apply to the "application close" event
       
    65      */
       
    66     void AddRuleL(MOomRuleConfig* aRule);
       
    67     
       
    68     ~COomApplicationConfig();
       
    69 
       
    70 public:
       
    71     
       
    72     TUint iGoodRamThreshold;
       
    73     TUint iLowRamThreshold; 
       
    74     
       
    75 private:
       
    76     
       
    77     void ConstructL();
       
    78     
       
    79     COomApplicationConfig(TUint aApplicationId);
       
    80     
       
    81     COomCloseAppConfig* iCloseAppConfig;
       
    82     
       
    83     TInt iIndex;
       
    84     
       
    85     TUint iApplicationId;
       
    86     };
       
    87 
       
    88 #include "oomapplicationconfig.inl"
       
    89 
       
    90 #endif /*OOMAPPLICATIONCONFIG_*/