1 /* 2 * Copyright (C) 2021 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 #ifndef MEDIA_ERRORS_H 16 #define MEDIA_ERRORS_H 17 18 #include <map> 19 #include <string> 20 #include "errors.h" 21 #include "media_core.h" 22 23 namespace OHOS { 24 namespace Media { 25 26 __attribute__((visibility("default"))) std::string MSErrorToString(MediaServiceErrCode code); 27 __attribute__((visibility("default"))) std::string MSExtErrorToString(MediaServiceExtErrCode code); 28 __attribute__((visibility("default"))) std::string MSErrorToExtErrorString(MediaServiceErrCode code); 29 __attribute__((visibility("default"))) MediaServiceExtErrCode MSErrorToExtError(MediaServiceErrCode code); 30 31 __attribute__((visibility("default"))) std::string MSExtErrorAPI9ToString(MediaServiceExtErrCodeAPI9 code, 32 const std::string& param1, const std::string& param2); 33 __attribute__((visibility("default"))) std::string MSErrorToExtErrorAPI9String(MediaServiceErrCode code, 34 const std::string& param1, const std::string& param2); 35 __attribute__((visibility("default"))) MediaServiceExtErrCodeAPI9 MSErrorToExtErrorAPI9(MediaServiceErrCode code); 36 37 __attribute__((visibility("default"))) std::string MSExtAVErrorToString(MediaServiceExtErrCodeAPI9 code); 38 __attribute__((visibility("default"))) bool IsAPI14IOError(MediaServiceErrCode code); 39 } // namespace Media 40 } // namespace OHOS 41 #endif // MEDIA_ERRORS_H 42