From b46f06a9ad90c5c08d3159389890d805061f1882 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 27 Feb 2015 16:01:06 +0200 Subject: [PATCH] agent: Initial agent support Init, setup and exit functions. --- Makefile.am | 1 + src/agent.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/agent.h | 27 +++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 src/agent.c create mode 100644 src/agent.h diff --git a/Makefile.am b/Makefile.am index f4324f27..39ce5d75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,6 +54,7 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h linux/kdbus.h \ src/eapol.h src/eapol.c \ src/scan.h src/scan.c \ src/util.h src/util.c \ + src/agent.h src/agent.c \ iwd.h src_iwd_LDADD = ell/libell-internal.la diff --git a/src/agent.c b/src/agent.c new file mode 100644 index 00000000..2bfcef5f --- /dev/null +++ b/src/agent.c @@ -0,0 +1,67 @@ +/* + * + * Wireless daemon for Linux + * + * Copyright (C) 2015 Intel Corporation. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; 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 "src/dbus.h" +#include "src/agent.h" + +static struct l_dbus_message *agent_register(struct l_dbus *dbus, + struct l_dbus_message *message, + void *user_data) +{ + return NULL; +} + +static struct l_dbus_message *agent_unregister(struct l_dbus *dbus, + struct l_dbus_message *message, + void *user_data) +{ + return NULL; +} + +bool agent_setup(struct l_dbus_interface *interface) +{ + l_dbus_interface_method(interface, "RegisterAgent", 0, + agent_register, + "", "o", "path"); + l_dbus_interface_method(interface, "UnregisterAgent", 0, + agent_unregister, + "", "o", "path"); + + return true; +} + +bool agent_init(void) +{ + return true; +} + +void agent_exit(void) +{ + return; +} diff --git a/src/agent.h b/src/agent.h new file mode 100644 index 00000000..6e5ae101 --- /dev/null +++ b/src/agent.h @@ -0,0 +1,27 @@ +/* + * + * Wireless daemon for Linux + * + * Copyright (C) 2015 Intel Corporation. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include + +bool agent_init(void); +void agent_exit(void); +bool agent_setup(struct l_dbus_interface *interface);