From 903ea5d96de75715327318fcf203f9d0218ec6ac Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Wed, 26 Jun 2013 10:53:15 +0200 Subject: Initial skeleton for the DBus daemon by Philip Langdale --- daemon/Makefile.am | 51 +++++++++++++++++++++++++++++++++++++++++++++++ daemon/dbus-interface.xml | 31 ++++++++++++++++++++++++++++ daemon/mtpd.c | 27 +++++++++++++++++++++++++ daemon/mtpd.service.in | 0 4 files changed, 109 insertions(+) create mode 100644 daemon/Makefile.am create mode 100644 daemon/dbus-interface.xml create mode 100644 daemon/mtpd.c create mode 100644 daemon/mtpd.service.in diff --git a/daemon/Makefile.am b/daemon/Makefile.am new file mode 100644 index 0000000..bfc2a8f --- /dev/null +++ b/daemon/Makefile.am @@ -0,0 +1,51 @@ +if BUILD_MTPD + +NULL = + +INCLUDES = \ + -I$(top_builddir)/src \ + $(GLIB_CFLAGS) \ + $(NULL) + +libraries = \ + $(top_builddir)/src/libmtp.la \ + $(GLIB_LIBS) \ + $(NULL) + +dbus_built_sources = mtp-dbus.c mtp-dbus.h +BUILT_SOURCES = $(dbus_built_sources) + +$(dbus_built_sources) : Makefile.am dbus-interface.xml + $(AM_V_GEN) gdbus-codegen \ + --interface-prefix org.libmtp. \ + --c-namespace MTP \ + --generate-c-code mtp-dbus \ + $(srcdir)/dbus-interface.xml \ + $(NULL) + +sbin_PROGRAMS = mtpd + +mtpd_SOURCES = mtpd.c +mtpd_LDADD = $(libraries) + +# D-BUS service file +%.service: %.service.in ../config.log + $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + +servicedir = $(DBUS_SERVICE_DIR) +service_in_files = mtpd.service.in +service_DATA = mtpd.service + +EXTRA_DIST = \ + mtpd.service.in \ + dbus-interface.xml \ + $(NULL) + +clean-local: + rm -f mtpd.service + +CLEANFILES = \ + $(dbus_built_sources) \ + $(NULL) + +endif diff --git a/daemon/dbus-interface.xml b/daemon/dbus-interface.xml new file mode 100644 index 0000000..dc5badb --- /dev/null +++ b/daemon/dbus-interface.xml @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/daemon/mtpd.c b/daemon/mtpd.c new file mode 100644 index 0000000..7ff54e2 --- /dev/null +++ b/daemon/mtpd.c @@ -0,0 +1,27 @@ +/** + * \file mtpd.c + * + * Copyright (C) 2013 Philip Langdale + * + * 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 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +int +main (int argc, char *argv[]) +{ + return 0; +} diff --git a/daemon/mtpd.service.in b/daemon/mtpd.service.in new file mode 100644 index 0000000..e69de29 -- cgit v1.2.1