internetradio2.0/activeidleinc/iractiveidlestatedetector.h
changeset 14 896e9dbc5f19
parent 12 608f67c22514
child 15 065198191975
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
     1 /*
       
     2 * Copyright (c) 2007-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:  Header file of CIRActiveIdleStateDetector.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIRACTIVEIDLESTATEDETECTOR_H
       
    20 #define CIRACTIVEIDLESTATEDETECTOR_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class MIRActiveIdleEngNotifyHandler;
       
    25 
       
    26 /**
       
    27  *  Class for detecting application running state.
       
    28  */
       
    29 NONSHARABLE_CLASS(CIRActiveIdleStateDetector) : public CActive
       
    30     {
       
    31 
       
    32 public:
       
    33     
       
    34     /**
       
    35      * C++ default constructor.
       
    36 	 * @param sStateObserver    Observer for running state change
       
    37      */
       
    38     CIRActiveIdleStateDetector( MIRActiveIdleEngNotifyHandler& aStateObserver );
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     ~CIRActiveIdleStateDetector();
       
    44 
       
    45     /**
       
    46      * Requests notification for termination of Internet Radio
       
    47      */
       
    48     void StartListeningL();
       
    49 
       
    50 protected: 
       
    51 
       
    52 // from base class CActive
       
    53     void RunL();
       
    54     void DoCancel();
       
    55 
       
    56 private: // data
       
    57 
       
    58 	/** Observer for running state change */
       
    59 	MIRActiveIdleEngNotifyHandler&  iStateObserver;
       
    60 	/** The process to be observed */
       
    61 	RProcess                        iProcess;
       
    62     
       
    63     };
       
    64 
       
    65 #endif // CIRACTIVEIDLESTATEDETECTOR_H