satengine/SatServer/SatInternalClient/inc/CSatCEventHandler.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 various events related to those SIM
       
    15 *                Application Toolkit proactive commands that simply indicate
       
    16 *                that an action occured at the server.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CSATCEVENTHANDLER_H
       
    23 #define CSATCEVENTHANDLER_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <etelsat.h>
       
    28 #include "SatSTypes.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class RSatUiSession;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  *  This class notifies the client about various server-side events.
       
    38  *  The events in question are start/end of call, start/end of SIM refresh,
       
    39  *  SS send and SIM session end.
       
    40  *
       
    41  *  @lib SatClient.lib
       
    42  *  @since Series 60 2.6
       
    43  */
       
    44 class CSatCEventHandler : public CActive
       
    45     {
       
    46     public: // Constructors and destructor
       
    47 
       
    48         /**
       
    49          * Two-phased constructor.
       
    50          * @param aSat A pointer to a session (does not take ownership).
       
    51          */
       
    52         static CSatCEventHandler* NewL( RSatUiSession* aSat );
       
    53 
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         virtual ~CSatCEventHandler();
       
    58 
       
    59     public: // New functions
       
    60 
       
    61         /**
       
    62          * Starts listening for the Sat command.
       
    63          */
       
    64         void Start();
       
    65 
       
    66     protected:  // Functions from base classes
       
    67 
       
    68         /**
       
    69          * From CActive
       
    70          *
       
    71          * Handles the request completion.
       
    72          */
       
    73         void RunL();
       
    74 
       
    75         /**
       
    76          * From CActive
       
    77          * 
       
    78          * Implements the cancel protocol.
       
    79          */
       
    80         void DoCancel();
       
    81 
       
    82     private: // Constructors
       
    83 
       
    84         /**
       
    85          * C++ default constructor.
       
    86          * @param aPriority The priority of this active object.
       
    87          * @param aSat A pointer to a session (does not take ownership).
       
    88          */
       
    89         CSatCEventHandler(
       
    90             TInt aPriority,
       
    91             RSatUiSession* aSat );
       
    92 
       
    93     private: // Data
       
    94 
       
    95         /**
       
    96          * Reference to the Sat API
       
    97          */
       
    98         RSatUiSession* iSession;
       
    99 
       
   100         /**
       
   101          * The data structure for the command data
       
   102          */        
       
   103         TSatEventV1 iEventData;
       
   104 
       
   105         /**
       
   106          * The data package for IPC
       
   107          */                
       
   108         TSatEventV1Pckg iEventPckg;
       
   109     };
       
   110 
       
   111 #endif // CSATCEVENTHANDLER_H
       
   112 
       
   113 // End of File