satengine/SatServer/SatInternalClient/inc/CSatCPlayToneHandler.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 *                Play Tone proactive command.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CSATCPLAYTONEHANDLER_H
       
    21 #define CSATCPLAYTONEHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <etelsat.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // Number of microseconds in a minute.
       
    30 const TInt64 KSatCMicroSecondsInMinute = 60*1000000;
       
    31 
       
    32 // Number of microseconds in a seconds.
       
    33 const TInt64 KSatCMicroSecondsInSecond = 1000000;
       
    34 
       
    35 // Number of microseconds in one tenth of a seconds.
       
    36 const TInt64 KSatCMicroSecondsInOneTenthSecond = 100000;
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 
       
    40 class RSatUiSession;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45  *  This is the Play Tone command active object handler.
       
    46  *
       
    47  *  @lib SatClient.lib
       
    48  *  @since Series 60 2.6
       
    49  */
       
    50 class CSatCPlayToneHandler : public CActive
       
    51     {
       
    52     public: // Constructors and destructor
       
    53 
       
    54         /**
       
    55          * Two-phased constructor.
       
    56          * @param aSat A pointer to a session (does not take ownership).
       
    57          */
       
    58         static CSatCPlayToneHandler* NewL( RSatUiSession* aSat );
       
    59 
       
    60         /**
       
    61          * Destructor.
       
    62          */
       
    63         virtual ~CSatCPlayToneHandler();
       
    64 
       
    65     public: // New functions
       
    66 
       
    67         /**
       
    68          * Starts listening for the Sat command.
       
    69          */
       
    70         void Start();
       
    71 
       
    72     protected: // Functions from base classes
       
    73 
       
    74         /**
       
    75          * From CActive
       
    76          *
       
    77          * Handles the request completion.
       
    78          */
       
    79         void RunL();
       
    80 
       
    81         /**
       
    82          * From CActive
       
    83          *
       
    84          * Implements the cancel protocol.
       
    85          */
       
    86         void DoCancel();
       
    87 
       
    88     private: // Constructors
       
    89 
       
    90         /**
       
    91          * C++ default constructor.
       
    92          * @param aPriority The priority of this active object.
       
    93          * @param aSat A pointer to a session (does not take ownership).
       
    94          */
       
    95 
       
    96         CSatCPlayToneHandler(
       
    97             TInt aPriority,
       
    98             RSatUiSession* aSat );
       
    99 
       
   100     private: // New functions
       
   101 
       
   102         /**
       
   103          * Examine the client response.
       
   104          * @param aResponse Client response data
       
   105          * @param aRequestedIconDisplayed Informs if icon is not used
       
   106          */
       
   107         void ExamineClientResponse(
       
   108             TSatUiResponse aResponse,
       
   109             TBool aRequestedIconDisplayed );
       
   110 
       
   111     private: // Data
       
   112 
       
   113         /**
       
   114          * Reference to the Sat API
       
   115          */
       
   116         RSatUiSession* iSession;
       
   117 
       
   118         /**
       
   119          * The data structure for the command data
       
   120          */        
       
   121         RSat::TPlayToneV2 iPlayToneData;
       
   122 
       
   123         /**
       
   124          * The data package for IPC
       
   125          */        
       
   126         RSat::TPlayToneV2Pckg iPlayTonePckg;
       
   127 
       
   128         /**
       
   129          * The data structure for the response data
       
   130          */        
       
   131         RSat::TPlayToneRspV1 iPlayToneRsp;
       
   132 
       
   133         /**
       
   134          * The response package for IPC
       
   135          */        
       
   136         RSat::TPlayToneRspV1Pckg iPlayToneRspPckg;
       
   137 
       
   138     };
       
   139 
       
   140 #endif // CSATCPLAYTONEHANDLER_H
       
   141 
       
   142 // End of File