1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef DBUS_DBUS_RESULT_H_
6 #define DBUS_DBUS_RESULT_H_
8 #include "base/functional/callback.h"
9 #include "dbus/dbus_export.h"
10 #include "dbus/message.h"
14 // These values are persisted to logs. Entries should not be renumbered and
15 // numeric values should never be reused.
16 enum class DBusResult {
21 kErrorNotSupported = 4,
22 kErrorAccessDenied = 5,
23 kErrorDisconnected = 6,
24 kErrorResponseMissing = 7,
28 kErrorServiceUnknown = 11,
29 kErrorNameHasNoOwner = 12,
31 kErrorBadAddress = 14,
32 kErrorLimitsExceeded = 15,
33 kErrorAuthFailed = 16,
36 kErrorAddressInUse = 19,
37 kErrorInvalidArgs = 20,
38 kErrorFileNotFound = 21,
39 kErrorFileExists = 22,
40 kErrorUnknownMethod = 23,
41 kErrorUnknownObject = 24,
42 kErrorUnknownInterface = 25,
43 kErrorUnknownProperty = 26,
44 kErrorPropertyReadOnly = 27,
45 kErrorMatchRuleNotFound = 28,
46 kErrorMatchRuleInvalid = 29,
47 kErrorSpawnExecFailed = 30,
48 kErrorSpawnForkFailed = 31,
49 kErrorSpawnChildExited = 32,
50 kErrorSpawnChildSignaled = 33,
51 kErrorSpawnFailed = 34,
52 kErrorSpawnSetupFailed = 35,
53 kErrorSpawnConfigInvalid = 36,
54 kErrorSpawnServiceInvalid = 37,
55 kErrorSpawnServiceNotFound = 38,
56 kErrorSpawnPermissionsInvalid = 39,
57 kErrorSpawnFileInvalid = 40,
58 kErrorSpawnNoMemory = 41,
59 kErrorUnixProcessIDUnknown = 42,
60 kErrorInvalidSignature = 43,
61 kErrorInvalidFileContent = 44,
62 kErrorSELinuxSecurityContextUnknown = 45,
63 kErrorAdtAuditDataUnknown = 46,
64 kErrorObjectPathInUse = 47,
65 kErrorInconsistentMessage = 48,
66 kErrorInteractiveAuthorizationRequired = 49,
67 kErrorNotContainer = 50,
68 kMaxValue = kErrorNotContainer
71 CHROME_DBUS_EXPORT DBusResult GetResult(dbus::ErrorResponse* response);
75 #endif // DBUS_DBUS_RESULT_H_