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 FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_EXTEND_RESOURCE_MGR_INTERFACE_H 17 #define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_EXTEND_RESOURCE_MGR_INTERFACE_H 18 19 #include <vector> 20 #include <string> 21 22 #include "appexecfwk_errors.h" 23 #include "dynamic_icon_info.h" 24 #include "iremote_broker.h" 25 26 namespace OHOS { 27 namespace AppExecFwk { 28 class IExtendResourceManager : public IRemoteBroker { 29 public: 30 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.bundleManager.ExtendResourceManager"); 31 AddExtResource(const std::string & bundleName,const std::vector<std::string> & filePaths)32 virtual ErrCode AddExtResource( 33 const std::string &bundleName, const std::vector<std::string> &filePaths) 34 { 35 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 36 } 37 RemoveExtResource(const std::string & bundleName,const std::vector<std::string> & moduleNames)38 virtual ErrCode RemoveExtResource( 39 const std::string &bundleName, const std::vector<std::string> &moduleNames) 40 { 41 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 42 } 43 GetExtResource(const std::string & bundleName,std::vector<std::string> & moduleNames)44 virtual ErrCode GetExtResource( 45 const std::string &bundleName, std::vector<std::string> &moduleNames) 46 { 47 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 48 } 49 EnableDynamicIcon(const std::string & bundleName,const std::string & moduleName)50 virtual ErrCode EnableDynamicIcon( 51 const std::string &bundleName, const std::string &moduleName) 52 { 53 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 54 } 55 EnableDynamicIcon(const std::string & bundleName,const std::string & moduleName,const int32_t userId,const int32_t appIndex)56 virtual ErrCode EnableDynamicIcon( 57 const std::string &bundleName, const std::string &moduleName, const int32_t userId, const int32_t appIndex) 58 { 59 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 60 } 61 DisableDynamicIcon(const std::string & bundleName)62 virtual ErrCode DisableDynamicIcon(const std::string &bundleName) 63 { 64 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 65 } 66 DisableDynamicIcon(const std::string & bundleName,const int32_t userId,const int32_t appIndex)67 virtual ErrCode DisableDynamicIcon(const std::string &bundleName, const int32_t userId, const int32_t appIndex) 68 { 69 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 70 } 71 GetDynamicIcon(const std::string & bundleName,std::string & moduleName)72 virtual ErrCode GetDynamicIcon(const std::string &bundleName, std::string &moduleName) 73 { 74 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 75 } 76 GetDynamicIcon(const std::string & bundleName,const int32_t userId,const int32_t appIndex,std::string & moduleName)77 virtual ErrCode GetDynamicIcon(const std::string &bundleName, const int32_t userId, 78 const int32_t appIndex, std::string &moduleName) 79 { 80 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 81 } 82 CreateFd(const std::string & fileName,int32_t & fd,std::string & path)83 virtual ErrCode CreateFd(const std::string &fileName, int32_t &fd, std::string &path) 84 { 85 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 86 } 87 CopyFiles(const std::vector<std::string> & sourceFiles,std::vector<std::string> & destFiles)88 virtual ErrCode CopyFiles( 89 const std::vector<std::string> &sourceFiles, std::vector<std::string> &destFiles) 90 { 91 return ERR_BUNDLEMANAGER_QUICK_FIX_INTERNAL_ERROR; 92 } 93 GetAllDynamicIconInfo(std::vector<DynamicIconInfo> & dynamicInfos)94 virtual ErrCode GetAllDynamicIconInfo(std::vector<DynamicIconInfo> &dynamicInfos) 95 { 96 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 97 } 98 GetAllDynamicIconInfo(const int32_t userId,std::vector<DynamicIconInfo> & dynamicInfos)99 virtual ErrCode GetAllDynamicIconInfo(const int32_t userId, std::vector<DynamicIconInfo> &dynamicInfos) 100 { 101 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 102 } 103 GetDynamicIconInfo(const std::string & bundleName,std::vector<DynamicIconInfo> & dynamicInfos)104 virtual ErrCode GetDynamicIconInfo(const std::string &bundleName, std::vector<DynamicIconInfo> &dynamicInfos) 105 { 106 return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; 107 } 108 }; 109 } // AppExecFwk 110 } // OHOS 111 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_EXTEND_RESOURCE_MGR_INTERFACE_H