diff options
author | Pavel Březina <pbrezina@redhat.com> | 2015-01-16 13:36:12 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-02-17 15:59:52 +0100 |
commit | 62ebed8582285bd24efba92b9a06366511507946 (patch) | |
tree | 877ca2ba8a90bc0e585b7c5102162b7cec994d29 /src/responder/ifp | |
parent | 4e5d19f659d8c545c4ed3c307c95cfe4f2ca33cb (diff) | |
download | sssd-62ebed8582285bd24efba92b9a06366511507946.tar.gz sssd-62ebed8582285bd24efba92b9a06366511507946.tar.xz sssd-62ebed8582285bd24efba92b9a06366511507946.zip |
IFP: simplify object path constant names
The number of interfaces will grow and in order to keep names of
object path constant consistent it means that also their names
will grow. The new naming schema is:
/org/freedesktop/sssd/infopipe -> IFP_PATH_
/ -> _
everything uppercase
Example:
/org/freedesktop/sssd/infopipe/Components/Responders
-> IFP_PATH_COMPONENTS_RESPONDERS
If the path contains a _TREE suffix, it represents the whole
subtree. For example:
IFP_PATH_DOMAINS_TREE is /org/freedesktop/sssd/infopipe/Domains/*
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/responder/ifp')
-rw-r--r-- | src/responder/ifp/ifp_components.c | 6 | ||||
-rw-r--r-- | src/responder/ifp/ifp_components.h | 6 | ||||
-rw-r--r-- | src/responder/ifp/ifp_domains.c | 8 | ||||
-rw-r--r-- | src/responder/ifp/ifp_domains.h | 4 | ||||
-rw-r--r-- | src/responder/ifp/ifp_iface.c | 6 | ||||
-rw-r--r-- | src/responder/ifp/ifp_private.h | 2 |
6 files changed, 15 insertions, 17 deletions
diff --git a/src/responder/ifp/ifp_components.c b/src/responder/ifp/ifp_components.c index 3d700f92e..b143d1e4f 100644 --- a/src/responder/ifp/ifp_components.c +++ b/src/responder/ifp/ifp_components.c @@ -34,9 +34,9 @@ #include "util/sss_config.h" #endif -#define PATH_MONITOR INFOPIPE_COMPONENT_PATH_PFX "/monitor" -#define PATH_RESPONDERS INFOPIPE_COMPONENT_PATH_PFX "/Responders" -#define PATH_BACKENDS INFOPIPE_COMPONENT_PATH_PFX "/Backends" +#define PATH_MONITOR IFP_PATH_COMPONENTS "/monitor" +#define PATH_RESPONDERS IFP_PATH_COMPONENTS "/Responders" +#define PATH_BACKENDS IFP_PATH_COMPONENTS "/Backends" enum component_type { COMPONENT_MONITOR, diff --git a/src/responder/ifp/ifp_components.h b/src/responder/ifp/ifp_components.h index 6c6300442..d62585c0a 100644 --- a/src/responder/ifp/ifp_components.h +++ b/src/responder/ifp/ifp_components.h @@ -24,10 +24,8 @@ #include "responder/ifp/ifp_iface_generated.h" #include "responder/ifp/ifp_private.h" -#define INFOPIPE_COMPONENT_PATH_PFX "/org/freedesktop/sssd/infopipe/Components" -#define INFOPIPE_COMPONENT_PATH INFOPIPE_COMPONENT_PATH_PFX "/*" - -#define INFOPIPE_BACKEND_PATH INFOPIPE_COMPONENT_PATH_PFX "/Backends*" +#define IFP_PATH_COMPONENTS IFP_PATH "/Components" +#define IFP_PATH_COMPONENTS_TREE IFP_PATH_COMPONENTS "/*" /* org.freedesktop.sssd.infopipe */ diff --git a/src/responder/ifp/ifp_domains.c b/src/responder/ifp/ifp_domains.c index b9c2c7797..360576687 100644 --- a/src/responder/ifp/ifp_domains.c +++ b/src/responder/ifp/ifp_domains.c @@ -125,7 +125,7 @@ static void ifp_list_domains_process(struct tevent_req *req) for (dom = ireq->ifp_ctx->rctx->domains; dom != NULL; dom = get_next_domain(dom, true)) { - p = sbus_opath_compose(ireq, INFOPIPE_DOMAIN_PATH_PFX, dom->name); + p = sbus_opath_compose(ireq, IFP_PATH_DOMAINS, dom->name); if (p == NULL) { DEBUG(SSSDBG_MINOR_FAILURE, "Could not create path for dom %s, skipping\n", dom->name); @@ -234,7 +234,7 @@ static void ifp_find_domain_by_name_process(struct tevent_req *req) return; } - path = sbus_opath_compose(ireq, INFOPIPE_DOMAIN_PATH_PFX, iter->name); + path = sbus_opath_compose(ireq, IFP_PATH_DOMAINS, iter->name); if (path == NULL) { DEBUG(SSSDBG_MINOR_FAILURE, "Could not create path for domain %s, skipping\n", iter->name); @@ -263,7 +263,7 @@ get_domain_info_from_req(struct sbus_request *dbus_req, void *data) } name = sbus_opath_get_object_name(dbus_req, dbus_req->path, - INFOPIPE_DOMAIN_PATH_PFX); + IFP_PATH_DOMAINS); if (name == NULL) { return NULL; } @@ -530,6 +530,6 @@ void ifp_dom_get_parent_domain(struct sbus_request *dbus_req, return; } - *_out = sbus_opath_compose(dbus_req, INFOPIPE_DOMAIN_PATH_PFX, + *_out = sbus_opath_compose(dbus_req, IFP_PATH_DOMAINS, dom->parent->name); } diff --git a/src/responder/ifp/ifp_domains.h b/src/responder/ifp/ifp_domains.h index d6ed6c73d..7ec571dcf 100644 --- a/src/responder/ifp/ifp_domains.h +++ b/src/responder/ifp/ifp_domains.h @@ -25,8 +25,8 @@ #include "responder/ifp/ifp_iface_generated.h" #include "responder/ifp/ifp_private.h" -#define INFOPIPE_DOMAIN_PATH_PFX "/org/freedesktop/sssd/infopipe/Domains" -#define INFOPIPE_DOMAIN_PATH INFOPIPE_DOMAIN_PATH_PFX"/*" +#define IFP_PATH_DOMAINS IFP_PATH "/Domains" +#define IFP_PATH_DOMAINS_TREE IFP_PATH_DOMAINS "/*" /* org.freedesktop.sssd.infopipe */ diff --git a/src/responder/ifp/ifp_iface.c b/src/responder/ifp/ifp_iface.c index ffa3c46b7..c82a2e65d 100644 --- a/src/responder/ifp/ifp_iface.c +++ b/src/responder/ifp/ifp_iface.c @@ -82,9 +82,9 @@ struct iface_map { }; static struct iface_map iface_map[] = { - { INFOPIPE_PATH, &iface_ifp.vtable }, - { INFOPIPE_DOMAIN_PATH, &iface_ifp_domains.vtable }, - { INFOPIPE_COMPONENT_PATH, &iface_ifp_components.vtable }, + { IFP_PATH, &iface_ifp.vtable }, + { IFP_PATH_DOMAINS_TREE, &iface_ifp_domains.vtable }, + { IFP_PATH_COMPONENTS_TREE, &iface_ifp_components.vtable }, { NULL, NULL }, }; diff --git a/src/responder/ifp/ifp_private.h b/src/responder/ifp/ifp_private.h index 96ccb41e4..f76655fa1 100644 --- a/src/responder/ifp/ifp_private.h +++ b/src/responder/ifp/ifp_private.h @@ -29,7 +29,7 @@ #include "providers/data_provider.h" #include "responder/ifp/ifp_iface_generated.h" -#define INFOPIPE_PATH "/org/freedesktop/sssd/infopipe" +#define IFP_PATH "/org/freedesktop/sssd/infopipe" struct sysbus_ctx { struct sbus_connection *conn; |