~thomas-voss/trust-store/add-click-based-package-name-query

« back to all changes in this revision

Viewing changes to src/core/trust/click/manifest.h

  • Committer: thomas-voss
  • Date: 2014-08-21 08:07:29 UTC
  • Revision ID: thomas.voss@canonical.com-20140821080729-sihlhaifeibhicqt
Add an interface to installed click packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2014 Canonical Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU Lesser General Public License version 3,
 
6
 * as published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by: Thomas Voß <thomas.voss@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef CLICK_MANIFEST_H_
 
20
#define CLICK_MANIFEST_H_
 
21
 
 
22
namespace click
 
23
{
 
24
/**
 
25
 * @brief Describes the click package contents, in JSON format.
 
26
 *
 
27
 * Please see http://click.readthedocs.org/en/latest/file-format.html#manifest
 
28
 *
 
29
 */
 
30
struct Manifest
 
31
{
 
32
    /** @brief Enumerates all known JSON keys. */
 
33
    struct Json
 
34
    {
 
35
        Json() = delete;
 
36
 
 
37
        /** @brief Unique name for the application. */
 
38
        static constexpr const char* name {"name"};
 
39
        /** @brief Version number of the application. */
 
40
        static constexpr const char* version {"version"};
 
41
        /** @brief The system framework(s) for which the package was built. */
 
42
        static constexpr const char* framework {"framework"};
 
43
        /** @brief The size of the unpacked package in KiB. */
 
44
        static constexpr const char* installed_size {"installed-size"};
 
45
 
 
46
        /** @brief Short (one-line) synopsis of the application. */
 
47
        static constexpr const char* title {"title"};
 
48
        /** @brief Extended description of the application; may be multi-paragraph. */
 
49
        static constexpr const char* description {"description"};
 
50
        /** @brief Name and email address of maintainer of the application. */
 
51
        static constexpr const char* maintainer {"maintainer"};
 
52
        /**
 
53
         * @brief Icon to display in interfaces listing click packages.
 
54
         *
 
55
         * If the name refers to an existing file when resolved relative to the
 
56
         * base directory of the package, the given file will be used; if not,
 
57
         * the algorithm described in the Icon Theme Specification will be used
 
58
         * to locate the icon
 
59
         */
 
60
        static constexpr const char* icon {"icon"};
 
61
    };
 
62
};
 
63
}
 
64
 
 
65
#endif // CLICK_MANIFEST_H_