1 /* 2 * Copyright (C) 2023-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: supply errors definition for interfaces. 15 * Author: zhangjingnan 16 * Create: 2023-4-11 17 */ 18 19 #ifndef CAST_ENGINE_ERRORS_H 20 #define CAST_ENGINE_ERRORS_H 21 22 #include <cinttypes> 23 #include "errors.h" 24 #include "cast_engine_common.h" 25 26 namespace OHOS { 27 namespace CastEngine { 28 constexpr int32_t EXPORT CAST_ENGINE_ERROR = -1; 29 constexpr int32_t EXPORT CAST_ENGINE_SUCCESS = 0; 30 constexpr int32_t EXPORT CAST_ENGINE_ERROR_BASE = 1000; 31 constexpr int32_t EXPORT ERR_NO_MEMORY = -(CAST_ENGINE_ERROR_BASE + 1); 32 constexpr int32_t EXPORT ERR_INVALID_PARAM = -(CAST_ENGINE_ERROR_BASE + 2); 33 constexpr int32_t EXPORT ERR_NO_PERMISSION = -(CAST_ENGINE_ERROR_BASE + 3); 34 constexpr int32_t EXPORT ERR_SESSION_NOT_EXIST = -(CAST_ENGINE_ERROR_BASE + 4); 35 constexpr int32_t EXPORT ERR_SERVICE_STATE_NOT_MATCH = -(CAST_ENGINE_ERROR_BASE + 5); 36 constexpr int32_t EXPORT ERR_SESSION_STATE_NOT_MATCH = -(CAST_ENGINE_ERROR_BASE + 6); 37 } // namespace CastEngine 38 } // namespace OHOS 39 40 #endif // CAST_ENGINE_ERRORS_H