diff -r 000000000000 -r c53acadfccc6 harvester/server/inc/harvesteroomao.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/server/inc/harvesteroomao.h Mon Jan 18 20:34:07 2010 +0200 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Low memory observer for havester server +* +*/ + +#ifndef __HARVESTEROOMAO_H__ +#define __HARVESTEROOMAO_H__ + + +// INCLUDES +#include +#include +#include + +// CLASS DECLARATION + +/** + * MHarvesterPluginObserver + */ +class MHarvesterOomObserver + { + public: + virtual void MemoryLow() = 0; + virtual void MemoryGood() = 0; + }; + +/** +* CMdSOomPlugin +* +*/ +class CHarvesterOomAO : public CActive + { +public: + // Constructors and destructor + static CHarvesterOomAO* NewL( MHarvesterOomObserver& aObserver ); + + /** + * Destructor. + */ + virtual ~CHarvesterOomAO(); + + /** + * Standard RunL-method. + * From CActive. + */ + void RunL(); + + /** + * From CActive. + */ + void DoCancel(); + + /** + * From CActive. + * @param aError Leave error code. + * @return Always KErrNone. + */ + TInt RunError( TInt aError ); + + +private: + + /** + * Constructor for performing 1st stage construction + */ + CHarvesterOomAO( MHarvesterOomObserver& aObserver ); + + /** + * default constructor for performing 2nd stage construction + */ + void ConstructL(); + + +private: + + RMsgQueue iOomMsgQueue; + MHarvesterOomObserver* iObserver; + + }; + + +#endif /*__HARVESTEROOMAO_H__*/