Commit 4609c76e authored by Emmanuel Lepage's avatar Emmanuel Lepage

Merge branch 'qt-client' of...

Merge branch 'qt-client' of git+ssh://git.sflphone.org/var/repos/sflphone/git/sflphone into qt-client
parents 32aa4bdd aaf0e396
......@@ -2,6 +2,8 @@
# SFLphone
################################################
* 2010-04-09: 0.9.8 rc1 has been released
* 2010-03-25: 0.9.8 beta has been released
* 2009-12-10: SFLphone 0.9.7 has been released
......
File mode changed from 100644 to 100755
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
AC_INIT([SFLphone],[0.9.8~beta],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
AC_INIT([SFLphone],[0.9.8~rc1],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
AM_CONFIG_HEADER(config.h)
LT_INIT
......
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY app "SFLphone">
<!ENTITY appversion "0.9.8~beta">
<!ENTITY appversion "0.9.8~rc1">
<!ENTITY docversion "1.0">
]>
......
......@@ -195,6 +195,8 @@ void sflphone_fill_account_list (void) {
int count;
GQueue *codeclist;
DEBUG("SFLphone: Fill account list");
count = current_account_get_message_number ();
account_list_clear ();
......@@ -639,7 +641,9 @@ process_dialing(callable_obj_t * c, guint keyval, gchar * key)
if (c->_state == CALL_STATE_TRANSFERT)
{
c->_trsft_to = g_strndup (c->_trsft_to, strlen(c->_trsft_to) - 1);
// Process backspace if and only if string not NULL
if(strlen(c->_trsft_to) > 0)
c->_trsft_to = g_strndup (c->_trsft_to, strlen(c->_trsft_to) - 1);
}
else
{
......@@ -948,13 +952,16 @@ sflphone_place_call ( callable_obj_t * c )
void
sflphone_detach_participant(const gchar* callID)
{
DEBUG("sflphone detach participant from conference");
DEBUG("Action: Detach participant from conference");
if(callID == NULL) {
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
DEBUG(" sflphone_detach_participant %s\n", selectedCall->_callID);
DEBUG("Action: Detach participant %s", selectedCall->_callID);
if(selectedCall->_confID) {
g_free(selectedCall->_confID);
selectedCall->_confID = NULL;
}
calltree_remove_call(current_calls, selectedCall, NULL);
calltree_add_call(current_calls, selectedCall, NULL);
......@@ -962,7 +969,12 @@ sflphone_detach_participant(const gchar* callID)
}
else {
callable_obj_t * selectedCall = calllist_get(current_calls, callID);
DEBUG(" sflphone_detach_participant %s\n", callID);
DEBUG("Action: Darticipant %s", callID);
if(selectedCall->_confID) {
g_free(selectedCall->_confID);
selectedCall->_confID = NULL;
}
calltree_remove_call(current_calls, selectedCall, NULL);
calltree_add_call(current_calls, selectedCall, NULL);
......@@ -1075,7 +1087,9 @@ void sflphone_fill_codec_list () {
guint account_list_size;
guint i;
account_t *current = NULL;
gchar** codecs = NULL;
gchar** codecs = NULL;
DEBUG("SFLphone: Fill codec list");
account_list_size = account_list_get_size ();
......@@ -1099,30 +1113,35 @@ void sflphone_fill_codec_list () {
void sflphone_fill_codec_list_per_account (account_t **account) {
gchar **order;
gchar **order;
gchar** details;
gchar** pl;
gchar *accountID;
GQueue *codeclist;
gboolean active = FALSE;
gchar *accountID;
GQueue *codeclist;
gboolean active = FALSE;
order = (gchar**) dbus_get_active_codec_list ((*account)->accountID);
codeclist = (*account)->codecs;
// First clean the list
codec_list_clear (&codeclist);
// First clean the list
codec_list_clear (&codeclist);
if(!(*order))
ERROR("SFLphone: No codec list provided");
for (pl=order; *order; order++)
for (pl=order; *pl; pl++)
{
codec_t * cpy;
// Each account will have a copy of the system-wide capabilities
codec_create_new_from_caps (codec_list_get_by_payload ((gconstpointer) atoi (*order), NULL), &cpy);
if (cpy) {
cpy->is_active = TRUE;
codec_list_add (cpy, &codeclist);
}
else
ERROR ("Couldn't find codec \n");
codec_t * cpy = NULL;
// Each account will have a copy of the system-wide capabilities
codec_create_new_from_caps (codec_list_get_by_payload ((gconstpointer) (size_t)atoi (*pl), NULL), &cpy);
if (cpy) {
cpy->is_active = TRUE;
codec_list_add (cpy, &codeclist);
}
else
ERROR ("SFLphone: Couldn't find codec");
}
// Test here if we just added some active codec.
......@@ -1134,7 +1153,7 @@ void sflphone_fill_codec_list_per_account (account_t **account) {
codec_t * current_cap = capabilities_get_nth (i);
// Check if this codec has already been enabled for this account
if (codec_list_get_by_payload ( (gconstpointer) current_cap->_payload, codeclist) == NULL) {
if (codec_list_get_by_payload ( (gconstpointer) (size_t)(current_cap->_payload), codeclist) == NULL) {
// codec_t *cpy;
// codec_create_new_from_caps (current_cap, &cpy);
current_cap->is_active = active;
......@@ -1413,7 +1432,7 @@ sflphone_call_state_changed( callable_obj_t * c, const gchar * description, cons
}
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr) {
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size) {
struct ifreq ifr;
int fd;
......@@ -1441,7 +1460,9 @@ void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr)
tmp_addr = (char *)addr_in;
snprintf(*iface_addr, sizeof(*iface_addr), "%d.%d.%d.%d",
snprintf(*iface_addr, size, "%d.%d.%d.%d",
UC(tmp_addr[0]), UC(tmp_addr[1]), UC(tmp_addr[2]), UC(tmp_addr[3]));
close(fd);
}
......@@ -289,5 +289,5 @@ void sflphone_call_state_changed(callable_obj_t * c, const gchar * description,
/**
* Resolve an interface address given its name
*/
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr);
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size);
#endif
......@@ -183,7 +183,7 @@ void create_new_call_from_details (const gchar *call_id, GHashTable *details, ca
else
state = CALL_STATE_FAILURE;
create_new_call (CALL, state, (gchar*)call_id, accountID, peer_name, peer_number, &new_call);
create_new_call (CALL, state, (gchar*)call_id, accountID, peer_name, call_get_peer_number(peer_number), &new_call);
*call = new_call;
}
......
......@@ -145,6 +145,11 @@ void codec_create_new_from_caps (codec_t *original, codec_t **copy) {
codec_t *codec;
if(!original) {
*copy = NULL;
return;
}
codec = g_new0 (codec_t, 1);
codec->_payload = original->_payload;
codec->name = original->name;
......
......@@ -140,11 +140,11 @@ GSList* conference_participant_list_update(gchar** participants, conference_obj_
conf->participant_list = NULL;
}
DEBUG("conference_participant_list_update\n");
DEBUG("Conference: Participant list update");
for (part = participants; *part; part++) {
call_id = (gchar*)(*part);
DEBUG(" adding %s", call_id);
DEBUG("Adding %s", call_id);
conference_add_participant(call_id, conf);
}
......
......@@ -157,7 +157,7 @@ static void sip_apply_callback( void ) {
// Add default interface info
gchar ** iface_list = NULL;
iface_list = (gchar**) dbus_get_all_ip_interface();
iface_list = (gchar**) dbus_get_all_ip_interface_by_name();
gchar ** iface = NULL;
// select the first interface available
......
......@@ -32,7 +32,7 @@ void
addressbook_search(GtkEntry* entry)
{
gchar* query = gtk_entry_get_text(GTK_ENTRY (entry));
const gchar* query = gtk_entry_get_text(GTK_ENTRY (entry));
if (strlen(query) >= 3) {
AddressBook_Config *addressbook_config;
......
......@@ -258,7 +258,7 @@ conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar* confID,
static void
conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo UNUSED )
{
DEBUG ("Conference added %s\n", confID);
DEBUG ("DBUS: Conference %s added", confID);
conference_obj_t* new_conf;
callable_obj_t* call;
......@@ -267,19 +267,18 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
gchar** part;
create_new_conference(CONFERENCE_STATE_ACTIVE_ATACHED, confID, &new_conf);
// new_conf->_confID = g_strdup(confID);
participants = (gchar**) dbus_get_participant_list(new_conf->_confID);
// Update conference list
conference_participant_list_update(participants, new_conf);
// participant = new_conf->participant;
for (part = participants; *part; part++)
{
// Add conference ID in in each calls
for (part = participants; *part; part++) {
call_id = (gchar*) (*part);
call = calllist_get(current_calls, call_id);
call->_confID = g_strdup(confID);
}
}
conferencelist_add(new_conf);
calltree_add_conference(current_calls, new_conf);
......@@ -288,10 +287,26 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
static void
conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo UNUSED )
{
DEBUG ("Conference removed %s\n", confID);
DEBUG ("DBUS: Conference removed %s", confID);
conference_obj_t * c = conferencelist_get(confID);
calltree_remove_conference(current_calls, c, NULL);
GSList *participant = c->participant_list;
callable_obj_t *call;
while(participant) {
call = calllist_get(current_calls, (const gchar *)(participant->data));
if(call) {
DEBUG("DBUS: Remove participant %s", call->_callID);
if(call->_confID){
g_free(call->_confID);
call->_confID = NULL;
}
}
participant = conference_next_participant(participant);
}
conferencelist_remove(c->_confID);
}
......@@ -2159,12 +2174,12 @@ dbus_get_conference_list(void)
}
gchar**
dbus_get_participant_list(const char * confID)
dbus_get_participant_list(const char *confID)
{
GError *error = NULL;
gchar **list = NULL;
DEBUG("get participant list")
DEBUG("DBUS: Get conference %s participant list", confID);
org_sflphone_SFLphone_CallManager_get_participant_list(callManagerProxy,
confID, &list, &error);
......@@ -2605,7 +2620,7 @@ void dbus_enable_status_icon (const gchar *value) {
gchar* dbus_is_status_icon_enabled (void) {
GError *error = NULL;
gchar* value = TRUE;
gchar *value = NULL;
org_sflphone_SFLphone_ConfigurationManager_is_status_icon_enabled (configurationManagerProxy, &value, &error);
......
<?xml version="1.0" ?>
<node name="/org/sflphone/SFLphone">
<interface name="org.sflphone.SFLphone.Instance">
<method name="Register">
<arg type="i" name="pid" direction="in"/>
<arg type="s" name="name" direction="in"/>
</method>
<method name="Unregister">
<arg type="i" name="pid" direction="in"/>
</method>
<method name="getRegistrationCount">
<arg type="i" name="count" direction="out"/>
</method>
</interface>
<node name="/instance-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.sflphone.SFLphone.Instance">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Count the number of clients actually registered to the core. When initializing your client, you need to register it against the core by using this interface.</p>
</tp:docstring>
<method name="Register" tp:name-for-bindings="Register">
<tp:docstring>
Register a new client to the core. Increments the registration count.
</tp:docstring>
<arg type="i" name="pid" direction="in">
<tp:docstring>
The pid of the client process
</tp:docstring>
</arg>
<arg type="s" name="name" direction="in">
<tp:docstring>
The name of the client
</tp:docstring>
</arg>
</method>
<method name="Unregister" tp:name-for-bindings="Unregister">
<tp:docstring>
Unregister a connected client from the core. Decrements the registration count. If no more clients are connected, ie the registration count equals 0, the core properly quits.
</tp:docstring>
<arg type="i" name="pid" direction="in">
<tp:docstring>
The pid of the client process
</tp:docstring>
</arg>
</method>
<method name="getRegistrationCount" tp:name-for-bindings="getRegistrationCount">
<tp:docstring>
Get the number of connected clients.
</tp:docstring>
<arg type="i" name="count" direction="out">
<tp:docstring>
The number of client currently connected to the core
</tp:docstring>
</arg>
</method>
</interface>
</node>
......@@ -105,15 +105,10 @@ main_window_ask_quit ()
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_YES)
{
return TRUE;
}
else if (response == GTK_RESPONSE_NO)
{
return FALSE;
}
return TRUE;
return (response == GTK_RESPONSE_NO)? FALSE : TRUE ;