devices to things
parent
5dbe8ebf7d
commit
fb8c12fe3f
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
#include "heos.h"
|
||||
#include "extern-plugininfo.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QUrlQuery>
|
||||
#include <QTimer>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
Heos::Heos(const QHostAddress &hostAddress, QObject *parent) :
|
||||
QObject(parent),
|
||||
|
|
@ -386,7 +386,7 @@ void Heos::groupVolumeDown(int groupId, int step)
|
|||
********************************/
|
||||
quint32 Heos::getMusicSources()
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();;
|
||||
QByteArray cmd = "heos://browse/get_music_sources?";
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("SEQUENCE", QString::number(sequence));
|
||||
|
|
@ -399,7 +399,7 @@ quint32 Heos::getMusicSources()
|
|||
|
||||
quint32 Heos::getSourceInfo(const QString &sourceId)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd = "heos://browse/get_source_info?";
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("sid", sourceId);
|
||||
|
|
@ -413,7 +413,7 @@ quint32 Heos::getSourceInfo(const QString &sourceId)
|
|||
|
||||
quint32 Heos::getSearchCriteria(const QString &sourceId)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd = "heos://browse/get_search_criteria?";
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("sid", sourceId);
|
||||
|
|
@ -426,7 +426,7 @@ quint32 Heos::getSearchCriteria(const QString &sourceId)
|
|||
|
||||
quint32 Heos::browseSource(const QString &sourceId)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd = "heos://browse/browse?";
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("sid", sourceId);
|
||||
|
|
@ -440,7 +440,7 @@ quint32 Heos::browseSource(const QString &sourceId)
|
|||
|
||||
quint32 Heos::browseSourceContainers(const QString &sourceId, const QString &containerId)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd = "heos://browse/browse?";
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("sid", sourceId);
|
||||
|
|
@ -455,7 +455,7 @@ quint32 Heos::browseSourceContainers(const QString &sourceId, const QString &con
|
|||
|
||||
quint32 Heos::playStation(int playerId, const QString &sourceId, const QString &containerId, const QString &mediaId, const QString &stationName)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd("heos://browse/play_stream?");
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("pid", QString::number(playerId));
|
||||
|
|
@ -481,7 +481,7 @@ quint32 Heos::playStation(int playerId, const QString &sourceId, const QString &
|
|||
|
||||
quint32 Heos::playPresetStation(int playerId, int presetNumber)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd("heos://browse/play_preset?");
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("pid", QString::number(playerId));
|
||||
|
|
@ -496,7 +496,7 @@ quint32 Heos::playPresetStation(int playerId, int presetNumber)
|
|||
|
||||
quint32 Heos::playInputSource(int playerId, const QString &inputName)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd("heos://browse/play_input?");
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("pid", QString::number(playerId));
|
||||
|
|
@ -511,7 +511,7 @@ quint32 Heos::playInputSource(int playerId, const QString &inputName)
|
|||
|
||||
quint32 Heos::playUrl(int playerId, const QUrl &mediaUrl)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd("heos://browse/play_stream?");
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("pid", QString::number(playerId));
|
||||
|
|
@ -526,7 +526,7 @@ quint32 Heos::playUrl(int playerId, const QUrl &mediaUrl)
|
|||
|
||||
quint32 Heos::addContainerToQueue(int playerId, const QString &sourceId, const QString &containerId, ADD_CRITERIA addCriteria)
|
||||
{
|
||||
quint32 sequence = QRandomGenerator::global()->generate();
|
||||
quint32 sequence = qrand();
|
||||
QByteArray cmd("heos://browse/add_to_queue?");
|
||||
QUrlQuery queryParams;
|
||||
queryParams.addQueryItem("pid", QString::number(playerId));
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@
|
|||
#include "heosplayer.h"
|
||||
#include "heostypes.h"
|
||||
|
||||
#include "devices/device.h"
|
||||
#include "integrations/thing.h"
|
||||
#include "types/mediabrowseritem.h"
|
||||
#include "devices/browseresult.h"
|
||||
#include "devices/browseritemresult.h"
|
||||
#include "integrations/browseresult.h"
|
||||
#include "integrations/browseritemresult.h"
|
||||
|
||||
class Heos : public QObject
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -56,25 +56,17 @@ class IntegrationPluginDenon : public IntegrationPlugin
|
|||
|
||||
public:
|
||||
explicit IntegrationPluginDenon();
|
||||
|
||||
<<<<<<< HEAD:denon/integrationplugindenon.h
|
||||
void init() override;
|
||||
|
||||
void discoverThings(ThingDiscoveryInfo *info) override;
|
||||
|
||||
void startPairing(ThingPairingInfo *info) override;
|
||||
void confirmPairing(ThingPairingInfo *info, const QString &username, const QString &secret) override;
|
||||
|
||||
void setupThing(ThingSetupInfo *info) override;
|
||||
void postSetupThing(Thing *thing) override;
|
||||
void executeAction(ThingActionInfo *info) override;
|
||||
void thingRemoved(Thing *thing) override;
|
||||
=======
|
||||
void discoverDevices(DeviceDiscoveryInfo *info) override;
|
||||
|
||||
void startPairing(DevicePairingInfo *info) override;
|
||||
void confirmPairing(DevicePairingInfo *info, const QString &username, const QString &secret) override;
|
||||
|
||||
void setupDevice(DeviceSetupInfo *info) override;
|
||||
void postSetupDevice(Device *device) override;
|
||||
void executeAction(DeviceActionInfo *info) override;
|
||||
void deviceRemoved(Device *device) override;
|
||||
>>>>>>> playing favorites do work now:denon/deviceplugindenon.h
|
||||
|
||||
void browseThing(BrowseResult *result) override;
|
||||
void browserItem(BrowserItemResult *result) override;
|
||||
|
|
@ -85,15 +77,10 @@ private:
|
|||
PluginTimer *m_pluginTimer = nullptr;
|
||||
ZeroConfServiceBrowser *m_serviceBrowser = nullptr;
|
||||
|
||||
<<<<<<< HEAD:denon/integrationplugindenon.h
|
||||
QHash<ThingId, AvrConnection*> m_avrConnections;
|
||||
QHash<ThingId, Heos*> m_heos;
|
||||
=======
|
||||
QHash<DeviceId, AvrConnection*> m_avrConnections;
|
||||
QHash<DeviceId, Heos*> m_heosConnections;
|
||||
QHash<DeviceId, Heos*> m_unfinishedHeosConnections;
|
||||
QHash<Heos *, DevicePairingInfo *> m_unfinishedHeosPairings;
|
||||
>>>>>>> playing favorites do work now:denon/deviceplugindenon.h
|
||||
QHash<ThingId, Heos*> m_heosConnections;
|
||||
QHash<ThingId, Heos*> m_unfinishedHeosConnections;
|
||||
QHash<Heos *, ThingPairingInfo *> m_unfinishedHeosPairings;
|
||||
|
||||
QHash<AvrConnection*, ThingSetupInfo*> m_asyncAvrSetups;
|
||||
QHash<Heos*, ThingSetupInfo*> m_asyncHeosSetups;
|
||||
|
|
@ -104,6 +91,7 @@ private:
|
|||
QUrl m_notificationUrl;
|
||||
|
||||
QHash<int, ThingActionInfo*> m_pendingActions;
|
||||
|
||||
QHash<Heos*, BrowseResult*> m_pendingGetSourcesRequest;
|
||||
QHash<QString, BrowseResult*> m_pendingBrowseResult; // QString = containerId or sourceId
|
||||
QHash<int, BrowserActionInfo*> m_pendingBrowserActions;
|
||||
|
|
|
|||
Loading…
Reference in New Issue