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 365 : PackageManager::PackageManager(
16 : uint32_t logicDeviceId, DeviceCommAgent& commAgent, CapabilityManager& capabilityMgr, uint32_t platInfoMode,
17 365 : bool isAdcEnv, uint32_t chipType)
18 365 : : envInfo_(logicDeviceId, platInfoMode, isAdcEnv, chipType),
19 365 : hashStore_(),
20 365 : ctx_(),
21 365 : pluginVersion_(envInfo_, hashStore_, ctx_),
22 365 : commAgent_(commAgent),
23 365 : capabilityMgr_(capabilityMgr),
24 365 : checkCodeSvc_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_),
25 365 : sender_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_, checkCodeSvc_),
26 365 : loader_(commAgent_, capabilityMgr_, envInfo_, hashStore_, ctx_, sender_, checkCodeSvc_, pluginVersion_)
27 365 : {}
28 :
29 21 : void PackageManager::ResetOnClose() { loader_.Reset(); }
30 :
31 : } // namespace tsd
|