5 #ifndef PIPEWIRE_PERMISSION_H
6 #define PIPEWIRE_PERMISSION_H
27 #define PW_PERM_R 0400
28 #define PW_PERM_W 0200
29 #define PW_PERM_X 0100
31 #define PW_PERM_M 0010
33 #define PW_PERM_RWX (PW_PERM_R|PW_PERM_W|PW_PERM_X)
34 #define PW_PERM_RWXM (PW_PERM_RWX|PW_PERM_M)
36 #define PW_PERM_IS_R(p) (((p)&PW_PERM_R) == PW_PERM_R)
37 #define PW_PERM_IS_W(p) (((p)&PW_PERM_W) == PW_PERM_W)
38 #define PW_PERM_IS_X(p) (((p)&PW_PERM_X) == PW_PERM_X)
39 #define PW_PERM_IS_M(p) (((p)&PW_PERM_M) == PW_PERM_M)
41 #define PW_PERM_ALL PW_PERM_RWXM
42 #define PW_PERM_INVALID (uint32_t)(0xffffffff)
49 #define PW_PERMISSION_INIT(id,p) ((struct pw_permission){ (id), (p) })
51 #define PW_PERMISSION_FORMAT "%c%c%c%c"
52 #define PW_PERMISSION_ARGS(permission) \
53 (permission) & PW_PERM_R ? 'r' : '-', \
54 (permission) & PW_PERM_W ? 'w' : '-', \
55 (permission) & PW_PERM_X ? 'x' : '-', \
56 (permission) & PW_PERM_M ? 'm' : '-'
Definition: permission.h:60
uint32_t id
id of object, PW_ID_ANY for default permission
Definition: permission.h:61
uint32_t permissions
bitmask of above permissions
Definition: permission.h:62