MTXClient: Add support for logging out

FossilOrigin-Name: c29845b7b81229ea7bf062304824a4087c160629216064ae1a647fe8286826bb
This commit is contained in:
Jonathan Schleifer 2020-10-03 16:21:34 +00:00
parent 023ed62f5a
commit 77a2d20fc7
11 changed files with 209 additions and 25 deletions

View file

@ -24,6 +24,13 @@
OF_ASSUME_NONNULL_BEGIN
/**
* @brief A response to a request.
*
* This is a typedef for `OFDictionary<OFString *, id> *`.
*/
typedef OFDictionary<OFString *, id> *mtx_response_t;
/**
* @brief A block called with the response for an MTXRequest.
*
@ -32,9 +39,8 @@ OF_ASSUME_NONNULL_BEGIN
* @param exception The first exception that occurred during the request,
* or `nil` on success
*/
typedef void (^mtx_request_block_t)(
OFDictionary<OFString *, id> *_Nullable response, int statusCode,
id _Nullable exception);
typedef void (^mtx_request_block_t)(mtx_response_t _Nullable response,
int statusCode, id _Nullable exception);
/**
* @brief An internal class for performing a request on the Matrix server.