diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 5ca6f23..5a85e7e 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -215,3 +215,26 @@ LinphoneCallState linphone_call_get_state(const LinphoneCall *call){ return call->state; } +/** + * Get the user_pointer in the LinphoneCall + * + * @ingroup call_control + * + * return user_pointer an opaque user pointer that can be retrieved at any time +**/ +void *linphone_call_get_user_pointer(LinphoneCall *call) +{ + return call->user_pointer; +} + +/** + * Set the user_pointer in the LinphoneCall + * + * @ingroup call_control + * + * the user_pointer is an opaque user pointer that can be retrieved at any time in the LinphoneCall +**/ +void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer) +{ + call->user_pointer = user_pointer; +} diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index c3d435c..fc735fd 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -814,4 +814,7 @@ void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, Rtp } #endif MSList *linphone_core_get_calls(LinphoneCore *lc); +void *linphone_call_get_user_pointer(LinphoneCall *call); +void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer); + #endif diff --git a/coreapi/private.h b/coreapi/private.h index fdd4f78..f4e308f 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -74,6 +74,7 @@ struct _LinphoneCall LinphoneCallState state; int refcnt; bool_t media_pending; + void * user_pointer; }; LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to);