Add MatrixAPI.abort_pending definition
This commit is contained in:
parent
258d7bec86
commit
3993bb112c
@ -292,6 +292,9 @@ matrix_api_add_room_tag
|
||||
<SUBSECTION>
|
||||
matrix_api_get_turn_server
|
||||
|
||||
<SUBSECTION>
|
||||
matrix_api_abort_pending
|
||||
|
||||
<SUBSECTION Standard>
|
||||
MatrixAPI
|
||||
MATRIX_TYPE_API_ERROR
|
||||
|
@ -100,6 +100,7 @@
|
||||
* @delete_room_tag: virtual function for matrix_api_delete_room_tag()
|
||||
* @add_room_tag: virtual function for matrix_api_add_room_tag()
|
||||
* @get_turn_server: virtual function for matrix_api_get_turn_server()
|
||||
* @abort_pending: virtual function for matrix_api_abort_pending()
|
||||
*
|
||||
* The interface vtable for #MatrixAPI
|
||||
*/
|
||||
@ -2681,3 +2682,25 @@ matrix_api_get_turn_server(MatrixAPI *api,
|
||||
MATRIX_API_GET_IFACE(api)
|
||||
->get_turn_server(api, callback, user_data, error);
|
||||
}
|
||||
|
||||
/* Non-spec methods */
|
||||
|
||||
/**
|
||||
* matrix_api_abort_pending:
|
||||
* @api: a #MatrixAPI implementation
|
||||
*
|
||||
* Abort all pending requests toward the Matrix server. Be aware that
|
||||
* this may leave requests in an incosistent state.
|
||||
*
|
||||
* Implementations that provide only synchronous requests can choose
|
||||
* not to implement this function.
|
||||
*/
|
||||
void
|
||||
matrix_api_abort_pending(MatrixAPI *api)
|
||||
{
|
||||
g_return_if_fail(MATRIX_IS_API(api));
|
||||
|
||||
if (MATRIX_API_GET_IFACE(api)->abort_pending) {
|
||||
MATRIX_API_GET_IFACE(api)->abort_pending(api);
|
||||
}
|
||||
}
|
||||
|
@ -465,6 +465,10 @@ struct _MatrixAPIInterface {
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Non-spec methods */
|
||||
|
||||
void (*abort_pending)(MatrixAPI *api);
|
||||
|
||||
/*< private >*/
|
||||
/* Leave room for endpoint expansion */
|
||||
void *padding[50];
|
||||
@ -885,6 +889,10 @@ void matrix_api_get_turn_server(MatrixAPI *api,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Non-spec methods */
|
||||
|
||||
void matrix_api_abort_pending(MatrixAPI *api);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __MATRIX_API_IFACE_H__ */
|
||||
|
@ -2832,4 +2832,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface)
|
||||
|
||||
/* VoIP */
|
||||
iface->get_turn_server = NULL;
|
||||
|
||||
/* Non-spec methods */
|
||||
iface->abort_pending = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user