Added set/get user_data in LinphoneFactory

This commit is contained in:
Sylvain Berfini 2017-10-11 09:57:55 +02:00
parent 8b8dcb3f72
commit 5350cadf47
2 changed files with 25 additions and 0 deletions

View file

@ -57,6 +57,8 @@ struct _LinphoneFactory {
char *cached_image_resources_dir;
char *cached_msplugins_dir;
LinphoneErrorInfo* ei;
void *user_data;
};
static void linphone_factory_uninit(LinphoneFactory *obj){
@ -320,3 +322,11 @@ LinphoneTransports *linphone_factory_create_transports(LinphoneFactory *factory)
LinphoneVideoActivationPolicy *linphone_factory_create_video_activation_policy(LinphoneFactory *factory) {
return linphone_video_activation_policy_new();
}
void *linphone_factory_get_user_data(const LinphoneFactory *factory) {
return factory->user_data;
}
void linphone_factory_set_user_data(LinphoneFactory *factory, void *data) {
factory->user_data = data;
}

View file

@ -261,6 +261,21 @@ LINPHONE_PUBLIC LinphoneTransports *linphone_factory_create_transports(LinphoneF
* @return LinphoneVideoActivationPolicy object.
*/
LINPHONE_PUBLIC LinphoneVideoActivationPolicy *linphone_factory_create_video_activation_policy(LinphoneFactory *factory);
/**
* Gets the user data in the LinphoneFactory object
* @param[in] factory the LinphoneFactory
* @return the user data
*/
LINPHONE_PUBLIC void *linphone_factory_get_user_data(const LinphoneFactory *factory);
/**
* Sets the user data in the LinphoneFactory object
* @param[in] factory the LinphoneFactory object
* @param[in] data the user data
*/
LINPHONE_PUBLIC void linphone_factory_set_user_data(LinphoneFactory *factory, void *data);
/**
* @}
*/