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

@ -22,22 +22,24 @@
#import <ObjFW/ObjFW.h>
#import "MTXRequest.h"
OF_ASSUME_NONNULL_BEGIN
@interface MTXLoginFailedException: OFException
@property (readonly, nonatomic) OFString *user;
@property (readonly, nonatomic) OFURL *homeserver;
@property (readonly, nonatomic) int statusCode;
@property (readonly, nonatomic) OFDictionary<OFString *, id> *response;
@property (readonly, nonatomic) mtx_response_t response;
+ (instancetype)exceptionWithUser: (OFString *)user
homeserver: (OFURL *)homeserver
statusCode: (int)statusCode
response: (OFDictionary<OFString *, id> *)response;
response: (mtx_response_t)response;
- (instancetype)initWithUser: (OFString *)user
homeserver: (OFURL *)homeserver
statusCode: (int)statusCode
response: (OFDictionary<OFString *, id> *)response;
response: (mtx_response_t)response;
@end
OF_ASSUME_NONNULL_END