From 2f1e2f29dcab50d2111009efc505c496aa0ab494 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 28 Jun 2008 11:09:17 +0200 Subject: [PATCH] Add skeleton for WiFi interface plugin --- plugins/Makefile.am | 5 ++++- plugins/wifi.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 plugins/wifi.c diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 7f01896..4084410 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,7 +1,8 @@ plugindir = $(libdir)/connman/plugins -plugin_LTLIBRARIES = hal.la ethernet.la bluetooth.la dhclient.la ipv4.la +plugin_LTLIBRARIES = hal.la ethernet.la wifi.la bluetooth.la \ + dhclient.la ipv4.la noinst_LTLIBRARIES = 80203.la 80211.la resolvconf.la @@ -11,6 +12,8 @@ hal_la_CFLAGS = @GLIB_CFLAGS@ @HAL_CFLAGS@ ethernet_la_SOURCES = ethernet.c +wifi_la_SOURCES = wifi.c + bluetooth_la_SOURCES = bluetooth.c dhclient_la_SOURCES = dhclient.c diff --git a/plugins/wifi.c b/plugins/wifi.c new file mode 100644 index 0000000..b31fa9f --- /dev/null +++ b/plugins/wifi.c @@ -0,0 +1,61 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2008 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +static int wifi_probe(struct connman_element *element) +{ + DBG("element %p name %s", element, element->name); + + return 0; +} + +static void wifi_remove(struct connman_element *element) +{ + DBG("element %p name %s", element, element->name); +} + +static struct connman_driver wifi_driver = { + .name = "wifi", + .type = CONNMAN_ELEMENT_TYPE_DEVICE, + .subtype = CONNMAN_ELEMENT_SUBTYPE_WIFI, + .probe = wifi_probe, + .remove = wifi_remove, +}; + +static int wifi_init(void) +{ + return connman_driver_register(&wifi_driver); +} + +static void wifi_exit(void) +{ + connman_driver_unregister(&wifi_driver); +} + +CONNMAN_PLUGIN_DEFINE("WiFi", "WiFi interface plugin", VERSION, + wifi_init, wifi_exit) -- 2.7.4