cbs/cbsui/inc/ccbsuisettingsmonitor.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2010 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 
       
    18 
       
    19 #ifndef     CCBSUISETTINGSMONITOR_H
       
    20 #define     CCBSUISETTINGSMONITOR_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32BASE.H>
       
    24 #include <cbscommon.h>
       
    25  
       
    26 //  FORWARD DECLARATIONS
       
    27 class MCbs;
       
    28 class CCbsUiappAppUi;
       
    29 class MCbsUiSettingsObserver;
       
    30 
       
    31 //  CLASS DEFINITIONS 
       
    32 
       
    33 
       
    34 /**
       
    35 * Server notifies this class if settings are changed.
       
    36 * 
       
    37 */
       
    38 class CCbsUiSettingsMonitor : public CActive
       
    39     {
       
    40     public:     // New functions
       
    41         /**
       
    42         * Create an instance of the class. 
       
    43         *
       
    44         * @param aServer cbs server
       
    45         * @param aObserver settings observer
       
    46         */
       
    47         static CCbsUiSettingsMonitor* NewL(
       
    48             MCbs& aServer , MCbsUiSettingsObserver& aObserver );
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CCbsUiSettingsMonitor();
       
    54 
       
    55     public: // From CActive
       
    56         
       
    57         /**
       
    58         * It is called when server notifies.
       
    59         */
       
    60         void RunL();
       
    61 
       
    62         /**
       
    63         * Cancels the request.
       
    64         */
       
    65         void DoCancel();
       
    66 
       
    67     private: // New functions
       
    68 
       
    69         /**
       
    70         * Issues the request..
       
    71         */
       
    72         void IssueRequest();
       
    73 
       
    74     private:
       
    75 
       
    76         /**
       
    77         * Constructor.
       
    78         *
       
    79         * @param aServer cbs server
       
    80         */
       
    81         CCbsUiSettingsMonitor( 
       
    82             MCbs& aServer, MCbsUiSettingsObserver& aObserver );
       
    83 
       
    84         /**
       
    85         * Finalizes the construction.
       
    86         */
       
    87         void ConstructL();
       
    88 
       
    89     private: // Data
       
    90 
       
    91         // ETrue if request is continued.
       
    92         TBool iContinue;
       
    93         
       
    94         // Server subsession for settings        
       
    95         MCbs& iServer;
       
    96 
       
    97         // Event which is registered to server
       
    98         TCbsSettingsEvent iEvent;
       
    99 
       
   100         // Observer who is interested about settings changes.       
       
   101         MCbsUiSettingsObserver& iObserver;
       
   102     };
       
   103 
       
   104 #endif      //  CCBSUISETTINGSMONITOR_H
       
   105   
       
   106 // End of File