/* * Copyright (C) 2021-2022 Riyyi * * SPDX-License-Identifier: MIT */ #pragma once #include // uint8_t #include #include #include #include "ruc/singleton.h" class Package : public ruc::Singleton { public: Package(s); virtual ~Package(); enum class Distro : uint8_t { Unsupported, Arch, Debian, }; enum class InstallType : uint8_t { Install, AurInstall, }; void aurInstall(); void install(); void list(const std::vector& targets = {}); void store(); private: std::optional fetchAurHelper(); void installOrAurInstall(InstallType type); bool findDependency(const std::string& search); bool distroDetect(); bool distroDependencies(); std::optional getPackageList(); Distro m_distro { Distro::Unsupported }; };