clock2/clockui/uimodel/inc/clkuiclksrvmodel.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:  The header file for CClkUiClkSrvModel class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CLKUI_CLKSRV_MODEL_H__
       
    19 #define __CLKUI_CLKSRV_MODEL_H__
       
    20 
       
    21 // System includes
       
    22 
       
    23 // User includes
       
    24 #include "clkuimdlbase.h"
       
    25 #include "clockserverclt.h"
       
    26 
       
    27 // Forward declarations
       
    28 
       
    29 // Class declaration
       
    30 /**
       
    31 * @class CClkUiClkSrvModel
       
    32 * @brief The clock server model class.
       
    33 * @dll clkuimodel.dll
       
    34 */
       
    35 class CClkUiClkSrvModel : public CClkUiModelBase
       
    36     {
       
    37     public:             // Constructor and destructor
       
    38         
       
    39         /**
       
    40         * @brief 2-phased constructor.
       
    41         * @param aObserver MClkUiMdlObserver*
       
    42         * @param aListenerPriority The priority of this object.
       
    43         * @return CClkUiClkSrvModel* Pointer to the constructed clockserver model.
       
    44         */
       
    45         IMPORT_C static CClkUiClkSrvModel* NewL( MClkModelObserver* aObserver, TInt aListenerPriority );
       
    46         
       
    47         /**
       
    48         * @brief Destructor.
       
    49         */
       
    50         IMPORT_C ~CClkUiClkSrvModel();
       
    51         
       
    52     public:             // New functions
       
    53         
       
    54         /**
       
    55         * @brief Interpret the listener status.
       
    56         * @param aStatus The status.
       
    57         */
       
    58         void ProcessListenerL( TInt aStatus );
       
    59         
       
    60         /**
       
    61         * @brief Returns the component that was changed by the clockserver.
       
    62         * @return TInt The changed component.
       
    63         */
       
    64         IMPORT_C TInt ReturnWhatChanged();
       
    65         
       
    66         /**
       
    67         * @brief Returns the component that was changed by the clockserver.
       
    68         * @return TInt The component caused the change.
       
    69         */
       
    70         IMPORT_C TInt ReturnWhoChanged();
       
    71         
       
    72         /**
       
    73         * @brief Calls the clockserverclient's ActivateProtocol.
       
    74         * @param aClkSrvProtocol The protocol to be activated.
       
    75         * @return TInt Symbian OS error code.
       
    76         */
       
    77         IMPORT_C TInt ActivateProtocol( TInt aClkSrvProtocol );
       
    78         
       
    79         /**
       
    80         * @brief Calls the clockserverclient's ActivateAllProtocols.
       
    81         * Function to activate all the installed protocols.
       
    82         * @return TInt Symbian OS error code.
       
    83         */
       
    84         IMPORT_C TInt ActivateAllProtocols();
       
    85         
       
    86         /**
       
    87         * @brief Calls the clockserverclient's IsActiveProtocol.
       
    88         * @param aClkSrvProtocol The protocol id.
       
    89         * @return TBool ETrue if the protocol is active, EFalse otherwise.
       
    90         */
       
    91         IMPORT_C TBool IsProtocolActive( TInt aClkSrvProtocol );
       
    92         
       
    93         /**
       
    94         * @brief Calls the clockserverclient's DeActivateProtocol.
       
    95         * @param aClkSrvProtocol The protocol to be deactivated.
       
    96         * @return TInt Symbian OS error code.
       
    97         */
       
    98         IMPORT_C TInt DeActivateProtocol( TInt aClkSrvProtocol );
       
    99         
       
   100         /**
       
   101         * @brief Calls the clockserverclient's DeActivateAllProtocols.
       
   102         * Function to deactivate all the installed protocols.
       
   103         * @return TInt Symbian OS error code.
       
   104         */
       
   105         IMPORT_C TInt DeActivateAllProtocols();
       
   106         
       
   107         /**
       
   108         * @brief Calls the clockserverclient's GetProtocolInfo.
       
   109         * @param aClkSrvProtocol The protocol to be checked. For later use.
       
   110         * @param aTimeAttribute Of type struct STimeAttributes, containing one of the time
       
   111                                 attributes requested by the user application.
       
   112         * @return TInt Symbian OS error code.
       
   113         */
       
   114         IMPORT_C TInt GetProtocolInfo( TInt aClkSrvProtocol, STimeAttributes& aTimeAttribute );
       
   115         
       
   116         /**
       
   117         * @brief Calls the clockserverclient's GetCurrentMcc.
       
   118         * @param aCurrentMcc The value of MCC. Will be filled by the server.
       
   119         * @return TInt Symbian OS error code.
       
   120         */
       
   121         IMPORT_C TInt GetCurrentMcc( TInt& aCurrentMcc );
       
   122         
       
   123         /**
       
   124         * @brief Calls the clockserverclient's GetCurrentTimeZoneId.
       
   125         * @param aCurrentTimeZoneId The value of timezone Id. Will be filled by the server.
       
   126         * @return TInt Symbian OS error code.
       
   127         */
       
   128         IMPORT_C TInt GetCurrentTimeZondId( TInt& aCurrentTimeZoneId );
       
   129         
       
   130     private:            // New functions
       
   131         
       
   132         /**
       
   133         * @brief Performs the second phase of the 2-phase construction.
       
   134         * @param aObserver MClkUiMdlObserver*
       
   135         * @param aListenerPriority The priority of this object.
       
   136         */
       
   137         void ConstructL( MClkModelObserver* aObserver, TInt aListenerPriority );
       
   138         
       
   139     private:            // Data
       
   140         
       
   141         /**
       
   142         * @var iClkSrvInterface
       
   143         * @brief The clockserverclient interface object.
       
   144         */
       
   145         RClkSrvInterface                iClkSrvInterface;
       
   146         
       
   147         /**
       
   148         * @var iWhatChanged
       
   149         * @brief Will be filled by clockserver when providing a notification.
       
   150         */
       
   151         TInt                            iWhatChanged;
       
   152         
       
   153         /**
       
   154         * @var iWhoChanged
       
   155         * @brief Will be filled by clockserver when providing a notification.
       
   156         */
       
   157         TInt                            iWhoChanged;
       
   158     };
       
   159 
       
   160 #endif          // __CLKUI_CLKSRV_MODEL_H__
       
   161 
       
   162 // End of file