wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsconmonwrapper.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2 * Copyright (c) 2009-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 * Wrapper for Symbian Connection Monitor library.
       
    16 */
       
    17 
       
    18 // System includes
       
    19 
       
    20 #include <QSharedPointer>
       
    21 #include <QScopedPointer>
       
    22 
       
    23 // User includes
       
    24 
       
    25 #include "wlanqtutilsconmonwrapperdisconnect_symbian.h"
       
    26 #include "wlanqtutilsconmonwrapperinfo_symbian.h"
       
    27 #include "wlanqtutilsconmonwrapper.h"
       
    28 
       
    29 /*!
       
    30     \class WlanQtUtilsConMonWrapper
       
    31     \brief Wrapper for Symbian Connection Monitor library.
       
    32 
       
    33     Provides functionality to retrieve connection information,
       
    34     and to disconnect connections.
       
    35 */
       
    36 
       
    37 // External function prototypes
       
    38 
       
    39 // Local constants
       
    40 
       
    41 // ======== LOCAL FUNCTIONS ========
       
    42 
       
    43 // ======== MEMBER FUNCTIONS ========
       
    44 
       
    45 /*!
       
    46     Constructor.
       
    47     
       
    48     @param [in] parent Parent object.
       
    49 */
       
    50 
       
    51 WlanQtUtilsConMonWrapper::WlanQtUtilsConMonWrapper(QObject *parent) :
       
    52     QObject(parent),
       
    53     d_ptrInfo(new WlanQtUtilsConMonWrapperInfo(this)),
       
    54     d_ptrDisconnect(new WlanQtUtilsConMonWrapperDisconnect(this))
       
    55 {
       
    56 }
       
    57 
       
    58 /*!
       
    59     Destructor.
       
    60 */
       
    61 
       
    62 WlanQtUtilsConMonWrapper::~WlanQtUtilsConMonWrapper()
       
    63 {
       
    64 }
       
    65 
       
    66 /*!
       
    67    Return active connection information.
       
    68 
       
    69    @return Information of active connection, 0 if not found.
       
    70 */ 
       
    71 
       
    72 WlanQtUtilsConnection *WlanQtUtilsConMonWrapper::activeConnection() const
       
    73 {
       
    74     return d_ptrInfo->ActiveConnection();
       
    75 }
       
    76 
       
    77 /*!
       
    78    Returns information of a connection with the given connection ID.
       
    79 
       
    80    @param [in] connectionId Connection ID.
       
    81 
       
    82    @return Information of the given connection, 0 if not found.
       
    83 */ 
       
    84 
       
    85 WlanQtUtilsConnection* WlanQtUtilsConMonWrapper::connectionInfo(
       
    86     uint connectionId) const
       
    87 {
       
    88     return d_ptrInfo->ConnectionInfo(connectionId);
       
    89 }
       
    90 
       
    91 /*!
       
    92    Stops given connection regardless of how many applications are using it.
       
    93 
       
    94    @param [in] iapId IAP ID to disconnect.
       
    95 */ 
       
    96 
       
    97 void WlanQtUtilsConMonWrapper::disconnectIap(int iapId)
       
    98 {
       
    99    d_ptrDisconnect->DisconnectConnection(iapId);
       
   100 }