Go to the documentation of this file.
32 class QNetworkAccessManager;
36 class Ssu:
public QObject
43 Q_PROPERTY(DeviceModeFlags deviceMode READ deviceMode CONSTANT)
44 Q_PROPERTY(QString domain READ domain CONSTANT)
76 Q_FLAGS(DeviceModeFlags)
109 QPair<QString, QString>
credentials(
const QString &scope);
129 Q_INVOKABLE
bool error();
140 QString
repoUrl(
const QString &repoName,
bool rndRepo =
false,
141 QHash<QString, QString> repoParameters = QHash<QString, QString>(),
142 QHash<QString, QString> parametersOverride = QHash<QString, QString>());
158 Q_INVOKABLE DeviceModeFlags deviceMode();
160 Q_INVOKABLE QString domain();
162 Q_INVOKABLE QString
brand();
168 Q_INVOKABLE QString
release(
bool rnd =
false);
176 Q_INVOKABLE
void setDomain(
const QString &domain);
180 Q_INVOKABLE QStringList listDomains();
181 Q_INVOKABLE
void setDomainConfig(
const QString &domain, QVariantMap config);
182 Q_INVOKABLE QVariantMap getDomainConfig(
const QString &domain);
186 QNetworkAccessManager *manager;
188 bool registerDevice(QDomDocument *response);
189 bool setCredentials(QDomDocument *response);
190 bool verifyResponse(QDomDocument *response);
191 void storeAuthorizedKeys(
const QByteArray &data);
194 void requestFinished(QNetworkReply *reply);
199 void setError(
const QString &errorMessage);
238 void credentialsChanged();
241 Q_DECLARE_OPERATORS_FOR_FLAGS(Ssu::DeviceModeFlags)
void updateCredentials(bool force=false)
Q_INVOKABLE QString flavour()
See SsuCoreConfig::flavour.
@ ReleaseMode
Enable Release mode.
@ Add
Make sure the given value is set in the bitmask.
QString credentialsUrl(const QString &scope)
Q_INVOKABLE QString brand()
See SsuCoreConfig::brand.
void sendRegistration(const QString &username, const QString &password)
Q_INVOKABLE void setFlavour(const QString &flavour)
See SsuCoreConfig::setFlavour.
@ NoFilter
All repositories (global + user)
Q_INVOKABLE void setDeviceMode(DeviceModeFlags mode, enum EditMode editMode=Replace)
See SsuCoreConfig::setDeviceMode.
@ Remove
Make sure the given value is not set in the bitmask.
@ RndMode
Enable RnD mode for device.
Q_INVOKABLE bool useSslVerify()
See SsuCoreConfig::useSslVerify.
@ UpdateMode
Do repo isolation and similar bits important for updating devices.
Q_INVOKABLE bool isRegistered()
See SsuCoreConfig::isRegistered.
QPair< QString, QString > credentials(const QString &scope)
Q_INVOKABLE QDateTime lastCredentialsUpdate()
See SsuCoreConfig::lastCredentialsUpdate.
void updateStoreCredentials()
@ DisableRepoManager
Disable automagic repository management.
Q_INVOKABLE void setDomain(const QString &domain)
See SsuCoreConfig::setDomain.
QString repoUrl(const QString &repoName, bool rndRepo=false, QHash< QString, QString > repoParameters=QHash< QString, QString >(), QHash< QString, QString > parametersOverride=QHash< QString, QString >())
@ LenientMode
Disable strict mode (i.e., keep unmanaged repositories)
Q_INVOKABLE void unregister()
QString credentialsScope(const QString &repoName, bool rndRepo=false)
Q_INVOKABLE QString lastError()
Q_INVOKABLE QString release(bool rnd=false)
See SsuCoreConfig::release.
void registrationStatusChanged()
@ Replace
Replace the old value with the new one.
@ DeviceModel
Marketed device name, like Pogoblaster 3000. Board mappings key "prettyModel".
@ AppInstallMode
Do repo isolation, but keep store repository enabled.
@ DeviceManufacturer
Manufacturer, like ACME Corp. Board mappings key "deviceManufacturer".
@ BoardFilter
Only global repositories, with user blacklist ignored.
Q_INVOKABLE void setRelease(const QString &release, bool rnd=false)
See SsuCoreConfig::setRelease.
@ BoardFilterUserBlacklist
Only global repositories, with user blacklist applied.
@ DeviceDesignation
Type designation, like NCC-1701. Beard mappings key "deviceDesignation".
@ UserFilter
Only user configured repositories.