chromium/third_party/libgav1/src/src/gav1/status_code.h

/*
 * Copyright 2019 The libgav1 Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef LIBGAV1_SRC_GAV1_STATUS_CODE_H_
#define LIBGAV1_SRC_GAV1_STATUS_CODE_H_

#include "gav1/symbol_visibility.h"

// All the declarations in this file are part of the public ABI. This file may
// be included by both C and C++ files.

// The Libgav1StatusCode enum type: A libgav1 function may return
// Libgav1StatusCode to indicate success or the reason for failure.
Libgav1StatusCode;

#if defined(__cplusplus)
extern "C" {
#endif

// Returns a human readable error string in en-US for the status code |status|.
// Always returns a valid (non-NULL) string.
LIBGAV1_PUBLIC const char* Libgav1GetErrorString(Libgav1StatusCode status);

#if defined(__cplusplus)
}  // extern "C"

namespace libgav1 {

// Declare type aliases for C++.
StatusCode;
constexpr StatusCode kStatusOk =;
constexpr StatusCode kStatusUnknownError =;
constexpr StatusCode kStatusInvalidArgument =;
constexpr StatusCode kStatusOutOfMemory =;
constexpr StatusCode kStatusResourceExhausted =;
constexpr StatusCode kStatusNotInitialized =;
constexpr StatusCode kStatusAlready =;
constexpr StatusCode kStatusUnimplemented =;
constexpr StatusCode kStatusInternalError =;
constexpr StatusCode kStatusBitstreamError =;
constexpr StatusCode kStatusTryAgain =;
constexpr StatusCode kStatusNothingToDequeue =;

// Returns a human readable error string in en-US for the status code |status|.
// Always returns a valid (non-NULL) string.
inline const char* GetErrorString(StatusCode status) {}

}  // namespace libgav1
#endif  // defined(__cplusplus)

#endif  // LIBGAV1_SRC_GAV1_STATUS_CODE_H_