summaryrefslogtreecommitdiff
path: root/src/core/busname.h
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-08-18 22:07:47 +0200
committerDaniel Mack <daniel@zonque.org>2014-09-08 11:06:45 +0200
commit5369c77d2ee864ac0464d4adc0774ee70ba9c4bc (patch)
tree0206b657a3fbf3db03e3750155d4a120f31c68c7 /src/core/busname.h
parentde68938a2cb3ab535ebd9198723a651753c1a1df (diff)
bus: factor out bus policy items
In order to re-use the policy definitions, factor them out into their own files.
Diffstat (limited to 'src/core/busname.h')
-rw-r--r--src/core/busname.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/core/busname.h b/src/core/busname.h
index 65d57f710a..c9b653d82e 100644
--- a/src/core/busname.h
+++ b/src/core/busname.h
@@ -25,6 +25,7 @@ typedef struct BusName BusName;
typedef struct BusNamePolicy BusNamePolicy;
#include "unit.h"
+#include "bus-common.h"
typedef enum BusNameState {
BUSNAME_DEAD,
@@ -58,17 +59,9 @@ typedef enum BusNamePolicyType {
_BUSNAME_POLICY_TYPE_INVALID = -1
} BusNamePolicyType;
-typedef enum BusNamePolicyAccess {
- BUSNAME_POLICY_ACCESS_SEE,
- BUSNAME_POLICY_ACCESS_TALK,
- BUSNAME_POLICY_ACCESS_OWN,
- _BUSNAME_POLICY_ACCESS_MAX,
- _BUSNAME_POLICY_ACCESS_INVALID = -1
-} BusNamePolicyAccess;
-
struct BusNamePolicy {
BusNamePolicyType type;
- BusNamePolicyAccess access;
+ BusPolicyAccess access;
char *name;
@@ -97,7 +90,7 @@ struct BusName {
pid_t control_pid;
LIST_HEAD(BusNamePolicy, policy);
- BusNamePolicyAccess policy_world;
+ BusPolicyAccess policy_world;
};
extern const UnitVTable busname_vtable;
@@ -107,6 +100,3 @@ BusNameState busname_state_from_string(const char *s) _pure_;
const char* busname_result_to_string(BusNameResult i) _const_;
BusNameResult busname_result_from_string(const char *s) _pure_;
-
-const char* busname_policy_access_to_string(BusNamePolicyAccess i) _const_;
-BusNamePolicyAccess busname_policy_access_from_string(const char *s) _pure_;