satengine/SatServer/Commands/SetUpMenuCmd/inc/CSetUpMenuHandler.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-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:  Handles the SetUpMenu proactive command.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSETUPMENUHANDLER_H
       
    21 #define CSETUPMENUHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <etelsat.h>
       
    25 #include    "CSatCommandHandler.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Handles the SetUpMenu proactive command.
       
    31 *
       
    32 *  @lib CSetUpMenuCmd.dll
       
    33 *  @since Series 60 3.0
       
    34 */
       
    35 class CSetUpMenuHandler : public CSatCommandHandler
       
    36     {
       
    37     public:  // Constructors and destructor
       
    38 
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         * @param aUtils Utils inteface.
       
    42         */
       
    43         static CSetUpMenuHandler* NewL( MSatUtils* aUtils );
       
    44 
       
    45         /**
       
    46         * Destructor.
       
    47         */
       
    48         virtual ~CSetUpMenuHandler();
       
    49 
       
    50     public: // Functions from base classes
       
    51 
       
    52         /**
       
    53         * From MSatCommand.
       
    54         */
       
    55         void ClientResponse();
       
    56 
       
    57         /**
       
    58         * From CSatCommandHandler Overrides the default implementation.
       
    59         * @param aEvent An event that is occured.
       
    60         */
       
    61         void Event( TInt aEvent );
       
    62 
       
    63     protected: // Functions from base classes
       
    64 
       
    65         /**
       
    66         * From CActive Cancels the SAT request.
       
    67         */
       
    68         void DoCancel();
       
    69 
       
    70     private: // New functions
       
    71 
       
    72         /**
       
    73         * Adds icon to shell.
       
    74         * @param aAlphaId Alpha id.
       
    75         * @param aIconId Icon id.
       
    76         */
       
    77         void AddIconToShellL(
       
    78             const TDesC& aAlphaId,
       
    79             const RSat::TIconId& aIconId );
       
    80 
       
    81         /**
       
    82         * Removes icon from shell.
       
    83         */
       
    84         void RemoveIconFromShellL();
       
    85 
       
    86         /**
       
    87         * Sends setup menu data to client.
       
    88         */
       
    89         void SendSetUpMenuToClient();
       
    90 
       
    91         /**
       
    92         * Update setup menu data to client.
       
    93         */
       
    94         void UpdateSetUpMenuToClientL();
       
    95         
       
    96         /**
       
    97         * Sends empty setup menu data to client to indicate SIM services is NA.
       
    98         */        
       
    99         void SendEmptySetupMenuToClient();
       
   100 
       
   101      private:  // Functions from base classes
       
   102 
       
   103         /**
       
   104         * From CSatCommandHandler Requests the command notification.
       
   105         * @param aStatus Request status to active object notification
       
   106         */
       
   107         void IssueUSATRequest( TRequestStatus& aStatus );
       
   108 
       
   109         /**
       
   110         * From CSatCommandHandler Precheck before executing the command.
       
   111         * @return Boolean indicating is this command allowed to execute.
       
   112         */
       
   113         TBool CommandAllowed();
       
   114 
       
   115         /**
       
   116         * From CSatCommandHandler Need for ui session.
       
   117         * @return Boolean indicating does this command need UI session.
       
   118         */
       
   119         TBool NeedUiSession();
       
   120 
       
   121         /**
       
   122         * From CSatCommandHandler Handles the notification of SetUpMenu command.
       
   123         */
       
   124         void HandleCommand();
       
   125 
       
   126         /**
       
   127         * From CSatCommandHandler. Ui launch failed.
       
   128         */
       
   129         void UiLaunchFailed();
       
   130 
       
   131     private:
       
   132 
       
   133         /**
       
   134         * C++ default constructor.
       
   135         */
       
   136         CSetUpMenuHandler();
       
   137 
       
   138         /**
       
   139         * By default Symbian 2nd phase constructor is private.
       
   140         */
       
   141         void ConstructL();
       
   142 
       
   143     private:    // Data
       
   144 
       
   145         // Set up menu command data.
       
   146         RSat::TSetUpMenuV2 iSetUpMenuData;
       
   147 
       
   148         // Package for setupmenu command.
       
   149         RSat::TSetUpMenuV2Pckg iSetUpMenuPckg;
       
   150 
       
   151         // Set up menu arrived data. Needs to be different than
       
   152         // the one used in request( iSetUpMenuData ), because
       
   153         // SetUpMenu makes the new request before ui has handled
       
   154         // the command.
       
   155         RSat::TSetUpMenuV2 iArrivedSetUpMenuData;
       
   156 
       
   157         // Package of arrived set up menu data.
       
   158         RSat::TSetUpMenuV2Pckg iArrivedSetUpMenuPckg;
       
   159 
       
   160         // Indication that command has arrived from SIM.
       
   161         TBool iSetUpMenuArrived;
       
   162 
       
   163         // Name should be changed when SetUp menu is launched.
       
   164         TBool iSatAppNameUpdated;
       
   165         
       
   166         // Information about SAT service availability
       
   167         TBool iSatServiceAvailable;
       
   168         
       
   169         // Flag to signal that command has icon data
       
   170         // To be removed when icons are allowed in this command
       
   171         TBool iIconCommand;
       
   172 
       
   173     };
       
   174 
       
   175 #endif      // CSETUPMENUHANDLER_H
       
   176 
       
   177 // End of File