mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
present user id during authentication (needed for bluesip)
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@666 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
b1aedb2fbd
commit
15e936c89f
5 changed files with 52 additions and 34 deletions
|
|
@ -60,6 +60,14 @@ void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *usernam
|
|||
if (username && strlen(username)>0) info->username=ms_strdup(username);
|
||||
}
|
||||
|
||||
void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid){
|
||||
if (info->userid){
|
||||
ms_free(info->userid);
|
||||
info->userid=NULL;
|
||||
}
|
||||
if (userid && strlen(userid)>0) info->userid=ms_strdup(userid);
|
||||
}
|
||||
|
||||
void linphone_auth_info_destroy(LinphoneAuthInfo *obj){
|
||||
if (obj->username!=NULL) ms_free(obj->username);
|
||||
if (obj->userid!=NULL) ms_free(obj->userid);
|
||||
|
|
|
|||
|
|
@ -370,6 +370,7 @@ LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *useri
|
|||
const char *passwd, const char *ha1,const char *realm);
|
||||
void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
|
||||
void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
|
||||
void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
|
||||
/* you don't need those function*/
|
||||
void linphone_auth_info_destroy(LinphoneAuthInfo *info);
|
||||
LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig *config, int pos);
|
||||
|
|
|
|||
|
|
@ -736,8 +736,8 @@ void linphone_gtk_password_ok(GtkWidget *w){
|
|||
g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info);
|
||||
entry=linphone_gtk_get_widget(window,"password_entry");
|
||||
linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry)));
|
||||
linphone_auth_info_set_username(info,
|
||||
gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"username_entry"))));
|
||||
linphone_auth_info_set_userid(info,
|
||||
gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry"))));
|
||||
linphone_core_add_auth_info(linphone_gtk_get_core(),info);
|
||||
gtk_widget_destroy(window);
|
||||
}
|
||||
|
|
@ -747,10 +747,11 @@ static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm
|
|||
GtkWidget *label=linphone_gtk_get_widget(w,"message");
|
||||
LinphoneAuthInfo *info;
|
||||
gchar *msg;
|
||||
msg=g_strdup_printf(_("Please enter your password for domain %s:"),realm);
|
||||
gtk_label_set_text(GTK_LABEL(label),msg);
|
||||
msg=g_strdup_printf(_("Please enter your password for username <i>%s</i>\n at domain <i>%s</i>:"),
|
||||
username,realm);
|
||||
gtk_label_set_markup(GTK_LABEL(label),msg);
|
||||
g_free(msg);
|
||||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"username_entry")),username);
|
||||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username);
|
||||
info=linphone_auth_info_new(username, NULL, NULL, NULL,realm);
|
||||
g_object_set_data(G_OBJECT(w),"auth_info",info);
|
||||
g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info);
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!--Generated with glade3 3.4.3 on Tue Oct 14 00:01:54 2008 -->
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.16 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<widget class="GtkDialog" id="password">
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Linphone - Authentication required</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon">linphone2.png</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="has_separator">False</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox9">
|
||||
|
|
@ -25,8 +25,12 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">Please enter the domain password</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
|
|
@ -34,27 +38,27 @@
|
|||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">2</property>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="username_entry">
|
||||
<widget class="GtkLabel" id="userid_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">UserID</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="userid_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Username:</property>
|
||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Password:</property>
|
||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
||||
<property name="justify">right</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
|
|
@ -65,10 +69,9 @@
|
|||
<widget class="GtkEntry" id="password_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="is_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<signal name="activate" handler="linphone_gtk_password_ok"/>
|
||||
</widget>
|
||||
<packing>
|
||||
|
|
@ -92,38 +95,44 @@
|
|||
<widget class="GtkHButtonBox" id="dialog-action_area8">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button8">
|
||||
<property name="label" translatable="yes">gtk-ok</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="linphone_gtk_password_ok"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button9">
|
||||
<property name="label" translatable="yes">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">0</property>
|
||||
<signal name="clicked" handler="linphone_gtk_password_cancel"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
#AM_VERSION=1.10
|
||||
#1.9 was the recommended version
|
||||
if test -n "$AM_VERSION" ; then
|
||||
AM_VERSION=1.10
|
||||
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
|
||||
ACLOCAL=aclocal
|
||||
AUTOMAKE=automake
|
||||
else
|
||||
ACLOCAL=aclocal-${AM_VERSION}
|
||||
AUTOMAKE=automake-${AM_VERSION}
|
||||
else
|
||||
ACLOCAL=aclocal
|
||||
AUTOMAKE=automake
|
||||
fi
|
||||
|
||||
echo "Generating build scripts in this mediastreamer plugin"
|
||||
|
|
@ -16,5 +15,5 @@ libtoolize --copy --force
|
|||
$ACLOCAL
|
||||
$AUTOMAKE --force-missing --add-missing --copy
|
||||
autoconf
|
||||
rm -rf config.cache
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue