aboutsummaryrefslogtreecommitdiff
path: root/connectiondata.cpp
AgeCommit message (Collapse)Author
2017-12-30QMatrixClient::NetworkAccessManager (singleton Qt NAM that remembers ignored ↵Kitsune Ral
SSL errors) Closes #145.
2017-12-29Don't use generic lambdas in initialisersKitsune Ral
This seems to upset MSVC.
2017-12-29Allow to customize and connect to the used QNetworkAccessManager from clientsKitsune Ral
We don't really want to let the world know that we use the only instance of NAM; instead, we provide a point of customisation to whatever NAM is created in ConnectionData, in the form of a static customizeNetworkAccess() method that gets a function to run on a/the created NAM. This function can do additional configuration on NAM (such as setting a proxy factory, network configuration, or caching) and/or connect to its signals, such as sslErrors() and proxyAuthenticationRequired(). Closes #143.
2017-11-25ConnectionData::setBaseUrl()Kitsune Ral
2017-11-22Force-create NAM earlierKitsune Ral
To somewhat ease a bump at sending the first network request.
2017-11-21Workaround Qt's poor bearer managementKitsune Ral
Closes #109
2017-11-20Slightly rearrange code so that the NAM singleton could be configured easierKitsune Ral
2017-10-27Put access token to headers instead of queryKitsune Ral
2017-10-19Introduce device_id and initial_device_name support; switch to generated ↵Kitsune Ral
LoginJob This is _almost_ a backwards-compatible change, except that connect*() and other relevant methods in Connection are no more virtual (that wasn't much useful anyway). Otherwise it's a matter of passing initial_device_name to connectToServer(), saving device_id (along with access_token) from the result of LoginJob and then passing device_id (along with access_token, again) to connectWithToken() upon the next run.
2017-09-22Use epoch milliseconds instead of std::rand() to seed the txn counterKitsune Ral
std::rand() on MinGW on Windows 7, at least in debug mode, nicely generates the same value across runs, reliably leading to messages loss as the server discards them.
2017-06-22Connection is now able to generate transaction idsKitsune Ral
The generation algorithm doesn't support several Quaternions using the same accessToken, as of yet.
2017-05-13Refactored logging enhancementsKitsune Ral
logging.h/logging.cpp is now a full-fledged pair for all things logging. Two more categories added, EPHEMERAL and SYNCJOB, that control logging for ephemeral events and SyncJob, respectively (in particular, switching off EPHEMERAL greatly reduces the logspam about moving read markers and how many users have read up to which event).
2017-05-08Make QNetworkAccessManager member a singletonKitsune Ral
As Qt documentation advises, a single QNetworkAccessManager is enough for the whole Qt application.
2017-04-30Port to categorized loggingElvis Angelaccio
This greatly reduces the noise made by quaternion. To enable full logging, export the following variable: QT_LOGGING_RULES="libqmatrixclient.*.debug=true"
2017-03-24Added a missing #includeKitsune Ral
2016-11-26CleanupKitsune Ral
2016-09-06Connection: homeserver(); Connection and ConnectionData: accessToken(); ↵Kitsune Ral
accessors de-virtualized Details: - New: Connection::homeserver(), returns the homeserver URL from inside ConnectionData - New/Modify: Connection::accessToken() and ConnectionData::accessToken() - because we will also have refresh tokens eventually; deprecate token() for the same reason - Modify: Connection::user(), token(), accessToken() are no more virtual (they should have never been, these are plain accessors, after all)
2016-04-12Resolve Matrix SRV records.David A Roberts
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral