1 /* 2 * Copyright (c) 2022 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 OHOS_DSCREEN_ERRCODE_H 17 #define OHOS_DSCREEN_ERRCODE_H 18 19 namespace OHOS { 20 namespace DistributedHardware { 21 enum DScreenErrorCode { 22 DH_SUCCESS = 0, 23 DSCREEN_INIT_ERR = -1, 24 DSCREEN_BAD_VALUE = -2, 25 // SA error code 26 ERR_DH_SCREEN_SA_GET_SAMGR_FAIL = -50000, 27 ERR_DH_SCREEN_SA_GET_SOURCESERVICE_FAIL = -50001, 28 ERR_DH_SCREEN_SA_GET_SOURCEPROXY_FAIL = -50002, 29 ERR_DH_SCREEN_SA_GET_SOURCECALLBACKPROXY_FAIL = -50003, 30 ERR_DH_SCREEN_SA_SOURCEPROXY_NOT_INIT = -50004, 31 ERR_DH_SCREEN_SA_SOURCEPCALLBACK_NOT_INIT = -50005, 32 ERR_DH_SCREEN_SA_GET_SINKSERVICE_FAIL = -50006, 33 ERR_DH_SCREEN_SA_GET_SINKPROXY_FAIL = -50007, 34 ERR_DH_SCREEN_SA_SINKPROXY_NOT_INIT = -50008, 35 ERR_DH_SCREEN_SA_REGISTERCALLBACK_NOT_FOUND = -50009, 36 ERR_DH_SCREEN_SA_UNREGISTERCALLBACK_NOT_FOUND = -50010, 37 ERR_DH_SCREEN_SA_REQUEST_CODE_INVALID = -50011, 38 ERR_DH_SCREEN_SA_WRITEINTERFACETOKEN_FAILED = -50012, 39 ERR_DH_SCREEN_SA_WRITEPARAM_FAILED = -50013, 40 ERR_DH_SCREEN_SA_READPARAM_FAILED = -50014, 41 ERR_DH_SCREEN_SA_DSCREENMGR_NOT_INIT = -50015, 42 ERR_DH_SCREEN_SA_ENABLE_FAILED = -50016, 43 ERR_DH_SCREEN_SA_DISABLE_FAILED = -50017, 44 ERR_DH_SCREEN_SA_SOURCETRANS_NOT_INIT = -50018, 45 ERR_DH_SCREEN_SA_SCREENREGIONMGR_NOT_INIT = -50019, 46 ERR_DH_SCREEN_SA_SINKTRANS_NOT_INIT = -50020, 47 ERR_DH_SCREEN_SA_GET_REMOTE_SOURCE_SERVICE_FAIL = -50021, 48 ERR_DH_SCREEN_SA_GET_REMOTE_SINK_SERVICE_FAIL = -50022, 49 ERR_DH_SCREEN_SA_SCREENREGION_SETUP_FAIL = -50023, 50 ERR_DH_SCREEN_SA_SCREENREGION_START_FAIL = -50024, 51 ERR_DH_SCREEN_SA_REMOVE_VIRTUALSCREEN_FAIL = -50025, 52 ERR_DH_SCREEN_SA_DSCREEN_TASK_NOT_VALID = -50026, 53 ERR_DH_SCREEN_SA_DSCREEN_SCREENGION_SETUP_FAILED = -50027, 54 ERR_DH_SCREEN_SA_INVALID_IPC_CALL = -50028, 55 ERR_DH_SCREEN_SA_REGISTER_SCREENLISTENER_FAIL = -500029, 56 ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL = -500030, 57 ERR_DH_SCREEN_SA_DSCREEN_NEGOTIATE_CODEC_FAIL = -500031, 58 ERR_DH_SCREEN_SA_LOAD_TIMEOUT = -500032, 59 ERR_DH_SCREEN_SA_HIDUMPER_ERROR = -500033, 60 ERR_DH_SCREEN_SA_ENABLE_JSON_ERROR = -500034, 61 ERR_DH_SCREEN_SA_VALUE_NOT_INIT = -500035, 62 ERR_DH_SCREEN_SA_DSCREEN_SETUP_FAILED = -500036, 63 // Transport component error code 64 ERR_DH_SCREEN_TRANS_ERROR = -51000, 65 ERR_DH_SCREEN_TRANS_TIMEOUT = -51001, 66 ERR_DH_SCREEN_TRANS_NULL_VALUE = -51002, 67 ERR_DH_SCREEN_TRANS_ILLEGAL_PARAM = -51003, 68 ERR_DH_SCREEN_TRANS_ILLEGAL_OPERATION = -51004, 69 ERR_DH_SCREEN_TRANS_SESSION_CLOSED = -51005, 70 ERR_DH_SCREEN_TRANS_CREATE_CODEC_FAILED = -51006, 71 ERR_DH_SCREEN_TRANS_RELEASE_CODEC_FAILED = -51007, 72 ERR_DH_SCREEN_TRANS_START_CODEC_FAILED = -51008, 73 ERR_DH_SCREEN_TRANS_STOP_CODEC_FAILED = -51009, 74 ERR_DH_SCREEN_TRANS_CREATE_SURFACE_FAILED = -51010, 75 ERR_DH_SCREEN_TRANS_SESSION_NOT_OPEN = -51011, 76 // adapter 77 ERR_DH_SCREEN_ADAPTER_SESSION_ID_NOT_FIND = -52000, 78 ERR_DH_SCREEN_ADAPTER_UNREGISTER_SOFTBUS_LISTENER_FAIL = -52001, 79 ERR_DH_SCREEN_ADAPTER_REGISTER_SOFTBUS_LISTENER_FAIL = -52002, 80 ERR_DH_SCREEN_ADAPTER_FIND_SOFTBUS_LISTENER_FAIL = -52003, 81 ERR_DH_SCREEN_ADAPTER_BAD_VALUE = -52004, 82 ERR_DH_SCREEN_ADAPTER_OPEN_SESSION_FAIL = -52005, 83 ERR_DH_SCREEN_ADAPTER_PARA_ERROR = -52006, 84 // Encoder & Decoder 85 ERR_DH_SCREEN_CODEC_RELEASE_FAILED = -53000, 86 ERR_DH_SCREEN_CODEC_PREPARE_FAILED = -53001, 87 ERR_DH_SCREEN_CODEC_START_FAILED = -53002, 88 ERR_DH_SCREEN_CODEC_FLUSH_FAILED = -53003, 89 ERR_DH_SCREEN_CODEC_STOP_FAILED = -53004, 90 ERR_DH_SCREEN_CODEC_SET_CALLBACK_FAILED = -53005, 91 ERR_DH_SCREEN_CODEC_CONFIGURE_FAILED = -53006, 92 ERR_DH_SCREEN_CODEC_SURFACE_ERROR = -53007, 93 // ScreenClient error code 94 ERR_DH_SCREEN_SCREENCLIENT_SHOW_WINDOW_ERROR = -54000, 95 ERR_DH_SCREEN_SCREENCLIENT_REMOVE_WINDOW_ERROR = -54001, 96 ERR_DH_SCREEN_SCREENCLIENT_ADD_WINDOW_ERROR = -54002, 97 ERR_DH_SCREEN_SCREENCLIENT_MOVE_WINDOW_ERROR = -54003, 98 ERR_DH_SCREEN_SCREENCLIENT_HIDE_WINDOW_ERROR = -54004, 99 // screen register callback 100 ERR_DH_SCREEN_REGISTER_CALLBACK_NOT_INIT = -55000, 101 // screen string param empty or screen input param invalid 102 ERR_DH_SCREEN_STRING_PARAM_EMPTY = -56000, 103 ERR_DH_SCREEN_INPUT_PARAM_INVALID = -56001, 104 }; 105 } // namespace DistributedHardware 106 } // namespace OHOS 107 #endif