wlanutilities/wlansniffer/wlansnifferkeepalive/src/wsfkeepaliveconnmondisc.cpp
branchRCL_3
changeset 54 63be7eb3fc78
equal deleted inserted replaced
52:b852595f5cbe 54:63be7eb3fc78
       
     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  * Connection Monitor disconnect interface implementation.
       
    16  */
       
    17 
       
    18 // System include files
       
    19 
       
    20 #include <rconnmon.h>
       
    21 
       
    22 // User include files
       
    23 
       
    24 #include "wsfkeepaliveconnmondisc.h"
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "wsfkeepaliveconnmondiscTraces.h"
       
    28 #endif
       
    29 
       
    30 // External function prototypes
       
    31 
       
    32 // Local constants
       
    33 
       
    34 // ======== LOCAL FUNCTIONS ========
       
    35 
       
    36 // ======== MEMBER FUNCTIONS ========
       
    37 
       
    38 CWsfKeepaliveConnMonDisc* CWsfKeepaliveConnMonDisc::NewL()
       
    39     {
       
    40     OstTraceFunctionEntry0( CWSFKEEPALIVECONNMONDISC_NEWL_ENTRY );
       
    41     
       
    42     CWsfKeepaliveConnMonDisc* me = new ( ELeave ) CWsfKeepaliveConnMonDisc();
       
    43     CleanupStack::PushL( me );
       
    44     me->ConstructL();
       
    45     CleanupStack::Pop( me );
       
    46     
       
    47     OstTraceFunctionExit0( CWSFKEEPALIVECONNMONDISC_NEWL_EXIT );
       
    48     return me;
       
    49     }
       
    50 
       
    51 CWsfKeepaliveConnMonDisc::~CWsfKeepaliveConnMonDisc()
       
    52     {
       
    53     OstTraceFunctionEntry0(
       
    54         DUP1_CWSFKEEPALIVECONNMONDISC_CWSFKEEPALIVECONNMONDISC_ENTRY );
       
    55     
       
    56     iMonitor.Close();
       
    57     
       
    58     OstTraceFunctionExit0(
       
    59         DUP1_CWSFKEEPALIVECONNMONDISC_CWSFKEEPALIVECONNMONDISC_EXIT );
       
    60     }
       
    61 
       
    62 void CWsfKeepaliveConnMonDisc::Disconnect( TUint aConnectionId )
       
    63     {
       
    64     OstTraceFunctionEntry0( CWSFKEEPALIVECONNMONDISC_DISCONNECT_ENTRY );
       
    65     
       
    66     TInt KErr = iMonitor.SetBoolAttribute(
       
    67         aConnectionId,
       
    68         0,
       
    69         KConnectionStop,
       
    70         ETrue );
       
    71     
       
    72     OstTraceFunctionExit0( CWSFKEEPALIVECONNMONDISC_DISCONNECT_EXIT );
       
    73     }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // Default constructor
       
    77 // ---------------------------------------------------------------------------
       
    78 //
       
    79 CWsfKeepaliveConnMonDisc::CWsfKeepaliveConnMonDisc()
       
    80     {
       
    81     OstTraceFunctionEntry0(
       
    82         CWSFKEEPALIVECONNMONDISC_CWSFKEEPALIVECONNMONDISC_ENTRY );
       
    83     OstTraceFunctionExit0(
       
    84         CWSFKEEPALIVECONNMONDISC_CWSFKEEPALIVECONNMONDISC_EXIT );
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // Leaving constructor
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 void CWsfKeepaliveConnMonDisc::ConstructL()
       
    92     {
       
    93     OstTraceFunctionEntry0( CWSFKEEPALIVECONNMONDISC_CONSTRUCTL_ENTRY );
       
    94     
       
    95     iMonitor.ConnectL();
       
    96     
       
    97     OstTraceFunctionExit0( CWSFKEEPALIVECONNMONDISC_CONSTRUCTL_EXIT );
       
    98     }