diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-01-06 15:27:44 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-13 21:46:54 +0200 |
commit | f92ace4a52602e8c38a34f2392bec3deeac2dddd (patch) | |
tree | fe8e5c7a5666df507048515073e1ddda447283db /src/responder/ifp/ifp_private.h | |
parent | 07976be2a09ebb1346c841d4a32e417a8bb43862 (diff) | |
download | sssd-f92ace4a52602e8c38a34f2392bec3deeac2dddd.tar.gz sssd-f92ace4a52602e8c38a34f2392bec3deeac2dddd.tar.xz sssd-f92ace4a52602e8c38a34f2392bec3deeac2dddd.zip |
IFP: Add utility functions
Adds a number of utility functions, most importanly ifp_req_create().
The ifp_req is a structure that will be passed along with the ifp
request and would provide easy access to both the sbus_request data and
per-responder data, like the ifp_ctx.
Also includes a utility function to split a path prefix from a full path
and add a ldb_element into a dictionary. These will be reused later.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Stef Walter <stefw@redhat.com>
Diffstat (limited to 'src/responder/ifp/ifp_private.h')
-rw-r--r-- | src/responder/ifp/ifp_private.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/responder/ifp/ifp_private.h b/src/responder/ifp/ifp_private.h index b97cb8a7d..472d10441 100644 --- a/src/responder/ifp/ifp_private.h +++ b/src/responder/ifp/ifp_private.h @@ -46,4 +46,18 @@ struct ifp_ctx { * It will be removed later */ int ifp_ping(struct sbus_request *dbus_req, void *data); +/* == Utility functions == */ +struct ifp_req { + struct sbus_request *dbus_req; + struct ifp_ctx *ifp_ctx; +}; + +errno_t ifp_req_create(struct sbus_request *dbus_req, + struct ifp_ctx *ifp_ctx, + struct ifp_req **_ifp_req); + +const char *ifp_path_strip_prefix(const char *path, const char *prefix); +errno_t ifp_add_ldb_el_to_dict(DBusMessageIter *iter_dict, + struct ldb_message_element *el); + #endif /* _IFPSRV_PRIVATE_H_ */ |