initial import
[libicd-wpa] / wlan.h
diff --git a/wlan.h b/wlan.h
new file mode 100644 (file)
index 0000000..b3a29f3
--- /dev/null
+++ b/wlan.h
@@ -0,0 +1,52 @@
+/**
+  @file wlan.h
+
+  Copyright (C) 2009 Javier S. Pedro
+
+  @author Javier S. Pedro <javispedro@javispedro.com>
+
+  This file is part of libicd-network-wpa.
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License as published by the
+  Free Software Foundation; either version 2 of the License, or (at your
+  option) any later version.
+
+  This program is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#ifndef _WLAN_H_
+#define _WLAN_H_
+
+typedef void (*wlan_found_ap)(int status,
+       const char * ssid, const char * ap, int dB);
+int wlan_scan(const char * ssid, wlan_found_ap found_ap_cb);
+
+gboolean wlan_is_scanning();
+void wlan_notify_ap(const char *ssid, const char *bssid,
+        int rssi, unsigned int channel, unsigned int cap_bits);
+void wlan_notify_end_of_search();
+
+
+typedef void (*wlan_connected)(int status, const char *error);
+void wlan_connect(const char *ssid, wlan_connected connected_cb);
+
+void wlan_disconnect();
+
+typedef void (*wlan_status_reply)(int status,
+        const char * essid, int essid_len,
+        const char * bssid, int bssid_len,
+        int qual, int channel, unsigned long security, unsigned long capability, 
+        const char * data);
+void wlan_get_status(wlan_status_reply reply_cb);
+        
+
+#endif