QtDataSync  4.2.0
A simple offline-first synchronisation framework, to synchronize data of Qt applications between devices
Public Types | Public Member Functions | Properties | Friends | List of all members
QtDataSync::RemoteConfig Class Reference

A configuration on how to connect to a remote server. More...

#include <remoteconfig.h>

Public Types

using HeaderHash = QHash< QByteArray, QByteArray >
 Typedef for a hash of additional HTTP headers.
 

Public Member Functions

 RemoteConfig (const QUrl &url={}, const QString &accessKey={}, const HeaderHash &headers={}, int keepaliveTimeout=1)
 Default constructor, with optional parameters.
 
 RemoteConfig (const RemoteConfig &other)
 Copy constructor.
 
 RemoteConfig (RemoteConfig &&other) noexcept
 Move constructor.
 
RemoteConfigoperator= (const RemoteConfig &other)
 Copy-Assignment operator.
 
RemoteConfigoperator= (RemoteConfig &&other) noexcept
 Move-Assignment operator.
 
bool operator== (const RemoteConfig &other) const
 Equality operator.
 
bool operator!= (const RemoteConfig &other) const
 Inequality operator.
 
QUrl url () const
 READ accessor for RemoteConfig::url.
 
QString accessKey () const
 READ accessor for RemoteConfig::accessKey.
 
HeaderHash headers () const
 READ accessor for RemoteConfig::headers.
 
int keepaliveTimeout () const
 READ accessor for RemoteConfig::keepaliveTimeout.
 
void setUrl (QUrl url)
 WRITE accessor for RemoteConfig::url.
 
void setAccessKey (QString accessKey)
 WRITE accessor for RemoteConfig::accessKey.
 
void setHeaders (HeaderHash headers)
 WRITE accessor for RemoteConfig::headers.
 
void setKeepaliveTimeout (int keepaliveTimeout)
 WRITE accessor for RemoteConfig::keepaliveTimeout.
 

Properties

QUrl url
 The websocket url of the server to connect to.
 
QString accessKey
 A access secret needed in order to connect to the server.
 
QtDataSync::RemoteConfig::HeaderHash headers
 A collection of additional HTTP headers to be sent with the request.
 
int keepaliveTimeout
 The keep alive timeout to be used to send pings to the server.
 
QVariantMap storedHeaders
 Internal property that mirrors RemoteConfig::headers, but in a serializable format.
 

Friends

Q_DATASYNC_EXPORT QDataStreamoperator<< (QDataStream &stream, const RemoteConfig &deviceInfo)
 Stream operator to stream into a QDataStream.
 
Q_DATASYNC_EXPORT QDataStreamoperator>> (QDataStream &stream, RemoteConfig &deviceInfo)
 Stream operator to stream out of a QDataStream.
 

Detailed Description

A configuration on how to connect to a remote server.

Definition at line 16 of file remoteconfig.h.


The documentation for this class was generated from the following file: