From 99e2ce4aae8dcfa02a4c772053396177648bdebf Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 29 May 2009 11:04:29 +0200 Subject: [PATCH] Add skeleton for new RFKILL interface --- include/Makefile.am | 2 +- include/rfkill.h | 33 +++++++++++++++++++++++++++++++++ src/Makefile.am | 4 ++-- src/connman.h | 2 ++ src/rfkill.c | 26 ++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 include/rfkill.h create mode 100644 src/rfkill.c diff --git a/include/Makefile.am b/include/Makefile.am index 345ff04..b887c7c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -7,7 +7,7 @@ include_HEADERS = types.h log.h plugin.h security.h notifier.h \ nodist_include_HEADERS = version.h noinst_HEADERS = driver.h element.h property.h ipv4.h rtnl.h dbus.h \ - resolver.h ipconfig.h service.h option.h + rfkill.h resolver.h ipconfig.h service.h option.h MAINTAINERCLEANFILES = Makefile.in diff --git a/include/rfkill.h b/include/rfkill.h new file mode 100644 index 0000000..fc8848c --- /dev/null +++ b/include/rfkill.h @@ -0,0 +1,33 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2009 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 + * + */ + +#ifndef __CONNMAN_RFKILL_H +#define __CONNMAN_RFKILL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __CONNMAN_RFKILL_H */ diff --git a/src/Makefile.am b/src/Makefile.am index 286a020..4414ec2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,8 +9,8 @@ sbin_PROGRAMS = connmand connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \ element.c device.c network.c connection.c \ - manager.c profile.c service.c agent.c \ - security.c resolver.c ipconfig.c notifier.c \ + manager.c profile.c service.c agent.c notifier.c \ + security.c resolver.c ipconfig.c rfkill.c \ storage.c ipv4.c detect.c rtnl.c inet.c dbus.c if UDEV diff --git a/src/connman.h b/src/connman.h index 7f85da2..98014b8 100644 --- a/src/connman.h +++ b/src/connman.h @@ -91,6 +91,8 @@ enum connman_ipv4_method __connman_ipv4_string2method(const char *method); #include +#include + #include #include diff --git a/src/rfkill.c b/src/rfkill.c new file mode 100644 index 0000000..97a6592 --- /dev/null +++ b/src/rfkill.c @@ -0,0 +1,26 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2009 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 "connman.h" -- 1.7.9.5