phoneapp/phoneuiutils/inc/cphonecallthememonitor.h
changeset 36 2eacb6118286
parent 30 ebdbd102c78a
child 37 ba76fc04e6c2
equal deleted inserted replaced
30:ebdbd102c78a 36:2eacb6118286
     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:  Monitor for call theme settings.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPHONECALLTHEMEMONITOR_H
       
    21 #define CPHONECALLTHEMEMONITOR_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    "mphonecenrepobserver.h" 
       
    25 
       
    26 /**
       
    27 *  Observer interface to call theme settings.
       
    28 *
       
    29 */
       
    30 class MPhoneCallThemeSettingsObserver
       
    31     {
       
    32     public:
       
    33         /**
       
    34         * Called when call theme settings have changed.
       
    35         */
       
    36         virtual void CallThemeSettingsChanged() = 0;
       
    37     };
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  Monitor for call theme settings.
       
    43 *
       
    44 */
       
    45 class CPhoneCallThemeMonitor : public CBase, private MPhoneCenRepObserver
       
    46     {
       
    47     public:
       
    48 
       
    49         /**
       
    50         * Two-phased constructor.
       
    51         */
       
    52         IMPORT_C static CPhoneCallThemeMonitor* NewL();
       
    53         
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         IMPORT_C virtual ~CPhoneCallThemeMonitor();
       
    58     
       
    59         /**
       
    60         * Fetches setting is call image theme .
       
    61         * @return value of settings
       
    62         */
       
    63         IMPORT_C TInt CallImageThemeSettings() const;
       
    64         
       
    65         /**
       
    66         * Fetches call image theme path.
       
    67         * @return Call image theme path.
       
    68         */
       
    69         IMPORT_C TPtrC CallImageThemeFilePath() const;
       
    70 
       
    71         /**
       
    72         * Set call theme settings observer.
       
    73         * @param aObserver Observer.
       
    74         */
       
    75         IMPORT_C void SetCallThemeSettingsObserver(
       
    76             MPhoneCallThemeSettingsObserver* aObserver );
       
    77 
       
    78     protected:
       
    79         
       
    80         /**
       
    81         * Handle the change of the setting from Central Repository
       
    82         * @param aUid identifing the central repository UID.
       
    83         * @param aId central repository ID.
       
    84         */
       
    85         virtual void HandleCenRepChangeL( 
       
    86             const TUid& aUid,
       
    87             const TUint aId );
       
    88 
       
    89  
       
    90     private:
       
    91 
       
    92         /**
       
    93         * C++ default constructor.
       
    94         */
       
    95         CPhoneCallThemeMonitor();
       
    96 
       
    97         /**
       
    98         * By default Symbian 2nd phase constructor is private.
       
    99         */
       
   100         void ConstructL();
       
   101         
       
   102         /**
       
   103         * Reads all theme settings from CenRep.
       
   104         */
       
   105         void ReadAllL();
       
   106         
       
   107         
       
   108     private: // Data
       
   109         // Themes client id
       
   110         TInt iThemesClientID;
       
   111   
       
   112         // Current theme image setting
       
   113         TInt iThemeCallImageSettings;
       
   114         
       
   115         // Theme image path and name
       
   116         HBufC* iCallerImageThemePath;
       
   117         
       
   118         // Observer to be notified.
       
   119         MPhoneCallThemeSettingsObserver* iObserver;
       
   120      };
       
   121 
       
   122 #endif      // CPHONECALLTHEMEMONITOR_H   
       
   123             
       
   124 // End of File