coreapplicationuis/SysAp/Inc/SysApMediatorObserver.h
changeset 0 2e3d3ce01487
child 33 332e7bf3b42f
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2005 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 SYSAPMEDIATOROBSERVER_H
       
    20 #define SYSAPMEDIATOROBSERVER_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    25   #include <MediatorCommandInitiator.h>
       
    26 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    27 
       
    28 #include <MediatorCommandResponder.h>
       
    29 #include <MediatorEventProvider.h>
       
    30 #include <w32std.h>   // Remove this when SecondaryDisplayStartupAPI.h includes it properly.
       
    31 #include <SecondaryDisplay/SecondaryDisplayStartupAPI.h>
       
    32 
       
    33 #include "SysApAppUi.h"
       
    34 
       
    35 // CLASS DECLARATION
       
    36 class CSysApAppUi;
       
    37 class CSysApMediatorObserver : public CBase,
       
    38                             #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    39                                public MMediatorCommandResponseObserver,
       
    40                             #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    41                                public MMediatorCommandObserver
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         */
       
    48         static CSysApMediatorObserver* NewL( CSysApAppUi* aSysApAppUi );
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CSysApMediatorObserver();
       
    54 
       
    55 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    56         /**
       
    57         * Issues a command
       
    58         *
       
    59         * @return Error
       
    60         */
       
    61         TInt IssueCommand(TInt aCommandId, TInt aData);
       
    62 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    63 
       
    64         /**
       
    65         * Sends shutdown animation skip event
       
    66         */
       
    67         void ShutdownAnimationSkipped();
       
    68 
       
    69 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    70         /**
       
    71         * Synchronizes shutdown animation with cover display
       
    72         *
       
    73         * @return Error
       
    74         */
       
    75         TInt SyncShutdownAnimation();
       
    76 
       
    77     public: // MMediatorCommandResponderObserver
       
    78         void CommandResponseL( TUid aDomain,
       
    79                                TUid aCategory,
       
    80                                TInt aCommandId,
       
    81                                TInt aStatus,
       
    82                                const TDesC8& aData );
       
    83 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
    84 
       
    85     public: // MMediatorCommandObserver
       
    86         void MediatorCommandL( TUid aDomain,
       
    87                                TUid aCategory,
       
    88                                TInt aCommandId,
       
    89                                TVersion aVersion,
       
    90                                const TDesC8& aData );
       
    91 
       
    92     public: // MMediatorCommandObserver
       
    93         void CancelMediatorCommand( TUid aDomain,
       
    94                                     TUid aCategory,
       
    95                                     TInt aCommandId );
       
    96 
       
    97     private:
       
    98 
       
    99         /**
       
   100         * C++ constructor.
       
   101         */
       
   102         CSysApMediatorObserver( CSysApAppUi* aSysApAppUi );
       
   103 
       
   104         /**
       
   105         * By default EPOC constructor is private.
       
   106         */
       
   107         void ConstructL();
       
   108 
       
   109     private: //data
       
   110 
       
   111         CSysApAppUi*                iSysApAppUi; //not owned
       
   112 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
       
   113         CMediatorCommandInitiator*  iCommandInitiator;
       
   114 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
       
   115         CMediatorCommandResponder*  iCommandResponder;
       
   116         CMediatorEventProvider*     iEventProvider;
       
   117 
       
   118     };
       
   119 
       
   120 #endif      // SysApMEDIATOROBSERVER_H
       
   121 
       
   122 // End of File