+// Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "hybrid/hybrid_installer_factory.h"
+
+#include <unzip.h>
+
+#include <manifest_parser/utils/logging.h>
+#include <hybrid/hybrid_installer.h>
+#include <wgt/utils/wgt_app_query_interface.h>
+#include <wgt/wgt_installer.h>
+
+#include <map>
+#include <memory>
+#include <string>
+
+#include "common/pkgmgr_interface.h"
+#include "common/pkgmgr_query.h"
+
+namespace ci = common_installer;
+
+namespace hybrid {
+
+std::unique_ptr<ci::AppInstaller> HybridInstallerFactory::CreateInstaller(
+ ci::PkgMgrPtr pkgmgr, int idx) {
+ std::unique_ptr<ci::AppInstaller> installer;
+ wgt::WgtAppQueryInterface* wgt_aqi = new wgt::WgtAppQueryInterface();
+
+ pkgmgr->AddAppQueryInterface(idx, wgt_aqi);
+ installer.reset(new hybrid::HybridInstaller(pkgmgr));
+ installer->SetIndex(idx);
+
+ return installer;
+}
+
+} // namespace hybrid