inc/screensavershareddatamonitor.h
changeset 14 8a173132b0aa
parent 2 058b1fc1663a
equal deleted inserted replaced
2:058b1fc1663a 14:8a173132b0aa
     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 private:
       
   113     
       
   114     /*
       
   115     * The data of model class, Not own 
       
   116     */
       
   117     CScreensaverSharedDataI* iData;
       
   118     
       
   119     /*
       
   120     * The Preview mode property and its monitor
       
   121     */
       
   122     RProperty iPreviewModeProperty;
       
   123     CSubscriber* iPreviewModeSubscriber;
       
   124     
       
   125     /*
       
   126     * The MMC property and its monitor
       
   127     */
       
   128     RProperty iMMCWatchProperty;
       
   129     CSubscriber* iMMCWatchSubscriber;
       
   130     
       
   131     /*
       
   132     * The USB property and its monitor 
       
   133     */
       
   134     RProperty iUSBWatchProperty;
       
   135     CSubscriber* iUSBWatchSubscriber;
       
   136     
       
   137     /*
       
   138     * The  KeyGuard state property and its watcher
       
   139     */
       
   140     RProperty iKeyguardStateProperty;
       
   141     CSubscriber* iKeyguardStateSubscriber;
       
   142     
       
   143     /*
       
   144     * The Call state property and its watcher 
       
   145     */
       
   146     RProperty iCallStateProperty;
       
   147     CSubscriber* iCallStateSubscriber;
       
   148     
       
   149     /*
       
   150     * The shutting down property and its watcher 
       
   151     */
       
   152     RProperty iShuttingDownProperty;
       
   153     CSubscriber* iShuttingDownSubscriber;
       
   154 
       
   155     };
       
   156 
       
   157 #endif // C_SCREENSAVERSHAREDDATAMONITOR_H