Add desktop notifications, enable enrolling when the wizard is displayed
This commit is contained in:
committed by
Patrick Nicolas
parent
59192bac6c
commit
2aa12de520
@@ -107,6 +107,38 @@ void wivrn_server::on_server_properties_changed(const QString & interface_name,
|
||||
pinChanged(m_pin = changed_properties["Pin"].toString());
|
||||
}
|
||||
|
||||
if (changed_properties.contains("KnownKeys"))
|
||||
{
|
||||
m_knownKeys.clear();
|
||||
|
||||
const auto keys = qvariant_cast<QDBusArgument>(changed_properties["KnownKeys"]);
|
||||
keys.beginArray();
|
||||
|
||||
while (not keys.atEnd())
|
||||
{
|
||||
keys.beginStructure();
|
||||
QString public_key;
|
||||
QString name;
|
||||
keys >> name >> public_key;
|
||||
keys.endStructure();
|
||||
|
||||
m_knownKeys.push_back(HeadsetKey{public_key, name});
|
||||
}
|
||||
keys.endArray();
|
||||
|
||||
knownKeysChanged(m_knownKeys);
|
||||
}
|
||||
|
||||
if (changed_properties.contains("EnrollEnabled"))
|
||||
{
|
||||
enrollEnabledChanged(m_isEnrollEnabled = changed_properties["EnrollEnabled"].toBool());
|
||||
}
|
||||
|
||||
if (changed_properties.contains("EncryptionEnabled"))
|
||||
{
|
||||
encryptionEnabledChanged(m_isEncryptionEnabled = changed_properties["EncryptionEnabled"].toBool());
|
||||
}
|
||||
|
||||
if (changed_properties.contains("RecommendedEyeSize"))
|
||||
{
|
||||
const auto arg = qvariant_cast<QDBusArgument>(changed_properties["RecommendedEyeSize"]);
|
||||
@@ -210,6 +242,26 @@ void wivrn_server::setJsonConfiguration(QString new_configuration)
|
||||
server_interface->setJsonConfiguration(m_jsonConfiguration = new_configuration);
|
||||
}
|
||||
|
||||
void wivrn_server::revoke_key(QString public_key)
|
||||
{
|
||||
server_interface->RevokeKey(public_key);
|
||||
}
|
||||
|
||||
void wivrn_server::rename_key(QString public_key, QString name)
|
||||
{
|
||||
server_interface->RenameKey(public_key, name);
|
||||
}
|
||||
|
||||
QString wivrn_server::enroll_headset(int timeout_secs)
|
||||
{
|
||||
return server_interface->EnrollHeadset(timeout_secs).value();
|
||||
}
|
||||
|
||||
void wivrn_server::disable_enroll_headset()
|
||||
{
|
||||
server_interface->DisableEnrollHeadset();
|
||||
}
|
||||
|
||||
QString wivrn_server::hostname()
|
||||
{
|
||||
static auto _hostname = []() -> QString {
|
||||
|
||||
Reference in New Issue
Block a user