2021-12-27 11:04:10 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var devicesModule
|
|
|
|
|
2023-03-14 02:52:16 +00:00
|
|
|
property var devicesModel: devicesModule ? devicesModule.model : null
|
2021-12-27 11:04:10 +00:00
|
|
|
|
|
|
|
// Module Properties
|
2023-03-14 02:52:16 +00:00
|
|
|
property bool isDeviceSetup: devicesModule ? devicesModule.isDeviceSetup : false
|
|
|
|
|
|
|
|
readonly property int localPairingState: devicesModule ? devicesModule.localPairingState : -1
|
|
|
|
readonly property string localPairingError: devicesModule ? devicesModule.localPairingError : ""
|
2021-12-27 11:04:10 +00:00
|
|
|
|
2023-02-10 21:23:42 +00:00
|
|
|
function loadDevices() {
|
|
|
|
return root.devicesModule.loadDevices()
|
|
|
|
}
|
|
|
|
|
2021-12-27 11:04:10 +00:00
|
|
|
function setName(name) {
|
|
|
|
return root.devicesModule.setName(name)
|
|
|
|
}
|
|
|
|
|
|
|
|
function syncAll() {
|
|
|
|
root.devicesModule.syncAll()
|
|
|
|
}
|
|
|
|
|
|
|
|
function advertise() {
|
|
|
|
root.devicesModule.advertise()
|
|
|
|
}
|
|
|
|
|
|
|
|
function enableDevice(installationId, enable) {
|
|
|
|
root.devicesModule.enableDevice(installationId, enable)
|
|
|
|
}
|
2023-03-14 02:52:16 +00:00
|
|
|
|
|
|
|
function authenticateUser() {
|
|
|
|
const keyUid = "" // TODO: Support Keycard
|
|
|
|
root.devicesModule.authenticateUser(keyUid)
|
|
|
|
}
|
|
|
|
|
|
|
|
function validateConnectionString(connectionString) {
|
|
|
|
return root.devicesModule.validateConnectionString(connectionString)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getConnectionStringForBootstrappingAnotherDevice(keyUid, password) {
|
|
|
|
return root.devicesModule.getConnectionStringForBootstrappingAnotherDevice(keyUid, password)
|
|
|
|
}
|
|
|
|
|
|
|
|
function inputConnectionStringForBootstrapping(connectionString) {
|
|
|
|
return root.devicesModule.inputConnectionStringForBootstrapping(connectionString)
|
|
|
|
}
|
2021-12-27 11:04:10 +00:00
|
|
|
}
|