datasourcemodules/bluetoothgpspositioningmodule/btgpspsy/inc/Connecting/BTGPSSocketHandler.h
changeset 36 b47902b73a93
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
35:a2efdd544abf 36:b47902b73a93
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef BTGPSSOCKETHANDLER_H
       
    22 #define BTGPSSOCKETHANDLER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h> 
       
    26 #include <bt_sock.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MBTGPSConnectManagerExt;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Connection handler that controls Socket server and socket operation.
       
    35 *
       
    36 */
       
    37 class CBTGPSSocketHandler: public CActive
       
    38     {
       
    39     public: 
       
    40 
       
    41         /**
       
    42         * Two-phase construction.
       
    43 		* @param aManagerExt Reference to connect manager.
       
    44         */
       
    45         static CBTGPSSocketHandler * NewL(
       
    46             MBTGPSConnectManagerExt& aManagerExt);
       
    47 
       
    48         /**
       
    49         * Destructor
       
    50         */
       
    51         virtual ~CBTGPSSocketHandler();
       
    52 
       
    53     
       
    54     private:
       
    55         /**
       
    56         * From CActive
       
    57         */
       
    58         void RunL();
       
    59 
       
    60         /**
       
    61         * From CActive
       
    62         */
       
    63         void DoCancel();
       
    64 
       
    65         /**
       
    66         * From CActive
       
    67         */
       
    68         TInt RunError(TInt aError);
       
    69 
       
    70     private:
       
    71 
       
    72         /**
       
    73         * Second phase of the construction
       
    74         */
       
    75         void ConstructL();
       
    76 
       
    77         /**
       
    78         * Private constructor
       
    79         */
       
    80         CBTGPSSocketHandler(
       
    81             MBTGPSConnectManagerExt& aManagerExt);
       
    82         
       
    83     private:
       
    84         //Manager Ext
       
    85         MBTGPSConnectManagerExt& iManagerExt;
       
    86 
       
    87         //Socket Server
       
    88         RSocketServ* iSocketServ;
       
    89 
       
    90         //Socket
       
    91         RSocket* iSocket;
       
    92 
       
    93     };
       
    94 #endif
       
    95 // End of File
       
    96