Skip to content

Latest commit

 

History

History
74 lines (61 loc) · 1.51 KB

ssud.h

File metadata and controls

74 lines (61 loc) · 1.51 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
16
#include "libssu/ssu.h"
Oct 10, 2016
Oct 10, 2016
17
18
class Ssud: public QObject
{
19
20
Q_OBJECT
Oct 10, 2016
Oct 10, 2016
21
22
public:
Ssud(QObject *parent = NULL);
23
24
virtual ~Ssud();
Oct 10, 2016
Oct 10, 2016
25
public slots:
Sep 4, 2013
Sep 4, 2013
26
/* device info */
27
QString deviceModel();
Sep 4, 2013
Sep 4, 2013
28
QString deviceFamily();
29
QString deviceUid();
Sep 4, 2013
Sep 4, 2013
30
QString deviceVariant();
Oct 24, 2013
Oct 24, 2013
31
QString displayName(int type);
Sep 4, 2013
Sep 4, 2013
32
/* credential management */
33
34
35
bool isRegistered();
void registerDevice(const QString &username, const QString &password);
void unregisterDevice();
Oct 30, 2015
Oct 30, 2015
36
QString domain();
Sep 4, 2013
Sep 4, 2013
37
/* repository management */
Feb 2, 2015
Feb 2, 2015
38
Ssu::DeviceModeFlags deviceMode();
Aug 24, 2015
Aug 24, 2015
39
40
void setDeviceMode(int mode);
void setDeviceMode(int mode, int editMode);
Sep 4, 2013
Sep 4, 2013
41
42
43
44
45
46
47
48
49
50
51
52
53
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();
bool error();
QString lastError();
void quit();
Oct 10, 2016
Oct 10, 2016
55
signals:
56
57
58
59
void done();
void credentialsChanged();
void registrationStatusChanged();
Oct 10, 2016
Oct 10, 2016
60
private:
61
62
63
Ssu ssu;
static const char *SERVICE_NAME;
static const char *OBJECT_PATH;
Oct 24, 2013
Oct 24, 2013
64
QTimer autoclose;
Sep 4, 2013
Sep 4, 2013
65
66
enum Actions {
Oct 10, 2016
Oct 10, 2016
67
68
69
70
Remove = 0,
Add = 1,
Disable = 2,
Enable = 3,
Sep 4, 2013
Sep 4, 2013
71
};
72
73
74
};
#endif