Add MatrixAPI.abort_pending definition
This commit is contained in:
parent
258d7bec86
commit
3993bb112c
@ -292,6 +292,9 @@ matrix_api_add_room_tag
|
|||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
matrix_api_get_turn_server
|
matrix_api_get_turn_server
|
||||||
|
|
||||||
|
<SUBSECTION>
|
||||||
|
matrix_api_abort_pending
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
MatrixAPI
|
MatrixAPI
|
||||||
MATRIX_TYPE_API_ERROR
|
MATRIX_TYPE_API_ERROR
|
||||||
|
@ -100,6 +100,7 @@
|
|||||||
* @delete_room_tag: virtual function for matrix_api_delete_room_tag()
|
* @delete_room_tag: virtual function for matrix_api_delete_room_tag()
|
||||||
* @add_room_tag: virtual function for matrix_api_add_room_tag()
|
* @add_room_tag: virtual function for matrix_api_add_room_tag()
|
||||||
* @get_turn_server: virtual function for matrix_api_get_turn_server()
|
* @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
|
* The interface vtable for #MatrixAPI
|
||||||
*/
|
*/
|
||||||
@ -2681,3 +2682,25 @@ matrix_api_get_turn_server(MatrixAPI *api,
|
|||||||
MATRIX_API_GET_IFACE(api)
|
MATRIX_API_GET_IFACE(api)
|
||||||
->get_turn_server(api, callback, user_data, error);
|
->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,
|
gpointer user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
/* Non-spec methods */
|
||||||
|
|
||||||
|
void (*abort_pending)(MatrixAPI *api);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* Leave room for endpoint expansion */
|
/* Leave room for endpoint expansion */
|
||||||
void *padding[50];
|
void *padding[50];
|
||||||
@ -885,6 +889,10 @@ void matrix_api_get_turn_server(MatrixAPI *api,
|
|||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
/* Non-spec methods */
|
||||||
|
|
||||||
|
void matrix_api_abort_pending(MatrixAPI *api);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __MATRIX_API_IFACE_H__ */
|
#endif /* __MATRIX_API_IFACE_H__ */
|
||||||
|
@ -2832,4 +2832,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface)
|
|||||||
|
|
||||||
/* VoIP */
|
/* VoIP */
|
||||||
iface->get_turn_server = NULL;
|
iface->get_turn_server = NULL;
|
||||||
|
|
||||||
|
/* Non-spec methods */
|
||||||
|
iface->abort_pending = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user