X-Git-Url: http://git.maemo.org/git/?p=libicd-wpa;a=blobdiff_plain;f=networks.h;fp=networks.h;h=c06c41e6a07ba235ecb6d2d0e2dfc5b0020c62bc;hp=0000000000000000000000000000000000000000;hb=40dfec5157a34bdef21fd068802e445131468fab;hpb=3a9cdc82c4162ac0884f71fa15c61fa49bcd0541 diff --git a/networks.h b/networks.h new file mode 100644 index 0000000..c06c41e --- /dev/null +++ b/networks.h @@ -0,0 +1,50 @@ +/** + @file networks.h + + Copyright (C) 2009 Javier S. Pedro + + @author Javier S. Pedro + + 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 _NETWORKS_H_ +#define _NETWORKS_H_ + +int networks_initialize(); +void networks_free(); + +// NULL, NULL, 0 if search ended +typedef void (*networks_search_found) + (int status, const char * id, + const char * ssid, const char * ap, int dB, gpointer user_data); + +void networks_search_start(networks_search_found found_cb, gpointer user_data); +void networks_search_stop(); + +typedef void (*networks_connect_result) + (int status, const char * error, gpointer user_data); +void networks_connect(const char * id, + networks_connect_result result_cb, gpointer user_data); +void networks_disconnect(const char * id); + +typedef void (*networks_status_result) + (int status, const char * data, int rssi, gpointer user_data); +void networks_status(networks_status_result result_cb, gpointer user_data); + +#endif