diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
commit | 60c44471bf25f9e84d8701afe1bbcbcc88e18c89 (patch) | |
tree | 538db23d436787038f980271529ae2be44235c1b /wpa_supplicant/wpa_gui/main.cpp | |
parent | ced3a3de988600636bda6479d27de8823307f171 (diff) | |
download | FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.zip FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.tar.gz |
Import wpa_supplicant & hostapd 0.6.9.
Diffstat (limited to 'wpa_supplicant/wpa_gui/main.cpp')
-rw-r--r-- | wpa_supplicant/wpa_gui/main.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui/main.cpp b/wpa_supplicant/wpa_gui/main.cpp new file mode 100644 index 0000000..a78473a --- /dev/null +++ b/wpa_supplicant/wpa_gui/main.cpp @@ -0,0 +1,30 @@ +#ifdef CONFIG_NATIVE_WINDOWS +#include <winsock.h> +#endif /* CONFIG_NATIVE_WINDOWS */ +#include <qapplication.h> +#include "wpagui.h" + +int main( int argc, char ** argv ) +{ + QApplication a( argc, argv ); + WpaGui w; + int ret; + +#ifdef CONFIG_NATIVE_WINDOWS + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { + printf("Could not find a usable WinSock.dll\n"); + return -1; + } +#endif /* CONFIG_NATIVE_WINDOWS */ + + w.show(); + a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); + ret = a.exec(); + +#ifdef CONFIG_NATIVE_WINDOWS + WSACleanup(); +#endif /* CONFIG_NATIVE_WINDOWS */ + + return ret; +} |