uifw/AknGlobalUI/avkonstartupextplg/inc/avkonstartupextensionplugin.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  Declaration of CAvkonStartupExtensionPlugIn class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AVKON_STARTUP_EXTENSION_PLUG_IN_H
       
    20 #define C_AVKON_STARTUP_EXTENSION_PLUG_IN_H
       
    21 
       
    22 #include <systemstartupextension.h>
       
    23 #include <AknCapServerClient.h>
       
    24 
       
    25 class RAknUiServer;
       
    26 
       
    27 /**
       
    28  * System Startup Extension plug-in for executing Avkon initialization during
       
    29  * system startup and shutting down applications during system shutdown.
       
    30  *
       
    31  *  @lib avkonstartupextensionplugin.lib
       
    32  *  @since S60 3.2
       
    33  */
       
    34 NONSHARABLE_CLASS( CAvkonStartupExtensionPlugIn )
       
    35   : public CSystemStartupExtension
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41     * Constructs a CAvkonStartupExtensionPlugIn object.
       
    42     *
       
    43     * @param aConstructionParameters For the use of the base class.
       
    44     *
       
    45     * @since S60 3.2
       
    46     */
       
    47     static CAvkonStartupExtensionPlugIn* NewL( TAny* aConstructionParameters );
       
    48 
       
    49     /**
       
    50     * Destructor.
       
    51     *
       
    52     * @since S60 3.2
       
    53     */
       
    54     virtual ~CAvkonStartupExtensionPlugIn();
       
    55 
       
    56     /**
       
    57      * Execute Avkon operations depending on parameters.
       
    58      *
       
    59      * @since S60 3.2
       
    60      *
       
    61      * @param aStatus The request status to complete after the task has been
       
    62      * finished.
       
    63      * @param aParams Identifies the action to take. Either KPalette (to load
       
    64      *                palette), KEnableApps (to enable apps key) or KShutdown
       
    65      *                (to shut down applications).
       
    66      */
       
    67     virtual void ExecuteL( TRequestStatus& aStatus, const TDesC& aParams );
       
    68 
       
    69     /**
       
    70      * Cancel pending request.
       
    71      *
       
    72      * @since S60 3.2
       
    73      */
       
    74     virtual void Cancel();
       
    75 
       
    76 private:
       
    77 
       
    78     CAvkonStartupExtensionPlugIn( TAny* aConstructionParameters );
       
    79 
       
    80     /**
       
    81      * Second phase constructor.
       
    82      *
       
    83      */
       
    84     void ConstructL();
       
    85 
       
    86     /**
       
    87     * Read color palette identifier from Central Repository and take it to use.
       
    88     *
       
    89     * @return KErrNone if successful, one of the global error codes otherwise.
       
    90     */
       
    91     TInt SetColorPalette();
       
    92 
       
    93     /**
       
    94     * Enable apps key.
       
    95     *
       
    96     * @return KErrNone if successful, one of the global error codes otherwise.
       
    97     */
       
    98     TInt EnableAppsKey();
       
    99 
       
   100     /**
       
   101     * Set global notes allowed.
       
   102     *
       
   103     * @return KErrNone if successful, one of the global error codes otherwise.
       
   104     */
       
   105     TInt EnableGlobalNotes();
       
   106 
       
   107 private:
       
   108 
       
   109     RAknUiServer iAknUiServer; // AknUiServer session.
       
   110     
       
   111     TBool iActive; // Status of the ShutdownApps request.
       
   112 
       
   113     };
       
   114 
       
   115 #endif // C_AVKON_STARTUP_EXTENSION_PLUG_IN_H