EnginioClientConnection Class

EnginioClientConnection keeps track of the authenticated connection to the server. More...

Header: #include <EnginioClientConnection>
Since: Qt 5.3
Inherits: QObject
Inherited By:

EnginioClient

Properties

  • 1 property inherited from QObject

Public Functions

~EnginioClientConnection()
Enginio::AuthenticationState authenticationState() const
QByteArray backendId() const
EnginioIdentity *identity() const
QNetworkAccessManager *networkManager() const
QUrl serviceUrl() const
void setBackendId(const QByteArray &backendId)
void setIdentity(EnginioIdentity *identity)
void setServiceUrl(const QUrl &serviceUrl)
  • 31 public functions inherited from QObject

Signals

void authenticationStateChanged(Enginio::AuthenticationState state)
void backendIdChanged(const QByteArray &backendId)
void identityChanged(EnginioIdentity *identity)
void serviceUrlChanged(const QUrl &url)

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

EnginioClientConnection keeps track of the authenticated connection to the server.

You should never use EnginioClientConnection explicitly, instead use the derrived EnginioClient.

See also EnginioClient.

Property Documentation

authenticationState : const Enginio::AuthenticationState

This property holds the state of the authentication.

Enginio provides convenient user management. The authentication state reflects whether the current user is authenticated.

Access functions:

Enginio::AuthenticationState authenticationState() const

Notifier signal:

void authenticationStateChanged(Enginio::AuthenticationState state)

See also Enginio::AuthenticationState, identity, and EnginioOAuth2Authentication.

backendId : QByteArray

This property holds the unique ID for the used Enginio backend.

The backend ID determines which Enginio backend is used by this instance of EnginioClient. The backend ID is required for Enginio to work. It is possible to use several Enginio backends simultaneously by having several instances of EnginioClient.

Access functions:

QByteArray backendId() const
void setBackendId(const QByteArray &backendId)

Notifier signal:

void backendIdChanged(const QByteArray &backendId)

identity : EnginioIdentity *

Property that represents a user. Setting the property will create an asynchronous authentication request, the result of it updates authenticationState EnginioClient does not take ownership of the identity object. The object has to be valid to keep the authenticated session alive. When the identity object is deleted the session is terminated. It is allowed to assign a null pointer to the property to terminate the session.

Access functions:

EnginioIdentity *identity() const
void setIdentity(EnginioIdentity *identity)

Notifier signal:

void identityChanged(EnginioIdentity *identity)

See also EnginioIdentity and EnginioOAuth2Authentication.

serviceUrl : QUrl

Enginio backend URL.

The API URL determines the server used by Enginio.

Usually it is not needed to change the default URL, but if it has to be changed it should be done as a first operaion on this EnginioClientConnection, otherwise some request may be sent accidentally to the default url.

Access functions:

QUrl serviceUrl() const
void setServiceUrl(const QUrl &serviceUrl)

Notifier signal:

void serviceUrlChanged(const QUrl &url)

Member Function Documentation

EnginioClientConnection::~EnginioClientConnection()

Destroys this instance.

QNetworkAccessManager *EnginioClientConnection::networkManager() const

Get the QNetworkAccessManager used by the Enginio library.

Note: that this QNetworkAccessManager may be shared with other EnginioClient instances and it is owned by them.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.