From 4f545152099a4e2092dae91270278ff4aa51d9c5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 10 May 2009 22:55:11 -0700 Subject: [PATCH] Add skeleton for AT modem driver plugin --- drivers/Makefile.am | 7 +++++++ drivers/atmodem/main.c | 43 ++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 6 +++--- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 drivers/atmodem/main.c diff --git a/drivers/Makefile.am b/drivers/Makefile.am index 0791a1a2..fec162fe 100644 --- a/drivers/Makefile.am +++ b/drivers/Makefile.am @@ -3,6 +3,9 @@ builtin_modules = builtin_sources = builtin_cflags = +builtin_modules += atmodem +builtin_sources += atmodem/main.c + noinst_LTLIBRARIES = libbuiltin.la libbuiltin_la_SOURCES = $(builtin_sources) @@ -13,6 +16,10 @@ BUILT_SOURCES = builtin.h nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES) +AM_CFLAGS = -fvisibility=hidden @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@ + +INCLUDES = -I$(top_builddir)/include + CLEANFILES = $(BUILT_SOURCES) MAINTAINERCLEANFILES = Makefile.in diff --git a/drivers/atmodem/main.c b/drivers/atmodem/main.c new file mode 100644 index 00000000..1641c68a --- /dev/null +++ b/drivers/atmodem/main.c @@ -0,0 +1,43 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2008-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 + +#define OFONO_API_SUBJECT_TO_CHANGE +#include +#include + +static int atmodem_init(void) +{ + DBG(""); + + return 0; +} + +static void atmodem_exit(void) +{ + DBG(""); +} + +OFONO_PLUGIN_DEFINE(atmodem, "AT modem driver", VERSION, + OFONO_PLUGIN_PRIORITY_DEFAULT, atmodem_init, atmodem_exit) diff --git a/src/Makefile.am b/src/Makefile.am index 15285c5c..fef25624 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ ofonod_SOURCES = main.c ofono.h log.c plugin.c \ ofonod_LDADD = $(top_builddir)/plugins/libbuiltin.la \ $(top_builddir)/drivers/libbuiltin.la \ - @GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ -ldl + @GATCHAT_LIBS@ @GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ -ldl ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=ofono.ver @@ -29,8 +29,8 @@ else plugindir = $(libdir)/ofono/plugins endif -AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \ - -DPLUGINDIR=\""$(plugindir)"\" +AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@ \ + -DPLUGINDIR=\""$(plugindir)"\" INCLUDES = -I$(top_builddir)/include -I$(top_builddir)