Skip to content

Latest commit

 

History

History
92 lines (76 loc) · 1.7 KB

ssucli.h

File metadata and controls

92 lines (76 loc) · 1.7 KB
 
Oct 8, 2012
Oct 8, 2012
1
/**
Aug 20, 2014
Aug 20, 2014
2
* @file ssucli.h
Oct 8, 2012
Oct 8, 2012
3
4
5
6
7
* @copyright 2012 Jolla Ltd.
* @author Bernd Wachter <bernd.wachter@jollamobile.com>
* @date 2012
*/
Aug 20, 2014
Aug 20, 2014
8
9
#ifndef _SsuCli_H
#define _SsuCli_H
Oct 8, 2012
Oct 8, 2012
10
11
12
#include <QObject>
#include <QSettings>
Apr 4, 2013
Apr 4, 2013
13
#include <QStringList>
Oct 8, 2012
Oct 8, 2012
14
15
#include <QDebug>
Apr 4, 2013
Apr 4, 2013
16
#include "libssu/ssu.h"
Jul 11, 2018
Jul 11, 2018
17
#include "ssu_interface.h"
Oct 8, 2012
Oct 8, 2012
18
Oct 10, 2016
Oct 10, 2016
19
20
class SsuCli: public QObject
{
Oct 8, 2012
Oct 8, 2012
21
22
Q_OBJECT
Oct 10, 2016
Oct 10, 2016
23
public:
Aug 20, 2014
Aug 20, 2014
24
25
SsuCli();
~SsuCli();
Oct 8, 2012
Oct 8, 2012
26
Oct 10, 2016
Oct 10, 2016
27
public slots:
Oct 8, 2012
Oct 8, 2012
28
29
void run();
Oct 10, 2016
Oct 10, 2016
30
private:
Oct 8, 2012
Oct 8, 2012
31
Ssu ssu;
Sep 3, 2013
Sep 3, 2013
32
SsuProxy *ssuProxy;
Oct 8, 2012
Oct 8, 2012
33
QSettings settings;
Mar 30, 2013
Mar 30, 2013
34
int state;
May 24, 2017
May 24, 2017
35
void usage(const QString &message = QString());
May 23, 2017
May 23, 2017
36
void uidWarning();
Jul 4, 2013
Jul 4, 2013
37
void optDomain(QStringList opt);
Mar 30, 2013
Mar 30, 2013
38
39
void optFlavour(QStringList opt);
void optMode(QStringList opt);
Apr 10, 2013
Apr 10, 2013
40
void optModel(QStringList opt);
Aug 27, 2013
Aug 27, 2013
41
void optRegister(QStringList opt);
Mar 30, 2013
Mar 30, 2013
42
43
void optRelease(QStringList opt);
void optRepos(QStringList opt);
Jan 4, 2015
Jan 4, 2015
44
void optSet(QStringList opt);
Aug 20, 2014
Aug 20, 2014
45
void optStatus(QStringList opt);
Mar 30, 2013
Mar 30, 2013
46
void optUpdateCredentials(QStringList opt);
Aug 20, 2014
Aug 20, 2014
47
void optUpdateRepos(QStringList opt);
Mar 30, 2013
Mar 30, 2013
48
49
enum Actions {
May 24, 2017
May 24, 2017
50
51
52
53
Remove,
Add,
Disable,
Enable
Mar 30, 2013
Mar 30, 2013
54
55
};
Aug 20, 2014
Aug 20, 2014
56
57
void optModifyRepo(enum Actions action, QStringList opt);
Oct 10, 2016
Oct 10, 2016
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
void optAddRepo(QStringList opt)
{
optModifyRepo(Add, opt);
}
void optRemoveRepo(QStringList opt)
{
optModifyRepo(Remove, opt);
}
void optEnableRepo(QStringList opt)
{
optModifyRepo(Enable, opt);
}
void optDisableRepo(QStringList opt)
{
optModifyRepo(Disable, opt);
}
Aug 20, 2014
Aug 20, 2014
74
Mar 30, 2013
Mar 30, 2013
75
enum State {
Oct 10, 2016
Oct 10, 2016
76
77
78
Idle,
Busy,
UserError
Mar 30, 2013
Mar 30, 2013
79
};
Oct 8, 2012
Oct 8, 2012
80
May 11, 2017
May 11, 2017
81
82
QString fallingBackToDirectUse(const QDBusError &error) const;
Oct 10, 2016
Oct 10, 2016
83
private slots:
Oct 8, 2012
Oct 8, 2012
84
void handleResponse();
Sep 3, 2013
Sep 3, 2013
85
void handleDBusResponse();
Oct 8, 2012
Oct 8, 2012
86
Oct 10, 2016
Oct 10, 2016
87
signals:
Oct 8, 2012
Oct 8, 2012
88
89
90
91
92
void done();
};
#endif