Add support for leaving rooms
FossilOrigin-Name: 193ebad6ad2eb698fb1c14250d1319d24ee42363dbc2a053ca6e9f5f600048f2
This commit is contained in:
parent
54f1802e89
commit
191a6412ae
7 changed files with 186 additions and 2 deletions
|
@ -61,6 +61,13 @@ typedef void (^mtx_client_room_list_block_t)(
|
|||
typedef void (^mtx_client_room_join_block_t)(OFString *_Nullable roomID,
|
||||
id _Nullable exception);
|
||||
|
||||
/**
|
||||
* @brief A block called when a room was left.
|
||||
*
|
||||
* @param exception An exception if leaving the room failed
|
||||
*/
|
||||
typedef void (^mtx_client_room_leave_block_t)(id _Nullable exception);
|
||||
|
||||
/**
|
||||
* @brief A class that represents a client.
|
||||
*/
|
||||
|
@ -143,6 +150,15 @@ typedef void (^mtx_client_room_join_block_t)(OFString *_Nullable roomID,
|
|||
*/
|
||||
- (void)joinRoom: (OFString *)room
|
||||
block: (mtx_client_room_join_block_t)block;
|
||||
|
||||
/**
|
||||
* @brief Leaves the specified room.
|
||||
*
|
||||
* @param roomID The room ID to leave
|
||||
* @param block A block to call when the room was left
|
||||
*/
|
||||
- (void)leaveRoom: (OFString *)roomID
|
||||
block: (mtx_client_room_leave_block_t)block;
|
||||
@end
|
||||
|
||||
OF_ASSUME_NONNULL_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue