summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-enumerator-private.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-14 16:22:39 +0200
committerTom Gundersen <teg@jklm.no>2015-04-16 16:47:23 +0100
commit96df036fe3d25525a44f5efdb2fc8560e82e6cfd (patch)
tree489e9ac2de5ab8b9c1ac418e07ffc69094c91bd3 /src/libsystemd/sd-device/device-enumerator-private.h
parentaa02962840e10fa7d052760b98a5c092dd0990e1 (diff)
sd-device: add device-enumerator library
Diffstat (limited to 'src/libsystemd/sd-device/device-enumerator-private.h')
-rw-r--r--src/libsystemd/sd-device/device-enumerator-private.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator-private.h b/src/libsystemd/sd-device/device-enumerator-private.h
new file mode 100644
index 0000000000..515a60da22
--- /dev/null
+++ b/src/libsystemd/sd-device/device-enumerator-private.h
@@ -0,0 +1,34 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+ This file is part of systemd.
+
+ Copyright 2015 Tom Gundersen <teg@jklm.no>
+
+ systemd 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.
+
+ systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "sd-device.h"
+
+int device_enumerator_scan_devices(sd_device_enumerator *enumeartor);
+int device_enumerator_scan_subsystems(sd_device_enumerator *enumeartor);
+sd_device *device_enumerator_get_first(sd_device_enumerator *enumerator);
+sd_device *device_enumerator_get_next(sd_device_enumerator *enumerator);
+
+#define FOREACH_DEVICE_AND_SUBSYSTEM(enumerator, device) \
+ for (device = device_enumerator_get_first(enumerator); \
+ device; \
+ device = device_enumerator_get_next(enumerator))