diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-30 15:38:23 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-30 15:38:23 +0000 |
commit | e354189a87d01942a0abe782583f0b30eb7f8839 (patch) | |
tree | 5a5e4bcf21d845daf1d1c6175b56bbe5081e2ccb /matrix-api.h | |
parent | 77d0978bd3fea5837f843a81065b2d8a9054f136 (diff) | |
download | purple-matrix-e354189a87d01942a0abe782583f0b30eb7f8839.tar.gz |
Implement joining rooms
Double-clicking on a room in the buddy list now joins a room if necessary.
Diffstat (limited to 'matrix-api.h')
-rw-r--r-- | matrix-api.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/matrix-api.h b/matrix-api.h index 3e1e2c8..3cccb3b 100644 --- a/matrix-api.h +++ b/matrix-api.h @@ -183,7 +183,42 @@ MatrixApiRequestData *matrix_api_send(MatrixConnectionData *conn, gpointer user_data); +/** + * Make a request to join a room + * + * @param conn The connection with which to make the request + * @param room The room (id or alias) to join + * @param callback Function to be called when the request completes + * @param error_callback Function to be called if there is an error making + * the request. If NULL, matrix_api_error will be + * used. + * @param bad_response_callback Function to be called if the API gives a non-200 + * response. If NULL, matrix_api_bad_response will be + * used. + * @param user_data Opaque data to be passed to the callbacks + */ +MatrixApiRequestData *matrix_api_join_room(MatrixConnectionData *conn, + const gchar *room, + MatrixApiCallback callback, + MatrixApiErrorCallback error_callback, + MatrixApiBadResponseCallback bad_response_callback, + gpointer user_data); + +/** + * Leave a room + * + * @param conn The connection with which to make the request + * @param room_id The id of the room to leave + * @param callback Function to be called when the request completes + * @param error_callback Function to be called if there is an error making + * the request. If NULL, matrix_api_error will be + * used. + * @param bad_response_callback Function to be called if the API gives a non-200 + * response. If NULL, matrix_api_bad_response will be + * used. + * @param user_data Opaque data to be passed to the callbacks + */ MatrixApiRequestData *matrix_api_leave_room(MatrixConnectionData *conn, const gchar *room_id, MatrixApiCallback callback, |