Skip to content

Latest commit

 

History

History
77 lines (64 loc) · 1.57 KB

ssud.h

File metadata and controls

77 lines (64 loc) · 1.57 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
/**
* @file ssud.h
* @copyright 2013 Jolla Ltd.
* @author Bernd Wachter <bwachter@lart.info>
* @date 2013
*/
#ifndef _SSUD_H
#define _SSUD_H
#include <QObject>
#include <QString>
Oct 24, 2013
Oct 24, 2013
13
#include <QTimer>
14
15
#include "libssu/ssu.h"
Jul 11, 2018
Jul 11, 2018
16
#include "ssud_dbus.h"
Oct 10, 2016
Oct 10, 2016
18
19
class Ssud: public QObject
{
20
21
Q_OBJECT
Oct 10, 2016
Oct 10, 2016
22
23
public:
Ssud(QObject *parent = NULL);
24
25
virtual ~Ssud();
Oct 10, 2016
Oct 10, 2016
26
public slots:
Sep 4, 2013
Sep 4, 2013
27
/* device info */
28
QString deviceModel();
Sep 4, 2013
Sep 4, 2013
29
QString deviceFamily();
30
QString deviceUid();
Sep 4, 2013
Sep 4, 2013
31
QString deviceVariant();
Oct 24, 2013
Oct 24, 2013
32
QString displayName(int type);
Sep 4, 2013
Sep 4, 2013
33
/* credential management */
34
35
36
bool isRegistered();
void registerDevice(const QString &username, const QString &password);
void unregisterDevice();
Oct 30, 2015
Oct 30, 2015
37
QString domain();
Sep 4, 2013
Sep 4, 2013
38
/* repository management */
Apr 18, 2019
Apr 18, 2019
39
QString brand();
Jan 10, 2018
Jan 10, 2018
40
int deviceMode();
Aug 24, 2015
Aug 24, 2015
41
42
void setDeviceMode(int mode);
void setDeviceMode(int mode, int editMode);
Sep 4, 2013
Sep 4, 2013
43
44
45
46
47
48
49
QString flavour();
void setFlavour(const QString &release);
QString release(bool rnd);
void setRelease(const QString &release, bool rnd);
void modifyRepo(int action, const QString &repo);
void addRepo(const QString &repo, const QString &url);
void updateRepos();
Jul 11, 2018
Jul 11, 2018
50
QList<SsuRepo> listRepos(bool rnd);
Sep 4, 2013
Sep 4, 2013
51
52
53
54
55
56
bool error();
QString lastError();
void quit();
Oct 10, 2016
Oct 10, 2016
58
signals:
59
60
61
62
void done();
void credentialsChanged();
void registrationStatusChanged();
Oct 10, 2016
Oct 10, 2016
63
private:
64
65
66
Ssu ssu;
static const char *SERVICE_NAME;
static const char *OBJECT_PATH;
Oct 24, 2013
Oct 24, 2013
67
QTimer autoclose;
Sep 4, 2013
Sep 4, 2013
68
69
enum Actions {
Oct 10, 2016
Oct 10, 2016
70
71
72
73
Remove = 0,
Add = 1,
Disable = 2,
Enable = 3,
Sep 4, 2013
Sep 4, 2013
74
};
75
76
77
};
#endif