Added get_core methods on NatPolicy and Player

This commit is contained in:
Sylvain Berfini 2018-01-05 12:16:22 +01:00
parent 918b217f99
commit b892520903
4 changed files with 18 additions and 0 deletions

View file

@ -316,3 +316,7 @@ LinphoneNatPolicy * linphone_core_create_nat_policy_from_config(LinphoneCore *lc
}
return policy;
}
LinphoneCore *linphone_nat_policy_get_core(const LinphoneNatPolicy *policy) {
return policy->lc;
}

View file

@ -204,6 +204,9 @@ LinphonePlayer *linphone_call_build_player(LinphoneCall *call){
return obj;
}
LinphoneCore *linphone_player_get_core(const LinphonePlayer *player){
return linphone_call_get_core((LinphoneCall *)player->impl);
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphonePlayerCbs);

View file

@ -176,6 +176,12 @@ LINPHONE_PUBLIC void linphone_nat_policy_resolve_stun_server(LinphoneNatPolicy *
*/
LINPHONE_PUBLIC const struct addrinfo * linphone_nat_policy_get_stun_server_addrinfo(LinphoneNatPolicy *policy);
/**
* Returns the LinphoneCore object managing this nat policy, if any.
* @param[in] fr LinphoneNatPolicy object
*/
LINPHONE_PUBLIC LinphoneCore *linphone_nat_policy_get_core(const LinphoneNatPolicy *policy);
/**
* @}
*/

View file

@ -125,6 +125,11 @@ LINPHONE_PUBLIC int linphone_player_get_current_position(LinphonePlayer *obj);
*/
LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *obj);
/**
* Returns the LinphoneCore object managing this player's call, if any.
* @param[in] fr LinphonePlayer object
*/
LINPHONE_PUBLIC LinphoneCore *linphone_player_get_core(const LinphonePlayer *player);
/**
* Acquire a reference to the LinphonePlayerCbs object.