From c04dcc2e7d834218ef2d4194331e383402495ae1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 20:07:22 +0200 Subject: Adding upstream version 2:20.4+dfsg. Signed-off-by: Daniel Baumann --- xbmc/addons/FilesystemInstaller.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 xbmc/addons/FilesystemInstaller.h (limited to 'xbmc/addons/FilesystemInstaller.h') diff --git a/xbmc/addons/FilesystemInstaller.h b/xbmc/addons/FilesystemInstaller.h new file mode 100644 index 0000000..d0bfdcd --- /dev/null +++ b/xbmc/addons/FilesystemInstaller.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include + +/*! + * Responsible for safely unpacking/copying/removing addon files from/to the addon folder. + */ +class CFilesystemInstaller +{ +public: + + CFilesystemInstaller(); + + /*! + * @param archive Absolute path to zip file to install. + * @param addonId + * @return true on success, otherwise false. + */ + bool InstallToFilesystem(const std::string& archive, const std::string& addonId); + + bool UnInstallFromFilesystem(const std::string& addonPath); + +private: + static bool UnpackArchive(std::string path, const std::string& dest); + + std::string m_addonFolder; + std::string m_tempFolder; +}; -- cgit v1.2.3