wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepaliveesock.h
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2 * Copyright (c) 2010 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 * Esock library (RConnection) interface implementation.
       
    16 */
       
    17 
       
    18 #ifndef WSFKEEPALIVEESOCK_H
       
    19 #define WSFKEEPALIVEESOCK_H
       
    20 
       
    21 // System includes
       
    22  
       
    23 #include <es_sock.h>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 
       
    29 // External data types
       
    30 
       
    31 // Global function prototypes
       
    32  
       
    33 // Constants
       
    34 
       
    35 // Class declaration
       
    36 
       
    37 /**
       
    38  *  Esock library (RConnection) interface implementation.
       
    39  * 
       
    40  *  This class implements RConnection opening and closing using the Esock
       
    41  *  library.
       
    42  */
       
    43 class CWsfKeepaliveEsock : public CActive
       
    44 {
       
    45     // Friend classes:
       
    46 
       
    47 public:
       
    48     
       
    49     // Data types
       
    50 
       
    51     /** Constructors */
       
    52     
       
    53     /**
       
    54      * Two-phased constructor.
       
    55      * 
       
    56      * @return New object allocated from heap
       
    57      */
       
    58     static CWsfKeepaliveEsock* NewL();
       
    59     
       
    60     /**> Destructor */
       
    61     virtual ~CWsfKeepaliveEsock();
       
    62 
       
    63 public:
       
    64     
       
    65     /**
       
    66      * Starts connection creation.
       
    67      * 
       
    68      * @param aIapId ID of the IAP to connect
       
    69      */
       
    70     void ConnectL( TUint aIapId );
       
    71     
       
    72     /**
       
    73      * Stops connection.
       
    74      */
       
    75     void Disconnect();
       
    76 
       
    77 private:
       
    78     
       
    79     CWsfKeepaliveEsock();
       
    80 
       
    81     void ConstructL();
       
    82     
       
    83     void RunL();
       
    84     
       
    85     void DoCancel();
       
    86         
       
    87 private: // Data
       
    88     
       
    89     /**
       
    90      * Handle to Socket Server
       
    91      */
       
    92     RSocketServ iSocketServer;
       
    93 
       
    94     /**
       
    95      * Handle to RConnection object
       
    96      */
       
    97     RConnection iConnection;
       
    98 };
       
    99 
       
   100 #endif // WSFKEEPALIVEESOCK_H