1e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//
2e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// Copyright (C) 2012 The Android Open Source Project
3e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//
4e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// Licensed under the Apache License, Version 2.0 (the "License");
5e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// you may not use this file except in compliance with the License.
6e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// You may obtain a copy of the License at
7e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//
8e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//      http://www.apache.org/licenses/LICENSE-2.0
9e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//
10e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// Unless required by applicable law or agreed to in writing, software
11e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// distributed under the License is distributed on an "AS IS" BASIS,
12e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// See the License for the specific language governing permissions and
14e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// limitations under the License.
15e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo//
16e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
17e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo#ifndef UPDATE_ENGINE_COMMON_ERROR_CODE_UTILS_H_
18e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo#define UPDATE_ENGINE_COMMON_ERROR_CODE_UTILS_H_
19e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
20e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo#include <string>
21e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
22e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo#include "update_engine/common/error_code.h"
23e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
24e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymonamespace chromeos_update_engine {
25e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymonamespace utils {
26e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
27e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// Returns a string representation of the ErrorCodes (either the base
28e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo// error codes or the bit flags) for logging purposes.
29e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymostd::string ErrorCodeToString(ErrorCode code);
30e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
31e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo}  // namespace utils
32e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo}  // namespace chromeos_update_engine
33e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo
34e88e9feb5a64c1358baeb1c8547e82aa08e1cd83Alex Deymo#endif  // UPDATE_ENGINE_COMMON_ERROR_CODE_UTILS_H_
35