188edb362Sopenharmony_ci/*
288edb362Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
388edb362Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
488edb362Sopenharmony_ci * you may not use this file except in compliance with the License.
588edb362Sopenharmony_ci * You may obtain a copy of the License at
688edb362Sopenharmony_ci *
788edb362Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
888edb362Sopenharmony_ci *
988edb362Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1088edb362Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1188edb362Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1288edb362Sopenharmony_ci * See the License for the specific language governing permissions and
1388edb362Sopenharmony_ci * limitations under the License.
1488edb362Sopenharmony_ci */
1588edb362Sopenharmony_ci
1688edb362Sopenharmony_ci#ifndef ISYS_INSTALLER_H
1788edb362Sopenharmony_ci#define ISYS_INSTALLER_H
1888edb362Sopenharmony_ci
1988edb362Sopenharmony_ci#include <iostream>
2088edb362Sopenharmony_ci#include "iremote_broker.h"
2188edb362Sopenharmony_ci#include "iremote_proxy.h"
2288edb362Sopenharmony_ci#include "isys_installer_callback.h"
2388edb362Sopenharmony_ci
2488edb362Sopenharmony_cinamespace OHOS {
2588edb362Sopenharmony_cinamespace SysInstaller {
2688edb362Sopenharmony_ciclass ISysInstaller : public OHOS::IRemoteBroker {
2788edb362Sopenharmony_cipublic:
2888edb362Sopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Updater.ISysInstaller");
2988edb362Sopenharmony_ci
3088edb362Sopenharmony_ci    virtual int32_t SysInstallerInit() = 0;
3188edb362Sopenharmony_ci    virtual int32_t StartUpdatePackageZip(const std::string &pkgPath) = 0;
3288edb362Sopenharmony_ci    virtual int32_t SetUpdateCallback(const sptr<ISysInstallerCallback> &updateCallback) = 0;
3388edb362Sopenharmony_ci    virtual int32_t GetUpdateStatus() = 0;
3488edb362Sopenharmony_ci    virtual int32_t StartUpdateParaZip(const std::string &pkgPath,
3588edb362Sopenharmony_ci        const std::string &location, const std::string &cfgDir) = 0;
3688edb362Sopenharmony_ci    virtual int32_t StartDeleteParaZip(const std::string &location, const std::string &cfgDir) = 0;
3788edb362Sopenharmony_ci    virtual int32_t AccDecompressAndVerifyPkg(const std::string &srcPath,
3888edb362Sopenharmony_ci        const std::string &dstPath, const uint32_t type) = 0;
3988edb362Sopenharmony_ci    virtual int32_t AccDeleteDir(const std::string &dstPath) = 0;
4088edb362Sopenharmony_ci};
4188edb362Sopenharmony_ci} // namespace SysInstaller
4288edb362Sopenharmony_ci} // namespace OHOS
4388edb362Sopenharmony_ci#endif // ISYS_INSTALLER_H
44