32class QNetworkAccessManager;
36class Ssu:
public QObject
40 friend class UrlResolverTest;
43 Q_PROPERTY(DeviceModeFlags deviceMode READ deviceMode CONSTANT)
44 Q_PROPERTY(QString domain READ domain CONSTANT)
77 Q_FLAGS(DeviceModeFlags)
110 QPair<QString, QString>
credentials(
const QString &scope);
130 Q_INVOKABLE
bool error();
141 QString
repoUrl(
const QString &repoName,
bool rndRepo =
false,
142 QHash<QString, QString> repoParameters = QHash<QString, QString>(),
143 QHash<QString, QString> parametersOverride = QHash<QString, QString>());
163 Q_INVOKABLE QString
brand();
169 Q_INVOKABLE QString
release(
bool rnd =
false);
177 Q_INVOKABLE
void setDomain(
const QString &domain);
181 Q_INVOKABLE QStringList listDomains();
182 Q_INVOKABLE
void setDomainConfig(
const QString &domain, QVariantMap config);
183 Q_INVOKABLE QVariantMap getDomainConfig(
const QString &domain);
187 QNetworkAccessManager *manager;
189 bool registerDevice(QDomDocument *response);
190 bool setCredentials(QDomDocument *response);
191 bool verifyResponse(QDomDocument *response);
192 void storeAuthorizedKeys(
const QByteArray &data);
195 void requestFinished(QNetworkReply *reply);
200 void setError(
const QString &errorMessage);
239 void credentialsChanged();
242Q_DECLARE_OPERATORS_FOR_FLAGS(Ssu::DeviceModeFlags)
Q_INVOKABLE QDateTime lastCredentialsUpdate()
See SsuCoreConfig::lastCredentialsUpdate.
QString repoUrl(const QString &repoName, bool rndRepo=false, QHash< QString, QString > repoParameters=QHash< QString, QString >(), QHash< QString, QString > parametersOverride=QHash< QString, QString >())
void sendRegistration(const QString &username, const QString &password)
void registrationStatusChanged()
@ DisableRepoManager
Disable automagic repository management.
@ ReleaseMode
Enable Release mode.
@ RndMode
Enable RnD mode for device.
@ UpdateMode
Do repo isolation and similar bits important for updating devices.
@ AppInstallMode
Do repo isolation, but keep store repository enabled.
@ LenientMode
Disable strict mode (i.e., keep unmanaged repositories).
@ Replace
Replace the old value with the new one.
@ Add
Make sure the given value is set in the bitmask.
@ Remove
Make sure the given value is not set in the bitmask.
Q_INVOKABLE QString flavour()
See SsuCoreConfig::flavour.
Q_INVOKABLE void setRelease(const QString &release, bool rnd=false)
See SsuCoreConfig::setRelease.
QPair< QString, QString > credentials(const QString &scope)
Q_INVOKABLE QString domain()
See SsuCoreConfig::domain; returns printable version.
@ DeviceModel
Marketed device name, like Pogoblaster 3000. Board mappings key "prettyModel".
@ DeviceDesignation
Type designation, like NCC-1701. Beard mappings key "deviceDesignation".
@ DeviceManufacturer
Manufacturer, like ACME Corp. Board mappings key "deviceManufacturer".
QString credentialsUrl(const QString &scope)
void updateStoreCredentials()
Q_INVOKABLE bool useSslVerify()
See SsuCoreConfig::useSslVerify.
@ UserFilter
Only user configured repositories.
@ NoFilter
All repositories (global | user).
@ UserBlacklist
User blacklist applied.
@ BoardFilter
Only global repositories.
@ Available
Include all defined repos, including disabled.
Q_INVOKABLE QString release(bool rnd=false)
See SsuCoreConfig::release.
Q_INVOKABLE bool isRegistered()
See SsuCoreConfig::isRegistered.
QString credentialsScope(const QString &repoName, bool rndRepo=false)
Q_INVOKABLE void unregister()
Q_INVOKABLE void setFlavour(const QString &flavour)
See SsuCoreConfig::setFlavour.
void updateCredentials(bool force=false)
Q_INVOKABLE void setDomain(const QString &domain)
See SsuCoreConfig::setDomain.
Q_INVOKABLE void setDeviceMode(DeviceModeFlags mode, enum EditMode editMode=Replace)
See SsuCoreConfig::setDeviceMode.
Q_INVOKABLE QString brand()
See SsuCoreConfig::brand.
Q_INVOKABLE QString lastError()
Q_INVOKABLE DeviceModeFlags deviceMode()
See SsuCoreConfig::deviceMode.