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