Commit 42b51aaa authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Uniformized set/get_passwd in set/get_password

parent 47824233
......@@ -83,6 +83,10 @@ const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i) {
}
const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *i) {
return linphone_auth_info_get_password(i);
}
const char *linphone_auth_info_get_password(const LinphoneAuthInfo *i) {
return i->passwd;
}
......@@ -118,8 +122,11 @@ const char *linphone_auth_info_get_tls_key_path(const LinphoneAuthInfo *i) {
return i->tls_key_path;
}
void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd) {
linphone_auth_info_set_password(info, passwd);
}
void linphone_auth_info_set_password(LinphoneAuthInfo *info, const char *passwd) {
if (info->passwd) {
ms_free(info->passwd);
info->passwd = NULL;
......
......@@ -78,6 +78,22 @@ LINPHONE_PUBLIC void linphone_auth_info_unref(LinphoneAuthInfo *info);
**/
LINPHONE_PUBLIC void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
/**
* Sets the password.
* @param[in] info The #LinphoneAuthInfo object
* @param[in] passwd The password.
* @deprecated, use linphone_auth_info_set_password instead
* @donotwrap
**/
LINPHONE_PUBLIC void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
/**
* Sets the password.
* @param[in] info The #LinphoneAuthInfo object
* @param[in] passwd The password.
**/
LINPHONE_PUBLIC void linphone_auth_info_set_password(LinphoneAuthInfo *info, const char *passwd);
/**
* Sets the username.
* @param[in] info The #LinphoneAuthInfo object
......@@ -154,9 +170,19 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthIn
* Gets the password.
* @param[in] info The #LinphoneAuthInfo object
* @return The password.
* @deprecated, use linphone_auth_info_get_password instead
* @donotwrap
*/
LINPHONE_PUBLIC const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *info);
/**
* Gets the password.
* @param[in] info The #LinphoneAuthInfo object
* @return The password.
*/
LINPHONE_PUBLIC const char *linphone_auth_info_get_password(const LinphoneAuthInfo *info);
/**
* Gets the userid.
* @param[in] info The #LinphoneAuthInfo object
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment