satengine/SatServer/Commands/DisplayTextCmd/inc/CDisplayTextHandler.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  DisplayText command handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CDISPLAYTEXTHANDLER_H
       
    21 #define CDISPLAYTEXTHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <etelsat.h>
       
    25 #include "CSatCommandHandler.h"
       
    26 #include "SatSTypes.h"
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 class MSatUtils;
       
    30 class CClearScreenHandler;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Command handler for DisplayText command.
       
    36 *
       
    37 *  @lib DisplayTextCmd.lib
       
    38 *  @since Series 60 3.0
       
    39 */
       
    40 class CDisplayTextHandler : public CSatCommandHandler
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43 
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         * @param aUtils SAT Utils interface
       
    47         */
       
    48         static CDisplayTextHandler* NewL( MSatUtils* aUtils );
       
    49 
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CDisplayTextHandler();
       
    55 
       
    56     public: // Functions from base classes
       
    57 
       
    58         /**
       
    59         * From MSatCommand.
       
    60         */
       
    61         void ClientResponse();
       
    62 
       
    63     protected:  // Functions from base classes
       
    64 
       
    65         /**
       
    66         * From CActive Cancels the usat request.
       
    67         */
       
    68         void DoCancel();
       
    69 
       
    70         /**
       
    71         * From CSatCommandHandler Requests the command notification.
       
    72         * @param aStatus Request status
       
    73         */
       
    74         void IssueUSATRequest( TRequestStatus& aStatus );
       
    75 
       
    76         /**
       
    77         * From CSatCommandHandler Precheck before executing the command.
       
    78         */
       
    79         TBool CommandAllowed();
       
    80 
       
    81         /**
       
    82         * From CSatCommandHandler Need for ui session.
       
    83         */
       
    84         TBool NeedUiSession();
       
    85 
       
    86         /**
       
    87         * From CSatCommandHandler Called when USAT API notifies that command.
       
    88         */
       
    89         void HandleCommand();
       
    90 
       
    91         /**
       
    92         * From CSatCommandHandler. Indicates the failure of launching ui client
       
    93         */
       
    94         void UiLaunchFailed();
       
    95 
       
    96     private:
       
    97 
       
    98         /**
       
    99         * C++ default constructor.
       
   100         */
       
   101         CDisplayTextHandler();
       
   102 
       
   103         /**
       
   104         * By default Symbian 2nd phase constructor is private.
       
   105         */
       
   106         void ConstructL();
       
   107 
       
   108         /**
       
   109         * Return given duration in seconds.
       
   110         * @param aDuration Duration data
       
   111         * @return Return given duration in seconds.
       
   112         */
       
   113         TTimeIntervalSeconds DurationInSeconds(
       
   114             const RSat::TDuration& aDuration ) const;
       
   115 
       
   116     private:    // Data
       
   117 
       
   118         // DisplayText command data.
       
   119         RSat::TDisplayTextV2 iDisplayTextData;
       
   120 
       
   121         // DisplayText command package.
       
   122         RSat::TDisplayTextV2Pckg iDisplayTextPckg;
       
   123 
       
   124         // Response from client.
       
   125         RSat::TDisplayTextRspV1 iDisplayTextRsp;
       
   126 
       
   127         // Response package.
       
   128         RSat::TDisplayTextRspV1Pckg iDisplayTextRspPckg;
       
   129 
       
   130         // DisplayText IPC data.
       
   131         TSatDisplayTextV1 iDisplayTextSendData;
       
   132 
       
   133         // DisplayText IPC package.
       
   134         TSatDisplayTextV1Pckg iDisplayTextSendPckg;
       
   135 
       
   136         // ClearScreen handler.
       
   137         CClearScreenHandler* iClearScreenHandler;
       
   138 
       
   139         // Own information of Immediate response
       
   140         TBool iImmediateResponse;
       
   141 
       
   142         // Next immediate pending
       
   143         TBool iImmediatePending;
       
   144 
       
   145     };
       
   146 
       
   147 #endif      // CDISPLAYTEXTHANDLER_H
       
   148 
       
   149 // End of File