1 /* 2 * Copyright (C) 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 */ 15 16 /** 17 * @addtogroup AVScreenCapture 18 * @{ 19 * 20 * @brief Provides APIs of request capability for Screen Capture. 21 * @since 10 22 */ 23 24 /** 25 * @file native_avscreen_capture_errors.h 26 * 27 * @brief Declare screen capture related error. 28 * 29 * @library libnative_avscreen_capture.so 30 * @syscap SystemCapability.Multimedia.Media.AVScreenCapture 31 * @kit MediaKit 32 * @since 10 33 */ 34 35 #ifndef NATIVE_AVSCREEN_CAPTURE_ERRORS_H 36 #define NATIVE_AVSCREEN_CAPTURE_ERRORS_H 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /** 43 * @brief Screen capture error code 44 * @syscap SystemCapability.Multimedia.Media.AVScreenCapture 45 * @since 10 46 * @version 1.0 47 */ 48 49 typedef enum OH_AVSCREEN_CAPTURE_ErrCode { 50 /** 51 * @error basic error mask for screen recording. 52 */ 53 AV_SCREEN_CAPTURE_ERR_BASE = 0, 54 /** 55 * @error the operation completed successfully. 56 */ 57 AV_SCREEN_CAPTURE_ERR_OK = AV_SCREEN_CAPTURE_ERR_BASE, 58 /** 59 * @error no memory. 60 */ 61 AV_SCREEN_CAPTURE_ERR_NO_MEMORY = AV_SCREEN_CAPTURE_ERR_BASE + 1, 62 /** 63 * @error opertation not be permitted. 64 */ 65 AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT = AV_SCREEN_CAPTURE_ERR_BASE + 2, 66 /** 67 * @error invalid argument. 68 */ 69 AV_SCREEN_CAPTURE_ERR_INVALID_VAL = AV_SCREEN_CAPTURE_ERR_BASE + 3, 70 /** 71 * @error IO error. 72 */ 73 AV_SCREEN_CAPTURE_ERR_IO = AV_SCREEN_CAPTURE_ERR_BASE + 4, 74 /** 75 * @error network timeout. 76 */ 77 AV_SCREEN_CAPTURE_ERR_TIMEOUT = AV_SCREEN_CAPTURE_ERR_BASE + 5, 78 /** 79 * @error unknown error. 80 */ 81 AV_SCREEN_CAPTURE_ERR_UNKNOWN = AV_SCREEN_CAPTURE_ERR_BASE + 6, 82 /** 83 * @error media service died. 84 */ 85 AV_SCREEN_CAPTURE_ERR_SERVICE_DIED = AV_SCREEN_CAPTURE_ERR_BASE + 7, 86 /** 87 * @error the state is not support this operation. 88 */ 89 AV_SCREEN_CAPTURE_ERR_INVALID_STATE = AV_SCREEN_CAPTURE_ERR_BASE + 8, 90 /** 91 * @error unsupport interface. 92 */ 93 AV_SCREEN_CAPTURE_ERR_UNSUPPORT = AV_SCREEN_CAPTURE_ERR_BASE + 9, 94 /** 95 * @error extend err start. 96 */ 97 AV_SCREEN_CAPTURE_ERR_EXTEND_START = AV_SCREEN_CAPTURE_ERR_BASE + 100, 98 } OH_AVSCREEN_CAPTURE_ErrCode; 99 100 #ifdef __cplusplus 101 } 102 #endif 103 104 #endif // NATIVE_AVSCREEN_CAPTURE_ERRORS_H 105 /** @} */