1 /* 2 * Copyright (c) 2024 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 RESSCHED_EXECUTOR_INTERFACES_INNERKITS_RESSCHED_EXECUTOR_CLIENT_INCLUDE_RES_SCHED_EXE_CONSTANTS_H 17 #define RESSCHED_EXECUTOR_INTERFACES_INNERKITS_RESSCHED_EXECUTOR_CLIENT_INCLUDE_RES_SCHED_EXE_CONSTANTS_H 18 19 #include <cstdint> 20 21 namespace OHOS { 22 namespace ResourceSchedule { 23 enum ResIpcType : uint32_t { 24 REQUEST_SEND_SYNC = 0, 25 REQUEST_SEND_ASYNC, 26 REQUEST_KILL_PROCESS, 27 REQUEST_SEND_DEBUG, 28 }; 29 30 /** 31 * common error code 32 */ 33 enum ResErrCode : int32_t { 34 // no error 35 RSSEXE_NO_ERR = 0, 36 // permission denied 37 RSSEXE_PERMISSION_DENIED, 38 // last error code, unesd, please add error code before 39 RSSEXE_LAST_ERR, 40 }; 41 42 /** 43 * ipc error code 44 */ 45 enum ResIpcErrCode : int32_t { 46 // plugin deliever res error 47 RSSEXE_PLUGIN_ERROR = -1, 48 // ipc send data read/write error 49 RSSEXE_DATA_ERROR = ResErrCode::RSSEXE_LAST_ERR, 50 // client call proxy error 51 RSSEXE_REQUEST_FAIL, 52 // send request by ipc error 53 RSSEXE_SEND_REQUEST_FAIL, 54 // client get ressched_executor serveice error 55 RSSEXE_GET_SERVICE_FAIL, 56 // client connect to ressched_executor serveice error 57 RSSEXE_CONNECT_FAIL, 58 }; 59 } // namespace ResourceSchedule 60 } // namespace OHOS 61 62 #endif // RESSCHED_EXECUTOR_INTERFACES_INNERKITS_RESSCHED_EXECUTOR_CLIENT_INCLUDE_RES_SCHED_EXE_CONSTANTS_H 63