summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Schmidt <philschmidt@gmx.net>2013-07-15 12:57:19 +0200
committerPhilipp Schmidt <philschmidt@gmx.net>2013-07-15 12:57:19 +0200
commit8a3ae1df2bacd9d356ec02c58e8f9623753532c0 (patch)
treef698dae6ebde0eb2bf1db134a69c9a400b2748be
parentfd649f71d008a15fd9cd4c7b0b48be4edd9ca51d (diff)
downloadlibmtp-8a3ae1df2bacd9d356ec02c58e8f9623753532c0.tar.gz
Add udev listener to makefile
-rw-r--r--daemon/Makefile.am2
-rw-r--r--daemon/mtpd.c1
-rw-r--r--daemon/udev_listener.h5
3 files changed, 6 insertions, 2 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 6ba6108..c655d26 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -28,7 +28,7 @@ $(dbus_built_sources) : Makefile.am dbus-interface.xml
sbin_PROGRAMS = mtpd
-mtpd_SOURCES = mtpd.c
+mtpd_SOURCES = mtpd.c udev_listener.c
mtpd_LDADD = $(libraries)
# D-BUS service file
diff --git a/daemon/mtpd.c b/daemon/mtpd.c
index c8e0011..04db940 100644
--- a/daemon/mtpd.c
+++ b/daemon/mtpd.c
@@ -2,6 +2,7 @@
* \file mtpd.c
*
* Copyright (C) 2013 Philip Langdale <philipl@overt.org>
+ * Copyright (C) 2013 Philipp Schmidt <philschmidt@gmx.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/daemon/udev_listener.h b/daemon/udev_listener.h
index 00ac8f5..74ead54 100644
--- a/daemon/udev_listener.h
+++ b/daemon/udev_listener.h
@@ -22,6 +22,8 @@
#ifndef UDEV_LISTENER_H
#define UDEV_LISTENER_H
+#include <stdint.h>
+
/**
* The callback type definition for the function that is called when a device is added.
*/
@@ -33,7 +35,8 @@ typedef int (* MTPD_device_added_t) (uint32_t const busid, uint32_t const devid)
typedef int (* MTPD_device_removed_t) (uint32_t const busid, uint32_t const devid);
void
-MTPD_start_udev_listener( MTPD_device_added_t const, MTPD_device_removed_t const );
+MTPD_start_udev_listener( MTPD_device_added_t const device_added_callback, MTPD_device_removed_t const device_removed_callback);
+
void
MTPD_stop_udev_listener();