From 971ed9531285f7de6b2c7a06095a833f9cbad08a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 11 Mar 2008 20:00:16 +0000 Subject: Add skeleton for the example plugin --- plugins/Makefile.am | 12 ++++++++++++ plugins/echo.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 plugins/echo.c (limited to 'plugins') diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 02742923..b6020d05 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,2 +1,14 @@ +plugindir = $(libdir)/bluetooth/plugins + +plugin_LTLIBRARIES = libecho.la + +libecho_la_SOURCES = echo.c + +AM_LDFLAGS = -module -avoid-version -export-symbols-regex bluetooth_plugin_desc + +AM_CFLAGS = @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ + +INCLUDES = -I$(top_builddir)/common -I$(top_builddir)/hcid + MAINTAINERCLEANFILES = Makefile.in diff --git a/plugins/echo.c b/plugins/echo.c new file mode 100644 index 00000000..4eaaddb6 --- /dev/null +++ b/plugins/echo.c @@ -0,0 +1,41 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2008 Marcel Holtmann + * + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include "plugin.h" + +static int echo_init(void) +{ + return -EIO; +} + +static void echo_exit(void) +{ +} + +BLUETOOTH_PLUGIN_DEFINE("echo", echo_init, echo_exit) -- cgit