1 // Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #include "wgt/wgt_installer_factory.h"
9 #include <manifest_parser/utils/logging.h>
10 #include <hybrid/hybrid_installer.h>
11 #include <wgt/utils/wgt_app_query_interface.h>
12 #include <wgt/wgt_installer.h>
18 #include "common/pkgmgr_interface.h"
19 #include "common/utils/pkgmgr_query.h"
21 namespace ci = common_installer;
25 std::unique_ptr<ci::AppInstaller> WgtInstallerFactory::CreateInstaller(
26 ci::PkgMgrPtr pkgmgr, int idx) {
27 std::unique_ptr<ci::AppInstaller> installer;
28 WgtAppQueryInterface* wgt_aqi = new WgtAppQueryInterface();
30 pkgmgr->AddAppQueryInterface(idx, wgt_aqi);
31 installer.reset(new wgt::WgtInstaller(pkgmgr));
32 installer->SetIndex(idx);