added SetupMethodDisplayPin to device class
This commit is contained in:
parent
ce54fd166a
commit
7890975ec6
@ -50,7 +50,7 @@ QList<DeviceClass> DevicePluginLgSmartTv::supportedDevices() const
|
|||||||
DeviceClass deviceClassLgSmartTv(pluginId(), lgVendorId, lgSmartTvDeviceClassId);
|
DeviceClass deviceClassLgSmartTv(pluginId(), lgVendorId, lgSmartTvDeviceClassId);
|
||||||
deviceClassLgSmartTv.setName("Lg Smart Tv");
|
deviceClassLgSmartTv.setName("Lg Smart Tv");
|
||||||
deviceClassLgSmartTv.setCreateMethod(DeviceClass::CreateMethodDiscovery);
|
deviceClassLgSmartTv.setCreateMethod(DeviceClass::CreateMethodDiscovery);
|
||||||
deviceClassLgSmartTv.setSetupMethod(DeviceClass::SetupMethodEnterPin);
|
deviceClassLgSmartTv.setSetupMethod(DeviceClass::SetupMethodDisplayPin);
|
||||||
|
|
||||||
QList<ParamType> paramTypes;
|
QList<ParamType> paramTypes;
|
||||||
paramTypes.append(ParamType("name", QVariant::String));
|
paramTypes.append(ParamType("name", QVariant::String));
|
||||||
@ -59,6 +59,7 @@ QList<DeviceClass> DevicePluginLgSmartTv::supportedDevices() const
|
|||||||
paramTypes.append(ParamType("host address", QVariant::String));
|
paramTypes.append(ParamType("host address", QVariant::String));
|
||||||
paramTypes.append(ParamType("location", QVariant::String));
|
paramTypes.append(ParamType("location", QVariant::String));
|
||||||
paramTypes.append(ParamType("manufacturer", QVariant::String));
|
paramTypes.append(ParamType("manufacturer", QVariant::String));
|
||||||
|
paramTypes.append(ParamType("key", QVariant::String));
|
||||||
|
|
||||||
deviceClassLgSmartTv.setParamTypes(paramTypes);
|
deviceClassLgSmartTv.setParamTypes(paramTypes);
|
||||||
|
|
||||||
@ -95,21 +96,6 @@ QPair<DeviceManager::DeviceError, QString> DevicePluginLgSmartTv::executeAction(
|
|||||||
return report();
|
return report();
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<DeviceManager::DeviceSetupStatus, QString> DevicePluginLgSmartTv::confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const ParamList ¶ms)
|
|
||||||
{
|
|
||||||
|
|
||||||
foreach (const Param ¶m, params) {
|
|
||||||
qDebug() << "confirm pairing param" << param.name();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return reportDeviceSetup(DeviceManager::DeviceSetupStatusAsync);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString DevicePluginLgSmartTv::pluginName() const
|
QString DevicePluginLgSmartTv::pluginName() const
|
||||||
{
|
{
|
||||||
return "Lg Smart Tv";
|
return "Lg Smart Tv";
|
||||||
|
|||||||
@ -42,8 +42,6 @@ public:
|
|||||||
DeviceManager::HardwareResources requiredHardware() const override;
|
DeviceManager::HardwareResources requiredHardware() const override;
|
||||||
QPair<DeviceManager::DeviceError, QString> executeAction(Device *device, const Action &action) override;
|
QPair<DeviceManager::DeviceError, QString> executeAction(Device *device, const Action &action) override;
|
||||||
|
|
||||||
QPair<DeviceManager::DeviceSetupStatus, QString> confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const ParamList ¶ms) override;
|
|
||||||
|
|
||||||
QString pluginName() const override;
|
QString pluginName() const override;
|
||||||
PluginId pluginId() const override;
|
PluginId pluginId() const override;
|
||||||
|
|
||||||
|
|||||||
@ -265,6 +265,5 @@ void TvDiscovery::discover(int timeout)
|
|||||||
|
|
||||||
m_tvList.clear();
|
m_tvList.clear();
|
||||||
writeDatagram(searchMessage.toUtf8(),m_host,m_port);
|
writeDatagram(searchMessage.toUtf8(),m_host,m_port);
|
||||||
writeDatagram(searchMessage.toUtf8(),m_host,m_port);
|
|
||||||
m_timeout->start(timeout);
|
m_timeout->start(timeout);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user