/* * Copyright © 2017 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . * * Authors: * Ted Gould */ #pragma once #include "app-store-base.h" #include namespace lomiri { namespace app_launch { namespace app_store { class Legacy : public Base { public: Legacy(const std::shared_ptr& registry); virtual ~Legacy(); /* Discover tools */ virtual bool verifyPackage(const AppID::Package& package) override; virtual bool verifyAppname(const AppID::Package& package, const AppID::AppName& appname) override; virtual AppID::AppName findAppname(const AppID::Package& package, AppID::ApplicationWildcard card) override; virtual AppID::Version findVersion(const AppID::Package& package, const AppID::AppName& appname) override; virtual bool hasAppId(const AppID& appid) override; /* Possible apps */ virtual std::list> list() override; /* Application Creation */ virtual std::shared_ptr create(const AppID& appid) override; /* Info watching */ virtual core::Signal&>& infoChanged() override; virtual core::Signal&>& appAdded() override; virtual core::Signal& appRemoved() override; private: std::set> monitors_; std::once_flag monitorsSetup_; void directoryChanged(GFile* file, GFileMonitorEvent type); void setupMonitors(); }; } // namespace app_store } // namespace app_launch } // namespace lomiri