summaryrefslogtreecommitdiffstats
path: root/src/sbus/sssd_dbus.h
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2015-01-29 15:29:26 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-05-22 15:57:03 +0200
commit10a28f461c25d788ff4dcffefa881e7aa724a25d (patch)
tree5df10c69ac2c35e93c9934a6a43fc4474efde3c8 /src/sbus/sssd_dbus.h
parent364b3572bab5a9649e8f2d4da835d05d3c8ca7a9 (diff)
downloadsssd-10a28f461c25d788ff4dcffefa881e7aa724a25d.tar.gz
sssd-10a28f461c25d788ff4dcffefa881e7aa724a25d.tar.xz
sssd-10a28f461c25d788ff4dcffefa881e7aa724a25d.zip
sbus: add sbus_opath_decompose[_exact]
This function decomposes object path into array of strings. The "_exact" version expects a certain number of parts otherwise an error is thrown. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/sbus/sssd_dbus.h')
-rw-r--r--src/sbus/sssd_dbus.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h
index 6d2d5897a..61c18ae28 100644
--- a/src/sbus/sssd_dbus.h
+++ b/src/sbus/sssd_dbus.h
@@ -196,6 +196,20 @@ _sbus_opath_compose(TALLOC_CTX *mem_ctx,
#define sbus_opath_compose(mem_ctx, base, ...) \
_sbus_opath_compose(mem_ctx, base, ##__VA_ARGS__, NULL)
+errno_t
+sbus_opath_decompose(TALLOC_CTX *mem_ctx,
+ const char *object_path,
+ const char *prefix,
+ char ***_components,
+ size_t *_len);
+
+errno_t
+sbus_opath_decompose_exact(TALLOC_CTX *mem_ctx,
+ const char *object_path,
+ const char *prefix,
+ size_t expected,
+ char ***_components);
+
const char *
sbus_opath_strip_prefix(const char *object_path,
const char *prefix);