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 "iremote_broker.h"
24 
25 namespace OHOS {
26 namespace AppExecFwk {
27 class IExtendResourceManager : public IRemoteBroker {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.bundleManager.ExtendResourceManager");
30 
AddExtResource(const std::string & bundleName,const std::vector<std::string> & filePaths)31     virtual ErrCode AddExtResource(
32         const std::string &bundleName, const std::vector<std::string> &filePaths)
33     {
34         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
35     }
36 
RemoveExtResource(const std::string & bundleName,const std::vector<std::string> & moduleNames)37     virtual ErrCode RemoveExtResource(
38         const std::string &bundleName, const std::vector<std::string> &moduleNames)
39     {
40         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
41     }
42 
GetExtResource(const std::string & bundleName,std::vector<std::string> & moduleNames)43     virtual ErrCode GetExtResource(
44         const std::string &bundleName, std::vector<std::string> &moduleNames)
45     {
46         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
47     }
48 
EnableDynamicIcon(const std::string & bundleName,const std::string & moudleName)49     virtual ErrCode EnableDynamicIcon(
50         const std::string &bundleName, const std::string &moudleName)
51     {
52         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
53     }
54 
DisableDynamicIcon(const std::string & bundleName)55     virtual ErrCode DisableDynamicIcon(const std::string &bundleName)
56     {
57         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
58     }
59 
GetDynamicIcon(const std::string & bundleName,std::string & moudleName)60     virtual ErrCode GetDynamicIcon(const std::string &bundleName, std::string &moudleName)
61     {
62         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
63     }
64 
CreateFd(const std::string & fileName,int32_t & fd,std::string & path)65     virtual ErrCode CreateFd(const std::string &fileName, int32_t &fd, std::string &path)
66     {
67         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
68     }
69 
CopyFiles(const std::vector<std::string> & sourceFiles,std::vector<std::string> & destFiles)70     virtual ErrCode CopyFiles(
71         const std::vector<std::string> &sourceFiles, std::vector<std::string> &destFiles)
72     {
73         return ERR_BUNDLEMANAGER_QUICK_FIX_INTERNAL_ERROR;
74     }
75 };
76 } // AppExecFwk
77 } // OHOS
78 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_EXTEND_RESOURCE_MGR_INTERFACE_H