satengine/SatServer/SatInternalClient/inc/CSatCGetInputHandler.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-2008 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:  This is the handler for the SIM Application Toolkit Get Input
       
    15 *                proactive command.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CSATCGETINPUTHANDLER_H
       
    22 #define CSATCGETINPUTHANDLER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <etelsat.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 class RSatUiSession;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  *  This is the Get Input command active object handler.
       
    36  *  The class receives command data from ETel, processes it and
       
    37  *  passes it on to the user. Following that, the response is encoded and
       
    38  *  sent back to ETel.
       
    39  *
       
    40  *  @lib SatClient.lib
       
    41  *  @since Series 60 2.6
       
    42  */
       
    43 class CSatCGetInputHandler : public CActive
       
    44     {
       
    45     public: // Constructors and destructor
       
    46 
       
    47         /**
       
    48          * Two-phased constructor.
       
    49          * @param aSat A pointer to a session (does not take ownership).
       
    50          */
       
    51         static CSatCGetInputHandler* NewL( RSatUiSession* aSat );
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         virtual ~CSatCGetInputHandler();
       
    57 
       
    58     public: // New functions
       
    59 
       
    60         /**
       
    61          * Starts listening for the Sat command.
       
    62          */
       
    63         void Start();
       
    64 
       
    65     private:
       
    66 
       
    67         /**
       
    68          * Converts USAT character set to SAT character set type.
       
    69          * @param aCharacterSet USAT character set
       
    70          * @return SAT character set.
       
    71          */
       
    72         TSatCharacterSet ConvertCharacterSet(
       
    73             const RSat::TGetInputRspFormat& aCharacterSet ) const;
       
    74 
       
    75     protected:  // Functions from base classes
       
    76 
       
    77         /**
       
    78          * From CActive
       
    79          * 
       
    80          * Handles the request completion.
       
    81          */
       
    82         void RunL();
       
    83 
       
    84         /**
       
    85          * From CActive
       
    86          *
       
    87          * Implements the cancel protocol.
       
    88          */
       
    89         void DoCancel();
       
    90 
       
    91     private: // Constructors
       
    92 
       
    93         /**
       
    94          * C++ default constructor.
       
    95          * @param aPriority The priority of this active object.
       
    96          * @param aSat A pointer to a session (does not take ownership).
       
    97          */
       
    98         CSatCGetInputHandler(
       
    99             TInt aPriority,
       
   100             RSatUiSession* aSat );
       
   101 
       
   102     private: // New functions
       
   103 
       
   104         /**
       
   105          * Examine the client response.
       
   106          * @param aResponse Client response data
       
   107          * @param aInputText User input
       
   108          * @param aRequestedIconDisplayed Informs if icon is not used
       
   109          */
       
   110         void ExamineClientResponse(
       
   111             TSatUiResponse aResponse,
       
   112             const TDes& aInputText,
       
   113             TBool aRequestedIconDisplayed );
       
   114 
       
   115     private: // Data
       
   116 
       
   117         /**
       
   118          * Reference to the Sat API
       
   119          */
       
   120         RSatUiSession* iSession;
       
   121 
       
   122         /**
       
   123          * The data structure for the command data
       
   124          */
       
   125         RSat::TGetInputV1 iGetInputData;
       
   126 
       
   127         /**
       
   128          * The data package for IPC
       
   129          */
       
   130         RSat::TGetInputV1Pckg iGetInputPckg;
       
   131 
       
   132         /**
       
   133          * The data structure for the response data
       
   134          */
       
   135         RSat::TGetInputRspV1 iGetInputRsp;
       
   136 
       
   137         /**
       
   138          * The response package for IPC
       
   139          */
       
   140         RSat::TGetInputRspV1Pckg iGetInputRspPckg;
       
   141 
       
   142     };
       
   143 
       
   144 #endif // CSATCGETINPUTHANDLER_H
       
   145 
       
   146 // End of File