diff options
Diffstat (limited to 'pjmedia/include/pjmedia/endpoint.h')
-rw-r--r-- | pjmedia/include/pjmedia/endpoint.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/endpoint.h b/pjmedia/include/pjmedia/endpoint.h index 37778b7a..2455bcea 100644 --- a/pjmedia/include/pjmedia/endpoint.h +++ b/pjmedia/include/pjmedia/endpoint.h @@ -60,6 +60,12 @@ typedef enum pjmedia_endpt_flag /** + * Type of callback to register to pjmedia_endpt_atexit(). + */ +typedef void (*pjmedia_endpt_exit_callback)(pjmedia_endpt *endpt); + + +/** * Create an instance of media endpoint. * * @param pf Pool factory, which will be used by the media endpoint @@ -204,6 +210,20 @@ PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt, PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt); +/** + * Register cleanup function to be called by media endpoint when + * #pjmedia_endpt_destroy() is called. + * + * @param endpt The media endpoint. + * @param func The function to be registered. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_endpt_atexit(pjmedia_endpt *endpt, + pjmedia_endpt_exit_callback func); + + + PJ_END_DECL |