~dobey/unity-scope-click/nonclick-touch-apps

« back to all changes in this revision

Viewing changes to libclickscope/click/key_file_locator.h

  • Committer: Rodney Dawes
  • Date: 2016-09-29 20:38:00 UTC
  • mfrom: (474.1.12 unity-scope-click)
  • Revision ID: rodney.dawes@canonical.com-20160929203800-fy57d6s869irddxw
* Handle exceptions from ual when calling ::info() on apps. (LP:
  #1627759)
[ Alejandro J. Cura ]
* Do not show the link to the store scope from the apps scope
[ Rodney Dawes ]
* Switch to UAL and libclick for listing installed apps. (LP:
  #1317274)
* Add the terminal app desktop file to whitelist.
* Drop the departmentsdb and ubuntu-sdk-libs deps from binary package.
* Update the README for init-departments tool.
* Depend on dh-python and use python3:Depends. (LP: #1614679)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 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 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
 
 * In addition, as a special exception, the copyright holders give
17
 
 * permission to link the code of portions of this program with the
18
 
 * OpenSSL library under certain conditions as described in each
19
 
 * individual source file, and distribute linked combinations
20
 
 * including the two.
21
 
 * You must obey the GNU General Public License in all respects
22
 
 * for all of the code used other than OpenSSL.  If you modify
23
 
 * file(s) with this exception, you may extend this exception to your
24
 
 * version of the file(s), but you are not obligated to do so.  If you
25
 
 * do not wish to do so, delete this exception statement from your
26
 
 * version.  If you delete this exception statement from all source
27
 
 * files in the program, then also delete it here.
28
 
 */
29
 
 
30
 
#ifndef CLICK_KEY_FILE_LOCATOR_H
31
 
#define CLICK_KEY_FILE_LOCATOR_H
32
 
 
33
 
#include <functional>
34
 
#include <string>
35
 
 
36
 
namespace unity
37
 
{
38
 
namespace util
39
 
{
40
 
class IniParser;
41
 
}
42
 
}
43
 
 
44
 
namespace click
45
 
{
46
 
class KeyFileLocator
47
 
{
48
 
public:
49
 
    static const std::string& systemApplicationsDirectory();
50
 
    static const std::string& userApplicationsDirectory();
51
 
 
52
 
    typedef std::function<void(const unity::util::IniParser&, const std::string&)> Enumerator;
53
 
 
54
 
    KeyFileLocator(const std::string& systemApplicationsDir = systemApplicationsDirectory(),
55
 
                   const std::string& userApplicationsDir = userApplicationsDirectory());
56
 
    KeyFileLocator(const KeyFileLocator&) = delete;
57
 
    virtual ~KeyFileLocator() = default;
58
 
 
59
 
    KeyFileLocator& operator=(const KeyFileLocator&) = delete;
60
 
    bool operator==(const KeyFileLocator&) const = delete;
61
 
 
62
 
    virtual void enumerateKeyFilesForInstalledApplications(const Enumerator& enumerator);
63
 
 
64
 
private:
65
 
    std::string systemApplicationsDir;
66
 
    std::string userApplicationsDir;
67
 
};
68
 
}
69
 
 
70
 
#endif // CLICK_KEY_FILE_LOCATOR_H