blob: 290815edabb89c1ded1097a42dcbcced7b341019 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library zx;
// TODO(scottmg): (1 << 4) notation or something else for bits would be nice.
bits rights : uint32 {
// TODO(scottmg): "bits members must be powers of two"
// NONE = 0x00000000;
DUPLICATE = 0x00000001;
TRANSFER = 0x00000002;
READ = 0x00000004;
WRITE = 0x00000008;
EXECUTE = 0x00000010;
MAP = 0x00000020;
GET_PROPERTY = 0x00000040;
SET_PROPERTY = 0x00000080;
ENUMERATE = 0x00000100;
DESTROY = 0x00000200;
SET_POLICY = 0x00000400;
GET_POLICY = 0x00000800;
SIGNAL = 0x00001000;
SIGNAL_PEER = 0x00002000;
WAIT = 0x00004000;
INSPECT = 0x00008000;
MANAGE_JOB = 0x00010000;
MANAGE_PROCESS = 0x00020000;
MANAGE_THREAD = 0x00040000;
APPLY_PROFILE = 0x00080000;
SAME_RIGHTS = 0x80000000;
// TODO(scottmg): Derived settings using |, &, ~, e.g.:
// BASIC = (TRANSFER | DUPLICATE | WAIT | INSPECT);
};