new fremantle branch
[libicd-wpa] / wlan.h
1 /**
2   @file wlan.h
3
4   Copyright (C) 2009 Javier S. Pedro
5
6   @author Javier S. Pedro <javispedro@javispedro.com>
7
8   This file is part of libicd-network-wpa.
9
10   This program is free software; you can redistribute it and/or modify it
11   under the terms of the GNU General Public License as published by the
12   Free Software Foundation; either version 2 of the License, or (at your
13   option) any later version.
14
15   This program is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18   General Public License for more details.
19
20   You should have received a copy of the GNU General Public License along
21   with this program; if not, write to the Free Software Foundation, Inc.,
22   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 */
25
26 #ifndef _WLAN_H_
27 #define _WLAN_H_
28
29 typedef void (*wlan_found_ap)(int status,
30         const char * ssid, const char * ap, int dB);
31 int wlan_scan(const char * ssid, wlan_found_ap found_ap_cb);
32
33 gboolean wlan_is_scanning();
34 void wlan_notify_ap(const char *ssid, const char *bssid,
35          int rssi, unsigned int channel, unsigned int cap_bits);
36 void wlan_notify_end_of_search();
37
38
39 typedef void (*wlan_connected)(int status, const char *error);
40 void wlan_connect(const char *ssid, wlan_connected connected_cb);
41
42 void wlan_disconnect();
43
44 typedef void (*wlan_status_reply)(int status,
45          const char * essid, int essid_len,
46          const char * bssid, int bssid_len,
47          int qual, int channel, unsigned long security, unsigned long capability, 
48          const char * data);
49 void wlan_get_status(wlan_status_reply reply_cb);
50          
51
52 #endif