satengine/SatServer/SatClient/inc/csatpluginmonitor.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     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:  Monitor the set up idle mote text P&S key.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSATPLUGINMONITOR_H
       
    21 #define CSATPLUGINMONITOR_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32property.h>             // For monitor the P&S key   
       
    25 
       
    26 // CLASS DECLARATION
       
    27 NONSHARABLE_CLASS( CSatPluginMonitor ) : public CActive
       
    28     {
       
    29     public: // Constructors and destructor
       
    30         
       
    31         /**
       
    32          * Part of the two phased constuction
       
    33          *
       
    34          * @return Pointer to the created CSatPluginMonitor object
       
    35          */
       
    36         static CSatPluginMonitor* NewL();
       
    37     
       
    38         /**
       
    39          * Destructor
       
    40          */
       
    41         virtual ~CSatPluginMonitor();
       
    42         
       
    43     public: // New function
       
    44     
       
    45         /**
       
    46          * Start monitor the P&S key.
       
    47          * 
       
    48          * @since 5.1
       
    49          * @param aStatus Request to be completed on update.
       
    50          * @return Error code indicating the status of starting the monitor.
       
    51          */
       
    52         TInt Start( TRequestStatus& aStatus );
       
    53         
       
    54         /**
       
    55          * Get idle mode text via P&S key.
       
    56          * 
       
    57          * @since 5.1
       
    58          * @param aText the idle mode text.
       
    59          * @return Error code indicating the status of GetIdleModeText. 
       
    60          */      
       
    61         TInt GetIdleModeText( HBufC*& aText );
       
    62     
       
    63         /**
       
    64          * Get idle mode icon qualifier via P&S key.
       
    65          * 
       
    66          * @since 5.1
       
    67          * @param aIconQualifier the idle mode icon qualifier.
       
    68          * @return Error code indicating the status of GetIdleModeIconQualifier.
       
    69          */     
       
    70         TInt GetIdleModeIconQualifier( TInt& aIconQualifier );
       
    71     
       
    72         /**
       
    73          * Get idle mode icon id via P&S key.
       
    74          * 
       
    75          * @since 5.1
       
    76          * @param aRecordNumber the icon mode icon id.
       
    77          * @return Error code indicating the status of GetIdleModeIconId.
       
    78          */     
       
    79         TInt GetIdleModeIconId( TInt& aRecordNumber );        
       
    80         
       
    81     protected: // Functions from CActive
       
    82     
       
    83         /**
       
    84          * From CActive.
       
    85          *  
       
    86          * Handles the request completion.
       
    87          */
       
    88         void RunL();
       
    89     
       
    90         /**
       
    91          * From CActive.
       
    92          * 
       
    93          * Implements the cancel protocol.
       
    94          */
       
    95         void DoCancel();
       
    96        
       
    97         /**
       
    98          * From CActive
       
    99          * 
       
   100          * Handles a leave occurring in the request completion event 
       
   101          * handler RunL()
       
   102          * @param aError Leave from RunL().
       
   103          * @return Error code
       
   104          */    
       
   105         TInt RunError( TInt aError );
       
   106         
       
   107     private: // Constructors
       
   108             
       
   109         /**
       
   110          * Part of the two phased construction
       
   111          */
       
   112         void ConstructL();
       
   113         
       
   114         /**
       
   115          * Constructor to use in the object creation. 
       
   116          * Initializes the necessary data.
       
   117          */
       
   118         CSatPluginMonitor();        
       
   119         
       
   120     private: // data
       
   121     
       
   122         /**
       
   123          * Reference of idle application TRequestStatus.
       
   124          * Notify the idle application when P&S key changed.
       
   125          *
       
   126          * Not own
       
   127          */
       
   128         TRequestStatus* iIdleAppStatus;  
       
   129           
       
   130         /**
       
   131          * For monitor the P&S key.
       
   132          */    
       
   133         RProperty iIdleMode;
       
   134     };
       
   135 
       
   136 #endif // CSATPLUGINMONITOR_H