Line data Source code
1 : /**
2 : * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 :
11 : #include "package_manager.h"
12 :
13 : namespace tsd {
14 :
15 366 : PackageManager::PackageManager(
16 : uint32_t logicDeviceId, DeviceCommAgent& commAgent, CapabilityManager& capabilityMgr, uint32_t platInfoMode,
17 366 : bool isAdcEnv, uint32_t chipType)
18 366 : : envInfo_(logicDeviceId, platInfoMode, isAdcEnv, chipType),
19 366 : hashStore_(),
20 366 : ctx_(),
21 366 : pluginVersion_(envInfo_, hashStore_, ctx_),
22 366 : commAgent_(commAgent),
23 366 : capabilityMgr_(capabilityMgr),
24 366 : checkCodeSvc_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_),
25 366 : sender_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_, checkCodeSvc_),
26 366 : loader_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_, sender_, checkCodeSvc_, pluginVersion_)
27 366 : {}
28 :
29 21 : void PackageManager::ResetOnClose() { loader_.Reset(); }
30 :
31 : } // namespace tsd
|