harvester/monitorplugins/mdsoomplugin/inc/mdsoomplugin.h
changeset 0 c53acadfccc6
child 15 3cebc1a84278
child 21 50bf9db68373
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Low memory observer for havester server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MDSOOMPLUGIN_H
       
    20 #define MDSOOMPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <e32msgqueue.h>
       
    26 
       
    27 #include <oommonitorplugin.h>
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  CMdSOomPlugin
       
    33 * 
       
    34 */
       
    35 class CMdSOomPlugin : public COomMonitorPlugin
       
    36 	{
       
    37 public:
       
    38 	// Constructors and destructor
       
    39 	static CMdSOomPlugin* NewL();
       
    40 	
       
    41 	/**
       
    42 	 * Destructor.
       
    43 	 */
       
    44 	virtual ~CMdSOomPlugin();	
       
    45 	
       
    46 
       
    47 	/**
       
    48 	 * From COomMonitorPlugin
       
    49 	 * FreeRam is called when the system RAM level becomes
       
    50 	 * low. This plugin is requested to help free some RAM.
       
    51 	 */
       
    52 	void FreeRam();
       
    53 
       
    54 	/**
       
    55 	 * From COomMonitorPlugin
       
    56 	 * MemoryGood is called when the system RAM level becomes
       
    57 	 * good after being low.The plugin may take this opportunity
       
    58 	 * to start using RAM again.
       
    59 	 * Nb It is assumed that the plugin will not immediately
       
    60 	 * cause a large increase in memory use, but that memory may be
       
    61 	 * used over time, otherwise the plugin may cause oscillation
       
    62 	 * between low and good memory states.
       
    63 	 */
       
    64 	void MemoryGood();
       
    65 
       
    66 private:
       
    67 
       
    68 	/**
       
    69 	 * Constructor for performing 1st stage construction
       
    70 	 */
       
    71 	CMdSOomPlugin();
       
    72 	
       
    73 	/**
       
    74 	 * default constructor for performing 2nd stage construction
       
    75 	 */
       
    76 	void ConstructL();
       
    77 
       
    78 	/**
       
    79 	 * From COomMonitorPlugin
       
    80 	 */
       
    81 	void ExtensionInterface(TUid aInterfaceId, TAny*& aImplementation);
       
    82     
       
    83 private:
       
    84 
       
    85 	RMsgQueue<TInt> iOomMsgQueue;
       
    86 	
       
    87 	};
       
    88 
       
    89 #endif // MDSOOMPLUGIN_H
       
    90