wlanutilities/wlansniffer/wlansnifferapplication/src/main.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 * WLAN Sniffer application main function. 
       
    16 */
       
    17 
       
    18 // System includes
       
    19 
       
    20 #ifdef WLANSNIFFER_SERVICETRACES    
       
    21 #include <xqservicelog.h>
       
    22 #endif
       
    23 #include <qsysteminfo.h>
       
    24 
       
    25 // User includes
       
    26 
       
    27 #include "wlansniffer.h"
       
    28 
       
    29 // External function prototypes
       
    30 
       
    31 // Local constants
       
    32 
       
    33 int main(int argc, char *argv[])
       
    34 {
       
    35     // Check WLAN dynamic configuration & exit if WLAN is not enabled
       
    36     QtMobility::QSystemInfo sysinfo;
       
    37     if (!sysinfo.hasFeatureSupported(QtMobility::QSystemInfo::WlanFeature)) {
       
    38         return -1;
       
    39     }
       
    40 
       
    41 #ifdef WLANSNIFFER_SERVICETRACES    
       
    42     qInstallMsgHandler(XQSERVICEMESSAGEHANDLER);
       
    43 #endif
       
    44     
       
    45     WlanSniffer app(argc, argv);
       
    46 
       
    47     return app.exec();
       
    48 }