1// Copyright 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_
6#define LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_
7
8#include <string>
9
10#include <brillo/brillo_export.h>
11#include <brillo/errors/error.h>
12
13namespace brillo {
14namespace errors {
15
16namespace dbus {
17BRILLO_EXPORT extern const char kDomain[];
18}  // namespace dbus
19
20namespace json {
21BRILLO_EXPORT extern const char kDomain[];
22BRILLO_EXPORT extern const char kParseError[];
23BRILLO_EXPORT extern const char kObjectExpected[];
24}  // namespace json
25
26namespace http {
27BRILLO_EXPORT extern const char kDomain[];
28}  // namespace http
29
30namespace system {
31BRILLO_EXPORT extern const char kDomain[];
32
33// Adds an Error object to the error chain identified by |error|, using
34// the system error code (see "errno").
35BRILLO_EXPORT void AddSystemError(ErrorPtr* error,
36                                  const tracked_objects::Location& location,
37                                  int errnum);
38}  // namespace system
39
40}  // namespace errors
41}  // namespace brillo
42
43#endif  // LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_
44