harvester/client/inc/harvestersessionwatcher.h
branchRCL_3
changeset 26 9f21bab39f42
equal deleted inserted replaced
22:ab88d4a85041 26:9f21bab39f42
       
     1 /*
       
     2 * Copyright (c) 2007-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:  
       
    15 */
       
    16 
       
    17 #ifndef HARVESTERSESSIONWATCHER_H
       
    18 #define HARVESTERSESSIONWATCHER_H
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <harvesterclient.h>
       
    22 
       
    23 NONSHARABLE_CLASS( CHarvesterSessionWatcher ) : public CActive
       
    24 	{
       
    25 public:
       
    26 
       
    27     enum THarvesterWatcherState
       
    28         {
       
    29         EIdle,
       
    30         ERunning,
       
    31         ESCancelled
       
    32         };
       
    33 
       
    34 	// Cancel and destroy
       
    35 	~CHarvesterSessionWatcher();
       
    36 
       
    37 	// Two-phased constructor.
       
    38 	static CHarvesterSessionWatcher* NewL( MHarvesterSessionObserver& aObserver );
       
    39 
       
    40 public:
       
    41 
       
    42     // from base class CActive
       
    43     void RunL();
       
    44     TInt RunError( TInt aError );
       
    45     void DoCancel();
       
    46 
       
    47 private:	
       
    48 
       
    49     CHarvesterSessionWatcher( MHarvesterSessionObserver& aObserver );
       
    50     
       
    51     void ConstructL();
       
    52     
       
    53     void Start();
       
    54 
       
    55 private:	
       
    56 	
       
    57     RProcess iProcess;
       
    58     
       
    59     THarvesterWatcherState iState;
       
    60     
       
    61     MHarvesterSessionObserver* iObserver;   
       
    62 	};
       
    63 
       
    64 #endif // HARVESTERSESSIONWATCHER_H