satengine/SatServer/SatInternalClient/inc/CSatCSelectItemHandler.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
       
    15 *                Select Item proactive command.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CSATCSELECTITEMHANDLER_H
       
    22 #define CSATCSELECTITEMHANDLER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <etelsat.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class RSatUiSession;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  This is the Select Item command active object handler.
       
    35  *  The class processes data from ETel SAT API and passes it on to
       
    36  *  the client. The selection made by the end-user is passed back to ETel.
       
    37  *
       
    38  *  @lib SatClient.lib
       
    39  *  @since Series 60 2.6
       
    40  */
       
    41 class CSatCSelectItemHandler : public CActive
       
    42     {
       
    43     public: // Constructors and destructor
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          * @param aSat A pointer to a session (does not take ownership).
       
    48          */
       
    49         static CSatCSelectItemHandler* NewL( RSatUiSession* aSat );
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         virtual ~CSatCSelectItemHandler();
       
    55 
       
    56     public: // New functions
       
    57 
       
    58         /**
       
    59          * Starts listening for the Sat command.
       
    60          */
       
    61         void Start();
       
    62 
       
    63     protected:  // Functions from base classes
       
    64 
       
    65         /**
       
    66          * From CActive
       
    67          *
       
    68          * Handles the request completion.
       
    69          */
       
    70         void RunL();
       
    71 
       
    72         /**
       
    73          * From CActive
       
    74          *
       
    75          * Implements the cancel protocol.
       
    76          */
       
    77         void DoCancel();
       
    78 
       
    79     private: // Constructors
       
    80 
       
    81         /**
       
    82          * C++ default constructor.
       
    83          * @param aPriority The priority of this active object.
       
    84          * @param aSat A pointer to a session (does not take ownership).
       
    85          */
       
    86         CSatCSelectItemHandler(
       
    87             TInt aPriority,
       
    88             RSatUiSession* aSat );
       
    89 
       
    90     private: // New functions
       
    91 
       
    92         /**
       
    93          * Examine the client response.
       
    94          * @param aResponse Client response data
       
    95          * @param aSelection User selection
       
    96          * @param aRequestedIconDisplayed Informs if icon is not used
       
    97          * @param aDefaultItemIdFound informs if default item is found
       
    98          * from item list
       
    99          */
       
   100         void ExamineClientResponse(
       
   101             TSatUiResponse aResponse,
       
   102             TUint8 aSelection,
       
   103             TBool aRequestedIconDisplayed,
       
   104             TBool aDefaultItemIdFound );
       
   105 
       
   106     private: // Data
       
   107 
       
   108         /**
       
   109          * Reference to the Sat API
       
   110          */        
       
   111         RSatUiSession* iSession;
       
   112 
       
   113         /**
       
   114          * The data structure for the command data
       
   115          */        
       
   116         RSat::TSelectItemV2 iSelectItemData;
       
   117 
       
   118         /**
       
   119          * The data package for IPC
       
   120          */        
       
   121         RSat::TSelectItemV2Pckg iSelectItemPckg;
       
   122 
       
   123         /**
       
   124          * The data structure for the response data
       
   125          */        
       
   126         RSat::TSelectItemRspV1 iSelectItemRsp;
       
   127  
       
   128         /**
       
   129          * The response package for IPC
       
   130          */        
       
   131         RSat::TSelectItemRspV1Pckg iSelectItemRspPckg;
       
   132     };
       
   133 
       
   134 #endif // CSATCSELECTITEMHANDLER_H
       
   135 
       
   136 // End of File