Debian Codegraph @

liblomiri-app-launch/app-store-snap.h

raw
1 /*
2 * Copyright © 2017 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Ted Gould <[email protected]>
18 */
19
20 #pragma once
21
22 #include "app-store-base.h"
23
24 namespace lomiri
25 {
26 namespace app_launch
27 {
28 namespace app_store
29 {
30
31 class Snap : public Base
32 {
33 public:
34 Snap(const std::shared_ptr<Registry::Impl>& registry);
35 virtual ~Snap();
36
37 /* Discover tools */
38 virtual bool verifyPackage(const AppID::Package& package) override;
39 virtual bool verifyAppname(const AppID::Package& package, const AppID::AppName& appname) override;
40 virtual AppID::AppName findAppname(const AppID::Package& package, AppID::ApplicationWildcard card) override;
41 virtual AppID::Version findVersion(const AppID::Package& package, const AppID::AppName& appname) override;
42 virtual bool hasAppId(const AppID& appid) override;
43
44 /* Possible apps */
45 virtual std::list<std::shared_ptr<Application>> list() override;
46
47 /* Application Creation */
48 virtual std::shared_ptr<app_impls::Base> create(const AppID& appid) override;
49 };
50
51 } // namespace app_store
52 } // namespace app_launch
53 } // namespace lomiri