mmserv/radioutility/radio_utility/src/RadioMonitorBody.h
changeset 0 71ca22bcf22a
child 6 e35735ece90c
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  This class provides an interface for monitoring radio
       
    15 *                state.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef C_RADIOMONITORBODY_H
       
    22 #define C_RADIOMONITORBODY_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <e32property.h>
       
    26 #include <radiomonitor.h>
       
    27 
       
    28 /**
       
    29  *  This class encapsulates the implementation body of CRadioMonitor interface.
       
    30  *
       
    31  *  @lib Radio_Utility.lib
       
    32  *  @since S60 3.2
       
    33  */
       
    34 class CRadioMonitor::CBody : public CActive
       
    35     {
       
    36 
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Factory function to create a new instance of the radio monitor.
       
    41      *
       
    42      * @since S60 3.2
       
    43      * @param aObserver The observer object
       
    44      * @return A new radio monitor object.
       
    45      */
       
    46     static CBody* NewL( MRadioMonitorObserver& aObserver );
       
    47 
       
    48     ~CBody();
       
    49 
       
    50     /**
       
    51      * Check whether the radio is on.
       
    52      *
       
    53      * @since S60 3.2
       
    54      * @return Radio state. ETrue = ON, EFalse = OFF.
       
    55      */
       
    56     TBool IsRadioOn() const;
       
    57 
       
    58 private:
       
    59 
       
    60 // from base class CActive
       
    61 
       
    62     /**
       
    63      * From CActive
       
    64      * Called when P&S key changes
       
    65      *
       
    66      * @since S60 3.2
       
    67      */
       
    68     void RunL();
       
    69 
       
    70     /**
       
    71      * From CActive
       
    72      * Cancels outstanding requests.
       
    73      *
       
    74      * @since S60 3.2
       
    75      */
       
    76     void DoCancel();
       
    77 
       
    78 private:
       
    79 
       
    80     void ConstructL();
       
    81     CBody();
       
    82 
       
    83 private:
       
    84 
       
    85     // The monitored P&S key
       
    86     RProperty iProperty;
       
    87     // Radio monitoring client
       
    88     MRadioMonitorObserver* iRadioMonitorClient;
       
    89 
       
    90     };
       
    91 
       
    92 #endif // C_RADIOMONITOR_H