Add support for fetching room list
FossilOrigin-Name: 092c122c690b6e64c67120c6c153e82fceb484078dd3d713d56e01ce13c3902d
This commit is contained in:
parent
77a2d20fc7
commit
c7fc35fb0f
11 changed files with 258 additions and 61 deletions
|
@ -42,6 +42,15 @@ typedef void (^mtx_client_login_block_t)(MTXClient *_Nullable client,
|
|||
*/
|
||||
typedef void (^mtx_client_logout_block_t)(id _Nullable exception);
|
||||
|
||||
/**
|
||||
* @brief A block called when the room list was fetched.
|
||||
*
|
||||
* @param rooms An array of joined rooms, or nil on error
|
||||
* @param exception An exception if fetching the room list failed
|
||||
*/
|
||||
typedef void (^mtx_client_room_list_block_t)(
|
||||
OFArray<OFString *> *_Nullable rooms, id _Nullable exception);
|
||||
|
||||
/**
|
||||
* @brief A class that represents a client.
|
||||
*/
|
||||
|
@ -105,9 +114,16 @@ typedef void (^mtx_client_logout_block_t)(id _Nullable exception);
|
|||
*
|
||||
* @warning The client can no longer be used after this succeeded!
|
||||
*
|
||||
* @param block The block to call when logging out succeeded or failed
|
||||
* @param block A block to call when logging out succeeded or failed
|
||||
*/
|
||||
- (void)asyncLogOutWithBlock: (mtx_client_logout_block_t)block;
|
||||
|
||||
/**
|
||||
* @brief Fetches the list of joined rooms.
|
||||
*
|
||||
* @param block A block to call with the list of joined room
|
||||
*/
|
||||
- (void)asyncFetchRoomList: (mtx_client_room_list_block_t)block;
|
||||
@end
|
||||
|
||||
OF_ASSUME_NONNULL_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue