uiacceltk/hitchcock/goommonitor/inc/goompluginwaiter.h
changeset 0 15bf7259bb7c
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 #ifndef GOOMPLUGINWAITER_H_
       
    20 #define GOOMPLUGINWAITER_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CGOomRunPlugin;
       
    25 
       
    26 
       
    27 /*
       
    28  *  A class used for waiting for a pre-determined period before completing the plugin operation
       
    29  *  It is intended to be used to force a delay between the call to the plugin and the memory check,
       
    30  *  thus allowing the plugin to free some memory first.
       
    31  * 
       
    32  *  @lib goommonitor.lib
       
    33  *  @since S60 v5.0
       
    34  */
       
    35 NONSHARABLE_CLASS(CGOomPluginWaiter) : public CTimer
       
    36     {
       
    37 public:
       
    38     static CGOomPluginWaiter* NewL(TInt aMillisecondsToWait, CGOomRunPlugin& aCallbackClass);
       
    39     
       
    40     // Start the timer, it will call the plugin back when it expires
       
    41     void Start();
       
    42     
       
    43 protected:
       
    44     void RunL();
       
    45     
       
    46     CGOomPluginWaiter(TInt aMillisecondsToWait, CGOomRunPlugin& aCallbackClass);
       
    47     
       
    48 private:
       
    49     TInt iMillisecondsToWait;
       
    50     CGOomRunPlugin& iCallbackClass;
       
    51     };
       
    52 
       
    53 #endif /*GOOMPLUGINWAITER_H_*/