• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 OHOS_AAFWK_IQUICKFIXMANAGER_H
17#define OHOS_AAFWK_IQUICKFIXMANAGER_H
18
19#include <cstdint>
20#include <vector>
21#include <iremote_broker.h>
22#include <string_ex.h>
23#include "quick_fix_info.h"
24
25using OHOS::AAFwk::ApplicationQuickFixInfo;
26
27namespace OHOS {
28namespace AAFwk {
29
30enum class IQuickFixManagerIpcCode {
31    COMMAND_APPLY_QUICK_FIX = MIN_TRANSACTION_ID,
32    COMMAND_GET_APPLYED_QUICK_FIX_INFO,
33    COMMAND_REVOKE_QUICK_FIX,
34};
35
36class IQuickFixManager : public IRemoteBroker {
37public:
38    DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.AAFwk.IQuickFixManager");
39
40    virtual ErrCode ApplyQuickFix(
41        const std::vector<std::string>& quickFixFiles,
42        bool isDebug) = 0;
43
44    virtual ErrCode GetApplyedQuickFixInfo(
45        const std::string& bundleName,
46        ApplicationQuickFixInfo& quickFixInfo) = 0;
47
48    virtual ErrCode RevokeQuickFix(
49        const std::string& bundleName) = 0;
50protected:
51    const int VECTOR_MAX_SIZE = 102400;
52    const int LIST_MAX_SIZE = 102400;
53    const int SET_MAX_SIZE = 102400;
54    const int MAP_MAX_SIZE = 102400;
55};
56} // namespace AAFwk
57} // namespace OHOS
58#endif // OHOS_AAFWK_IQUICKFIXMANAGER_H
59
60