~ubuntu-branches/ubuntu/gutsy/wpasupplicant/gutsy

« back to all changes in this revision

Viewing changes to wpa_supplicant/wpa_gui/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2007-08-26 16:06:57 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20070826160657-mxk5ivjjh65ptxlr
Tags: upstream-0.6.0+0.5.8
ImportĀ upstreamĀ versionĀ 0.6.0+0.5.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifdef CONFIG_NATIVE_WINDOWS
2
 
#include <winsock.h>
3
 
#endif /* CONFIG_NATIVE_WINDOWS */
4
 
#include <qapplication.h>
5
 
#include "wpagui.h"
6
 
 
7
 
int main( int argc, char ** argv )
8
 
{
9
 
    QApplication a( argc, argv );
10
 
    WpaGui w;
11
 
    int ret;
12
 
 
13
 
#ifdef CONFIG_NATIVE_WINDOWS
14
 
    WSADATA wsaData;
15
 
    if (WSAStartup(MAKEWORD(2, 0), &wsaData)) {
16
 
        printf("Could not find a usable WinSock.dll\n");
17
 
        return -1;
18
 
    }
19
 
#endif /* CONFIG_NATIVE_WINDOWS */
20
 
 
21
 
    w.show();
22
 
    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
23
 
    ret = a.exec();
24
 
 
25
 
#ifdef CONFIG_NATIVE_WINDOWS
26
 
    WSACleanup();
27
 
#endif /* CONFIG_NATIVE_WINDOWS */
28
 
 
29
 
    return ret;
30
 
}