20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
/**
* @brief A block called with the response for an MTXRequest.
*
* @param response The response to the request, as a dictionary parsed from JSON
* @param statusCode The HTTP status code returned for the request
* @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);
/**
* @brief An internal class for performing a request on the Matrix server.
*/
@interface MTXRequest: OFObject <OFHTTPClientDelegate>
/**
* @brief The access token to use.
|
>
>
>
>
>
>
>
|
<
|
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
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.
*
* @param response The response to the request, as a dictionary parsed from JSON
* @param statusCode The HTTP status code returned for the request
* @param exception The first exception that occurred during the request,
* or `nil` on success
*/
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.
*/
@interface MTXRequest: OFObject <OFHTTPClientDelegate>
/**
* @brief The access token to use.
|