inc/screensavershareddatamonitor.h
branchRCL_3
changeset 26 e8d784ac1a4b
equal deleted inserted replaced
25:aaeeca1f15af 26:e8d784ac1a4b
       
     1 /*
       
     2 * Copyright (c) 2003 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:   Defination for screensaver shared data monitoring.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_SCREENSAVERSHAREDDATAMONITOR_H
       
    21 #define C_SCREENSAVERSHAREDDATAMONITOR_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32property.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 class CScreensaverSharedDataI;
       
    28 class CScreensaverRepositoryWatcher;
       
    29 class CScreensaverEngine;
       
    30 class CScreensaverView;
       
    31 class CSubscriber;
       
    32 
       
    33 
       
    34 /**
       
    35  *  Cscreensavershareddatamonitor
       
    36  * 
       
    37  */
       
    38 class CScreensaverSharedDataMonitor : public CBase
       
    39     {
       
    40 public:
       
    41     // Constructors and destructor
       
    42 
       
    43     /**
       
    44      * Destructor.
       
    45      */
       
    46     ~CScreensaverSharedDataMonitor( );
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      */
       
    51     static CScreensaverSharedDataMonitor* NewL( CScreensaverSharedDataI* aData );
       
    52 
       
    53 private:
       
    54 
       
    55     /**
       
    56      * Constructor for performing 1st stage construction
       
    57      */
       
    58     CScreensaverSharedDataMonitor( CScreensaverSharedDataI* aData );
       
    59 
       
    60     /**
       
    61      * EPOC default constructor for performing 2nd stage construction
       
    62      */
       
    63     void ConstructL();
       
    64     
       
    65     /*
       
    66     * Returns the pointer of screensaver appui 
       
    67     */
       
    68     CScreensaverView* View();
       
    69     
       
    70     /*
       
    71     * Returns the refrence of model instance
       
    72     */
       
    73     CScreensaverEngine& Model();
       
    74     
       
    75     /**
       
    76     * detele CSubscriber
       
    77     */
       
    78     void DeleteSubscriber( CSubscriber*& aSubscriber );
       
    79     
       
    80 private:
       
    81     
       
    82     /**
       
    83     * Callback fuction. Called when the preview mode changed
       
    84     */
       
    85     static TInt HandlePreviewModeChanged(TAny* aPtr);
       
    86 
       
    87     /**
       
    88     * Callback fuction. Called when the MMC state changed
       
    89     */
       
    90     static TInt HandleMMCStateChanged(TAny* aPtr);
       
    91 
       
    92     /**
       
    93     * Callback fuction. Called when the USB state changed
       
    94     */
       
    95     static TInt HandleUSBStateChanged(TAny* aPtr);
       
    96 
       
    97     /**
       
    98     * Callback fuction. Called when the Keyguard state changed
       
    99     */
       
   100     static TInt HandleKeyguardStateChanged(TAny* aPtr);
       
   101 
       
   102     /**
       
   103     * Callback fuction. Called when the Call state changed
       
   104     */
       
   105     static TInt HandleCallStateChanged(TAny* aPtr);
       
   106 
       
   107     /**
       
   108     * Callback fuction. Called when the ShuttingDown state changed
       
   109     */
       
   110     static TInt HandleShuttingDownStateChanged(TAny* aPtr);
       
   111 
       
   112     /**
       
   113     * Callback function. Called when a start/stop request is received
       
   114     */
       
   115     static TInt HandleActivateSSChanged( TAny* aPtr );
       
   116     
       
   117     /**
       
   118     * Callback function. Called when charger state changes
       
   119     */
       
   120     static TInt HandleChargerStateChanged( TAny* aPtr );
       
   121     
       
   122     /**
       
   123     * Callback function. Called when the message waiting display state changes
       
   124     */
       
   125     static TInt HandleMessageWaitingStateChanged( TAny* aPtr );
       
   126 
       
   127 private:
       
   128     
       
   129     /*
       
   130     * The data of model class, Not own 
       
   131     */
       
   132     CScreensaverSharedDataI* iData;
       
   133     
       
   134     /*
       
   135     * The Preview mode property and its monitor
       
   136     */
       
   137     RProperty iPreviewModeProperty;
       
   138     CSubscriber* iPreviewModeSubscriber;
       
   139     
       
   140     /*
       
   141     * The MMC property and its monitor
       
   142     */
       
   143     RProperty iMMCWatchProperty;
       
   144     CSubscriber* iMMCWatchSubscriber;
       
   145     
       
   146     /*
       
   147     * The USB property and its monitor 
       
   148     */
       
   149     RProperty iUSBWatchProperty;
       
   150     CSubscriber* iUSBWatchSubscriber;
       
   151     
       
   152     /*
       
   153     * The  KeyGuard state property and its watcher
       
   154     */
       
   155     RProperty iKeyguardStateProperty;
       
   156     CSubscriber* iKeyguardStateSubscriber;
       
   157     
       
   158     /*
       
   159     * The Call state property and its watcher 
       
   160     */
       
   161     RProperty iCallStateProperty;
       
   162     CSubscriber* iCallStateSubscriber;
       
   163     
       
   164     /*
       
   165     * The shutting down property and its watcher 
       
   166     */
       
   167     RProperty iShuttingDownProperty;
       
   168     CSubscriber* iShuttingDownSubscriber;
       
   169 
       
   170     RProperty iActivateSSProperty;
       
   171     CSubscriber* iActivateSSSubscriber;
       
   172     
       
   173     /*
       
   174     * Charger state property and subscriber
       
   175     */
       
   176     RProperty iChargerStateProperty;
       
   177     CSubscriber* iChargerStateSubscriber;
       
   178     
       
   179     CRepository* iMessageWaitingRepository;
       
   180     CScreensaverRepositoryWatcher* iMessageWaitingWatcher;
       
   181 
       
   182     };
       
   183 
       
   184 #endif // C_SCREENSAVERSHAREDDATAMONITOR_H