diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-29 20:04:41 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-29 20:04:41 +0000 |
commit | ed0c5f6b5ad82df7047296adb081e19102ec4a35 (patch) | |
tree | b2d898e35fef93d08d08efbaf03906bc2a3e1217 /matrix-room.h | |
parent | a6bd56705cd5ef571b5aa4ef420a99fd438d72f8 (diff) | |
download | purple-matrix-ed0c5f6b5ad82df7047296adb081e19102ec4a35.tar.gz |
Move the room member table management out to a separate file
Trying to keep the size of matrix-room.c under control, move the membertable
management bits out to a separate file.
Also do away with the special handling for the first /sync of a room, and
instead *always* group together member arrivals/departures until after we've
finished handling the state table.
Diffstat (limited to 'matrix-room.h')
-rw-r--r-- | matrix-room.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/matrix-room.h b/matrix-room.h index 2ac29eb..90978d1 100644 --- a/matrix-room.h +++ b/matrix-room.h @@ -36,10 +36,11 @@ struct _PurpleConversation; struct _PurpleConnection; /** - * @param conn connection data for the account * @param conv conversation info */ -void matrix_room_handle_initial_state(struct _PurpleConversation *conv); +void matrix_room_complete_state_update(struct _PurpleConversation *conv, + gboolean announce_arrivals); + /** * Create a new conversation for the given room @@ -53,38 +54,32 @@ struct _PurpleConversation *matrix_room_create_conversation( */ void matrix_room_leave_chat(struct _PurpleConversation *conv); + /** - * handle a single received timeline event for a room (such as a message) + * Update the state table on a room, based on a received state event * * @param conv info on the room * @param event_id id of the event * @param json_event_obj the event object. */ -void matrix_room_handle_timeline_event(struct _PurpleConversation *conv, - const gchar *event_id, JsonObject *json_event_obj); - -/** - * Send a message in a room - */ -void matrix_room_send_message(struct _PurpleConversation *conv, - const gchar *message); -/************************************************************************* - * - * Room state handling - */ +void matrix_room_handle_state_event(struct _PurpleConversation *conv, + const gchar *event_id, JsonObject *json_event_obj); /** - * Update the state table on a room, based on a received state event + * handle a single received timeline event for a room (such as a message) * * @param conv info on the room * @param event_id id of the event * @param json_event_obj the event object. */ +void matrix_room_handle_timeline_event(struct _PurpleConversation *conv, + const gchar *event_id, JsonObject *json_event_obj); -void matrix_room_handle_state_event(struct _PurpleConversation *conv, - const gchar *event_id, JsonObject *json_event_obj, - gboolean suppress_state_update_notifications); - +/** + * Send a message in a room + */ +void matrix_room_send_message(struct _PurpleConversation *conv, + const gchar *message); #endif |