Commit 42b51aaa authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Uniformized set/get_passwd in set/get_password

parent 47824233
...@@ -83,6 +83,10 @@ const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i) { ...@@ -83,6 +83,10 @@ const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i) {
} }
const char *linphone_auth_info_get_passwd(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; return i->passwd;
} }
...@@ -118,8 +122,11 @@ const char *linphone_auth_info_get_tls_key_path(const LinphoneAuthInfo *i) { ...@@ -118,8 +122,11 @@ const char *linphone_auth_info_get_tls_key_path(const LinphoneAuthInfo *i) {
return i->tls_key_path; return i->tls_key_path;
} }
void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd) { 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) { if (info->passwd) {
ms_free(info->passwd); ms_free(info->passwd);
info->passwd = NULL; info->passwd = NULL;
......
...@@ -78,6 +78,22 @@ LINPHONE_PUBLIC void linphone_auth_info_unref(LinphoneAuthInfo *info); ...@@ -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); 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. * Sets the username.
* @param[in] info The #LinphoneAuthInfo object * @param[in] info The #LinphoneAuthInfo object
...@@ -154,9 +170,19 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthIn ...@@ -154,9 +170,19 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthIn
* Gets the password. * Gets the password.
* @param[in] info The #LinphoneAuthInfo object * @param[in] info The #LinphoneAuthInfo object
* @return The password. * @return The password.
* @deprecated, use linphone_auth_info_get_password instead
* @donotwrap
*/ */
LINPHONE_PUBLIC const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *info); 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. * Gets the userid.
* @param[in] info The #LinphoneAuthInfo object * @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