wim/WimServer/inc/WimBTSapObserver.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Observes the state of Bluetooth Sap. When the state is
       
    15 *               changed into connected, connection to smart card is closed and
       
    16 *               when the state is changed into not connected, initialize
       
    17 *               connection to smart card back.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef CWIMBTSAPOBSERVER_H
       
    23 #define CWIMBTSAPOBSERVER_H
       
    24 
       
    25 
       
    26 //  INCLUDES
       
    27 #include <e32base.h>
       
    28 #include <e32property.h> // RProperty
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CWimServer;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Publish and subscribe Observer class
       
    37 *  This class listens P/S events
       
    38 *
       
    39 *  @lib SwimReader.lib
       
    40 *  @since Series60 1.2
       
    41 */
       
    42 class CWimBTSapObserver : public CActive
       
    43     {
       
    44     public: // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */ 
       
    49         static CWimBTSapObserver* NewL();
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CWimBTSapObserver();
       
    55 
       
    56     public: // New functions
       
    57         
       
    58         /**
       
    59         * Starts listener
       
    60         * @return void 
       
    61         */
       
    62         void Start();
       
    63 
       
    64     private:
       
    65 
       
    66         /**
       
    67         * C++ default constructor.
       
    68         */ 
       
    69         CWimBTSapObserver();
       
    70 
       
    71         /**
       
    72         * By default Symbian 2nd phase constructor is private.
       
    73         */
       
    74         void ConstructL();
       
    75 
       
    76         /**
       
    77         * This function starts listening card state from System agent
       
    78         * @return void
       
    79         */
       
    80         void StartListening();
       
    81         /**
       
    82         * From CActive. Handle asyncronous event response
       
    83         * @return void
       
    84         */
       
    85         void RunL();
       
    86 
       
    87         /**
       
    88         * From CActive. Handle Cancel call
       
    89         * @return void
       
    90         */
       
    91         void DoCancel();
       
    92 
       
    93     private:    // Data
       
    94         // Bluetooth Sap status property
       
    95         RProperty       iProperty;
       
    96         // Pointer to WimServer.
       
    97         CWimServer*     iWimSvr;
       
    98     };
       
    99 
       
   100 #endif      // CWIMBTSAPOBSERVER_H
       
   101             
       
   102 // End of File