~ken-vandine/ubuntu-system-settings/depends_qml_module_ofono

« back to all changes in this revision

Viewing changes to plugins/system-update/helpers.h

merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of system-settings
 
3
 *
 
4
 * Copyright (C) 2013-2016 Canonical Ltd.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 3, as published
 
8
 * by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
12
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef SYSTEM_UPDATE_HELPERS_H
 
20
#define SYSTEM_UPDATE_HELPERS_H
 
21
 
 
22
#include <sstream>
 
23
#include <vector>
 
24
#include <QString>
 
25
#include <QDebug>
 
26
#include <QDir>
 
27
 
 
28
namespace UpdatePlugin
 
29
{
 
30
class Helpers
 
31
{
 
32
public:
 
33
    static QString getFrameworksDir();
 
34
    static std::vector<std::string> getAvailableFrameworks();
 
35
    static std::string getArchitecture();
 
36
    static QString clickMetadataUrl();
 
37
    static bool isIgnoringCredentials();
 
38
    static QString whichClick();
 
39
    static QString whichPkcon();
 
40
private:
 
41
    static std::string architectureFromDpkg();
 
42
    static std::vector<std::string> listFolder(const std::string &folder,
 
43
                                               const std::string &pattern);
 
44
};
 
45
} // UpdatePlugin
 
46
 
 
47
#endif // SYSTEM_UPDATE_HELPERS_H