This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Michael Zanetti 22dd3fe27d intermediate commit.
Working pretty well now. No cleanup done. some broken menu entries related to
connect.

TBC
2019-02-06 03:00:43 +01:00

43 lines
1.1 KiB
C++

#ifndef CLOUDTRANSPORT_H
#define CLOUDTRANSPORT_H
#include "nymeatransportinterface.h"
#include <QObject>
#include <QUrl>
class AWSClient;
namespace remoteproxyclient {
class RemoteProxyConnection;
}
class CloudTransportFactory: public NymeaTransportInterfaceFactory
{
public:
CloudTransportFactory();
NymeaTransportInterface* createTransport(QObject *parent = nullptr) const override;
QStringList supportedSchemes() const override;
};
class CloudTransport : public NymeaTransportInterface
{
Q_OBJECT
public:
explicit CloudTransport(AWSClient *awsClient, QObject *parent = nullptr);
bool connect(const QUrl &url) override;
QUrl url() const override;
void disconnect() override;
ConnectionState connectionState() const override;
void sendData(const QByteArray &data) override;
void ignoreSslErrors(const QList<QSslError> &errors) override;
private:
QUrl m_url;
AWSClient *m_awsClient = nullptr;
remoteproxyclient::RemoteProxyConnection *m_remoteproxyConnection = nullptr;
QDateTime m_timestamp;
};
#endif // CLOUDTRANSPORT_H