• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_QUICK_FIX_MANAGER_INTERFACE_H
17 #define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_QUICK_FIX_MANAGER_INTERFACE_H
18 
19 #include "appexecfwk_errors.h"
20 #include "quick_fix_status_callback_interface.h"
21 #include "iremote_broker.h"
22 
23 #include <vector>
24 #include <string>
25 
26 namespace OHOS {
27 namespace AppExecFwk {
28 class IQuickFixManager : public IRemoteBroker {
29 public:
30     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.bundleManager.QuickFixManager");
31 
32     virtual ErrCode DeployQuickFix(const std::vector<std::string> &bundleFilePaths,
33         const sptr<IQuickFixStatusCallback> &statusCallback, bool isDebug = false, const std::string &targetPath = "",
34         bool isReplace = false)
35     {
36         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
37     }
38 
SwitchQuickFix(const std::string & bundleName,bool enable,const sptr<IQuickFixStatusCallback> & statusCallback)39     virtual ErrCode SwitchQuickFix(const std::string &bundleName, bool enable,
40         const sptr<IQuickFixStatusCallback> &statusCallback)
41     {
42         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
43     }
44 
DeleteQuickFix(const std::string & bundleName,const sptr<IQuickFixStatusCallback> & statusCallback)45     virtual ErrCode DeleteQuickFix(const std::string &bundleName,
46         const sptr<IQuickFixStatusCallback> &statusCallback)
47     {
48         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
49     }
50 
CreateFd(const std::string & fileName,int32_t & fd,std::string & path)51     virtual ErrCode CreateFd(const std::string &fileName, int32_t &fd, std::string &path)
52     {
53         return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR;
54     }
55 
CopyFiles(const std::vector<std::string> & sourceFiles,std::vector<std::string> & destFiles)56     virtual ErrCode CopyFiles(const std::vector<std::string> &sourceFiles, std::vector<std::string> &destFiles)
57     {
58         return ERR_BUNDLEMANAGER_QUICK_FIX_INTERNAL_ERROR;
59     }
60 };
61 } // AppExecFwk
62 } // OHOS
63 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_QUICK_FIX_MANAGER_INTERFACE_H