diff --git a/sflphone-client-gnome/Makefile.am b/sflphone-client-gnome/Makefile.am index 9bea76fc888412c046f9e4f3cba0f9b6e490ff65..e189374c71966cb405b10c602ea8870731bab65e 100644 --- a/sflphone-client-gnome/Makefile.am +++ b/sflphone-client-gnome/Makefile.am @@ -7,7 +7,10 @@ GNOME_DOC=gnome-doc-utils.make log4crc_DATA = log4crc log4crcdir = $(datadir)/sflphone -EXTRA_DIST = $(log4crc_DATA) sflphone.desktop.in $(GNOME_DOC) m4 +uidir=$(DESTDIR)$(datadir)/sflphone/ui +ui_DATA=src/ui.xml + +EXTRA_DIST = $(log4crc_DATA) sflphone.desktop.in $(GNOME_DOC) m4 $(UI_DATA) appsdir = $(datadir)/applications apps_in_files = sflphone.desktop.in apps_DATA = $(apps_in_files:.desktop.in=.desktop) diff --git a/sflphone-client-gnome/config.h.in b/sflphone-client-gnome/config.h.in deleted file mode 100644 index 9a10b27553f790aa78754af6b1921abbf372b4c6..0000000000000000000000000000000000000000 --- a/sflphone-client-gnome/config.h.in +++ /dev/null @@ -1,62 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the <log4c.h> header file. */ -#undef HAVE_LOG4C_H - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/sflphone-client-gnome/configure.ac b/sflphone-client-gnome/configure.ac index 67fe15d2db87a8f8fe254a8686cdfaf7ca7d9449..2b2ac246d636b6216ae674a9976d5ca1578234cc 100644 --- a/sflphone-client-gnome/configure.ac +++ b/sflphone-client-gnome/configure.ac @@ -35,6 +35,10 @@ if ! $have_log4c; then AC_MSG_ERROR(Please install the log4c library) fi +dnl uninstalled gsr ui dir +AC_DEFINE_UNQUOTED(SFLPHONE_UIDIR_UNINSTALLED, "`pwd`/src/", + [path to uninstalled SFLphone UI dir]) + dnl Check for GTK+ version dnl If gtk+-2.0 >= 2.16, we don't need libsexy package anymore PKG_CHECK_MODULES(GTK216, gtk+-2.0 >= 2.16, need_libsexy=false, need_libsexy=true) @@ -78,6 +82,7 @@ src/dbus/Makefile src/contacts/Makefile src/contacts/addressbook/Makefile src/widget/Makefile +src/icons/Makefile pixmaps/Makefile sflphone.desktop tests/Makefile diff --git a/sflphone-client-gnome/doc/C/figures/account_advanced.png b/sflphone-client-gnome/doc/C/figures/account_advanced.png new file mode 100644 index 0000000000000000000000000000000000000000..a7cb301b3057e6271aff992e45aae4d9481d1071 Binary files /dev/null and b/sflphone-client-gnome/doc/C/figures/account_advanced.png differ diff --git a/sflphone-client-gnome/doc/C/figures/account_registration.png b/sflphone-client-gnome/doc/C/figures/account_registration.png new file mode 100644 index 0000000000000000000000000000000000000000..fbc1ca0d4f904fe0f5ec56e73ed4fe77a9edc136 Binary files /dev/null and b/sflphone-client-gnome/doc/C/figures/account_registration.png differ diff --git a/sflphone-client-gnome/doc/C/sflphone.xml b/sflphone-client-gnome/doc/C/sflphone.xml index 1d103c8587e164e3c69e20533bdeb8dfb4d85399..fa9b88dfb1f7b831466893957e2fbb439dd6a95e 100644 --- a/sflphone-client-gnome/doc/C/sflphone.xml +++ b/sflphone-client-gnome/doc/C/sflphone.xml @@ -181,7 +181,7 @@ </sect3> <sect3 id="account_edit"> - <title>Editing an configured account</title> + <title>Editing a configured account</title> <para>To edit an existing account, perform the following steps:</para> <orderedlist> <listitem><para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Manage accounts</guimenuitem></menuchoice>.</para></listitem> @@ -214,8 +214,59 @@ </sect2> <sect2 id="account_advanced"> - <title>SIP advanced features</title> - <para>The advanced security features are only available with SIP.</para> + <title>Advanced features</title> + <para>These features are only available with SIP.</para> + <para>Follow the indications to <link linkend='account_edit'>edit an account</link> and choose the <guimenu>Advanced</guimenu> tab.</para> + <!-- ==== Figure ==== --> + <figure id="account-advanced-fig"> + <title>Advanced features configuration panel</title> + <screenshot> + <mediaobject> + <imageobject> + <imagedata fileref="figures/account_advanced.png" format="PNG"/> + </imageobject> + </mediaobject> + </screenshot> + </figure> + <!-- ==== End of Figure ==== --> + <sect3 id="accounts_registration"> + <title>Registration</title> + <para>You may set the expires header for a contact.</para> + <para>It basically represents the duration your registration will remain active. If you don't register again within that time, calls will no longer be routed to you. it should be not used as a keepalive mechanism though. The default value is 600 seconds (ten minutes).</para> + <note>To register to some VoIP services, you will need to set this value at at least 1600 seconds (Example: French VoIP server freephonie.net). + </note> + </sect3> + <sect3 id="accounts_stun"> + <title>Network</title> + <para>This section enables you to set advanced network parameters.</para> + <variablelist> + <varlistentry> + <term><guilabel>Local address</guilabel></term> + <listitem><para>it is initialized to your private/local IP address. Calls will be routed to this address by default.</para></listitem> + </varlistentry> + <varlistentry> + <term><guilabel>Local port</guilabel></term> + <listitem><para>It is initialized to the default SIP port, 5060.</para></listitem> + </varlistentry> + <varlistentry> + <term><guilabel>Set published address and port</guilabel></term> + <listitem> + <itemizedlist> + <listitem>Using STUN + <para>If enabled, the core will try to initialize an UDP transport on the mapped address/port number that the NAT (Network Address Translator) has allocated to <application>SFLphone</application>.</para></listitem> + <listitem>Same as local parameters + </listitem> + <listitem>Manually + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </sect3> + </sect2> + <sect2 id="account_security"> + <title>Security features</title> + <para>These features are only available with SIP.</para> <sect3 id="accounts_zrtp"> <title>Secure RTP</title> </sect3> diff --git a/sflphone-client-gnome/doc/Makefile.am b/sflphone-client-gnome/doc/Makefile.am index fc8f89d31d95bd3e0cfe6361e6d7f76bc4250e3d..b98e32348b0dbc2bd444dd6b3c7a5c0f0faa5ecc 100644 --- a/sflphone-client-gnome/doc/Makefile.am +++ b/sflphone-client-gnome/doc/Makefile.am @@ -22,5 +22,6 @@ DOC_FIGURES = figures/addressbook-button.png \ figures/configfile-settings.png \ figures/notif-example.png \ figures/systemtray-settings.png \ - figures/voicemail-notif.png + figures/voicemail-notif.png \ + figures/account_advanced.png DOC_LINGUAS = fr de es it zh_TW zh_HK zh_CN ko pl pt_BR pt ru diff --git a/sflphone-client-gnome/globals.mak b/sflphone-client-gnome/globals.mak index 041c4d9d0f48baebcbffc54735621e3122dcd17a..027c152adb7defd6cd9acbf4a3f1d593e5fe2e78 100644 --- a/sflphone-client-gnome/globals.mak +++ b/sflphone-client-gnome/globals.mak @@ -17,5 +17,6 @@ AM_CPPFLAGS = $(DEPS_CFLAGS) \ -DPREFIX=\""$(prefix)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DDATADIR=\""$(datadir)"\" \ - -DLIBDIR=\""$(libdir)"\" + -DLIBDIR=\""$(libdir)"\" \ + -DSFLPHONE_UIDIR=\""$(datadir)/sflphone/ui"\" diff --git a/sflphone-client-gnome/pixmaps/Makefile.am b/sflphone-client-gnome/pixmaps/Makefile.am index aab059e630c6f72f6f5311dd2100b8c2e8dcc1ae..33dc526e3ffdce17f9f6263f09eabb4079192978 100644 --- a/sflphone-client-gnome/pixmaps/Makefile.am +++ b/sflphone-client-gnome/pixmaps/Makefile.am @@ -2,7 +2,43 @@ icondir = $(datadir)/pixmaps icon_DATA = sflphone.svg -buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history2.svg sflphone.svg sflphone_small.svg stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg usersActive.svg home.svg wait-on.gif lock_certified.svg lock_confirmed.svg lock_error.svg lock_off.svg lock_unconfirmed.svg +buttons_DATA = current.svg \ + transfert.svg \ + hold.svg \ + unhold.svg \ + refuse.svg \ + call.svg \ + ring.svg \ + dial.svg \ + mic.svg \ + mic_25.svg \ + mic_50.svg \ + mic_75.svg \ + speaker.svg \ + speaker_25.svg \ + speaker_50.svg \ + speaker_75.svg \ + fail.svg \ + incoming.svg \ + outgoing.svg \ + missed.svg \ + busy.svg \ + sflphone.svg \ + sflphone_small.svg \ + stock_person.svg \ + icon_rec.svg \ + rec_call.svg \ + contact_default.svg \ + face-monkey.svg \ + users.svg \ + usersActive.svg \ + home.svg \ + wait-on.gif \ + lock_certified.svg \ + lock_confirmed.svg \ + lock_error.svg \ + lock_off.svg \ + lock_unconfirmed.svg buttonsdir = $(datadir)/sflphone EXTRA_DIST = $(buttons_DATA) $(icon_DATA) diff --git a/sflphone-client-gnome/src/Makefile.am b/sflphone-client-gnome/src/Makefile.am index 0d69be795377135e87800d62fde39adeb4a159e2..1f2eb25028fb0feb0338cbd606698395e788fb82 100644 --- a/sflphone-client-gnome/src/Makefile.am +++ b/sflphone-client-gnome/src/Makefile.am @@ -2,21 +2,21 @@ include ../globals.mak bin_PROGRAMS = sflphone-client-gnome -SUBDIRS = config contacts dbus widget +SUBDIRS = config contacts dbus widget icons NOFIFY_LIBS = -lnotify LOG4C = -llog4c -SFLPHONEGTK_LIBS=./contacts/libcontacts.la ./config/libconfig.la ./dbus/libdbus.la ./widget/libwidget.la + +SFLPHONEGTK_LIBS=./contacts/libcontacts.la ./config/libconfig.la ./dbus/libdbus.la ./widget/libwidget.la ./icons/libicons.la sflphone_client_gnome_SOURCES = \ main.c \ errors.c \ + uimanager.c \ sflnotify.c \ mainwindow.c \ dialpad.c \ - menus.c \ - toolbar.c \ callable_obj.c \ conference_obj.c \ actions.c \ @@ -24,13 +24,11 @@ sflphone_client_gnome_SOURCES = \ sliders.c \ statusicon.c \ codeclist.c \ - reqaccount.c + reqaccount.c noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \ - reqaccount.h errors.h sflphone_const.h \ - menus.h accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h toolbar.h - - + reqaccount.h errors.h sflphone_const.h uimanager.h \ + accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h sflphone_client_gnome_LDADD = $(DEPS_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(LOG4C) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 601414d77f372cba6a4c057055e97f6130c10b69..c638854fdf6e5e9cce90e1731df22adb6a5f419b 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -22,8 +22,7 @@ #include <dbus/dbus.h> #include <statusicon.h> #include <contacts/searchbar.h> -#include <menus.h> -#include <toolbar.h> +#include "icons/icon_factory.h" #include <gtk/gtk.h> #include <string.h> @@ -125,7 +124,7 @@ sflphone_hold (callable_obj_t * c ) { c->_state = CALL_STATE_HOLD; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -133,7 +132,7 @@ sflphone_ringing(callable_obj_t * c ) { c->_state = CALL_STATE_RINGING; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -143,7 +142,7 @@ sflphone_hung_up( callable_obj_t * c) calltree_remove_call(current_calls, c, NULL); c->_state = CALL_STATE_DIALING; call_remove_all_errors(c); - update_menus(); + update_actions(); #if GTK_CHECK_VERSION(2,10,0) status_tray_icon_blink( FALSE ); #endif @@ -259,7 +258,7 @@ sflphone_fill_account_list(gboolean toolbarInitialized) // Prevent update being called when toolbar is not yet initialized if(toolbarInitialized) - toolbar_update_buttons(); + update_actions (); } gboolean sflphone_init() @@ -273,13 +272,16 @@ gboolean sflphone_init() { dbus_register(getpid(), "Gtk+ Client"); + // Init icons factory + init_icon_factory (); + current_calls = calltab_init(FALSE, CURRENT_CALLS); contacts = calltab_init(TRUE, CONTACTS); history = calltab_init(TRUE, HISTORY); account_list_init (); codec_list_init(); - conferencelist_init(); + conferencelist_init(); // Fetch the configured accounts sflphone_fill_account_list(FALSE); @@ -290,8 +292,8 @@ gboolean sflphone_init() // Fetch the audio codecs sflphone_fill_codec_list(); - // Fetch the conference list - sflphone_fill_conference_list(); + // Fetch the conference list + sflphone_fill_conference_list(); return TRUE; } @@ -468,7 +470,7 @@ sflphone_fail( callable_obj_t * c ) { c->_state = CALL_STATE_FAILURE; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -476,7 +478,7 @@ sflphone_busy( callable_obj_t * c ) { c->_state = CALL_STATE_BUSY; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -486,7 +488,7 @@ sflphone_current( callable_obj_t * c ) set_timestamp (&c->_time_start); c->_state = CALL_STATE_CURRENT; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -496,7 +498,7 @@ sflphone_record( callable_obj_t * c ) set_timestamp (&c->_time_start); c->_state = CALL_STATE_RECORD; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -508,9 +510,9 @@ sflphone_set_transfert() c->_state = CALL_STATE_TRANSFERT; c->_trsft_to = g_strdup(""); calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } - toolbar_update_buttons(); + update_actions(); } void @@ -522,9 +524,9 @@ sflphone_unset_transfert() c->_state = CALL_STATE_CURRENT; c->_trsft_to = g_strdup(""); calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } - toolbar_update_buttons(); + update_actions(); } void @@ -540,7 +542,7 @@ sflphone_incoming_call (callable_obj_t * c) calllist_add ( current_calls, c ); calllist_add( history, c ); calltree_add_call( current_calls, c, NULL); - update_menus(); + update_actions(); calltree_display (current_calls); } @@ -627,10 +629,15 @@ sflphone_new_call() { callable_obj_t *c; + callable_obj_t * current_selected_call; gchar *peer_name, *peer_number; DEBUG("sflphone_new_call"); - sflphone_on_hold(); + + current_selected_call = calltab_get_selected_call(current_calls); + + if ((current_selected_call != NULL) && (current_selected_call->_confID == NULL)) + sflphone_on_hold(); // Play a tone when creating a new call if( calllist_get_size(current_calls) == 0 ) @@ -642,7 +649,7 @@ sflphone_new_call() calllist_add (current_calls,c); calltree_add_call (current_calls, c, NULL); - update_menus(); + update_actions(); return c; } @@ -777,7 +784,6 @@ sflphone_keypad( guint keyval, gchar * key) * If there is no default account selected, place a call with the first * registered account of the account list * Else, check if it an IP call. if not, popup an error message - * */ static gboolean _is_direct_call(callable_obj_t * c) { @@ -907,12 +913,20 @@ sflphone_display_selected_codec (const gchar* codecName) msg = g_markup_printf_escaped (_("IP call - %s"), codecName); } else { - msg = g_markup_printf_escaped("%s %s (%s) - %s %s" , + + if (strcmp(codecName, "") != 0) { + msg = g_markup_printf_escaped("%s %s (%s) - %s %s" , _("Using account"), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE), _("Codec"), codecName); + } else { + msg = g_markup_printf_escaped("%s %s (%s)" , + _("Using account"), + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS), + (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE)); + } } statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); g_free(msg); @@ -1046,7 +1060,7 @@ sflphone_rec_call() } } calltree_update_call(current_calls, selectedCall, NULL); - update_menus(); + update_actions(); // gchar* codname = sflphone_get_current_codec_name(); // DEBUG("sflphone_get_current_codec_name: %s",codname); @@ -1227,7 +1241,7 @@ sflphone_srtp_on( callable_obj_t * c) c->_srtp_state = SRTP_STATE_SAS_UNCONFIRMED; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -1235,7 +1249,7 @@ sflphone_srtp_off( callable_obj_t * c ) { c->_srtp_state = SRTP_STATE_UNLOCKED; calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -1251,7 +1265,7 @@ sflphone_srtp_show_sas( callable_obj_t * c, const gchar* sas, const gboolean ver c->_srtp_state = SRTP_STATE_SAS_UNCONFIRMED; } calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } void @@ -1299,5 +1313,5 @@ sflphone_call_state_changed( callable_obj_t * c, const gchar * description, cons } calltree_update_call(current_calls, c, NULL); - update_menus(); + update_actions(); } diff --git a/sflphone-client-gnome/src/callable_obj.c b/sflphone-client-gnome/src/callable_obj.c index 61d4c1e21a158155ab53cf15282eb20d2b93e65b..be338bef59695ade86f54da3f6b3aa1a19ea8e7d 100644 --- a/sflphone-client-gnome/src/callable_obj.c +++ b/sflphone-client-gnome/src/callable_obj.c @@ -112,8 +112,9 @@ void create_new_call (callable_type_t type, call_state_t state, gchar* callID , call_id = generate_call_id (); else call_id = callID; - // Set the ID + // Set the IDs obj->_callID = g_strdup (call_id); + obj->_confID = NULL; *new_call = obj; } diff --git a/sflphone-client-gnome/src/callable_obj.h b/sflphone-client-gnome/src/callable_obj.h index 75e59232b8fa03980cc2728a407a4d4308f54112..d23bc90cae333e7355b0f4984d9fdc31db4c6b2f 100644 --- a/sflphone-client-gnome/src/callable_obj.h +++ b/sflphone-client-gnome/src/callable_obj.h @@ -95,6 +95,7 @@ typedef struct { int _state_code; // The numeric state code as defined in SIP or IAX gchar* _state_code_description; // A textual description of _state_code gchar* _callID; // The call ID + gchar* _confID; // The conference ID (NULL if don't participate to a conference) gchar* _accountID; // The account the call is made with time_t _time_start; // The timestamp the call was initiating time_t _time_stop; // The timestamp the call was over diff --git a/sflphone-client-gnome/src/conference_obj.h b/sflphone-client-gnome/src/conference_obj.h index 7f0dac5cb10d5ed9b755b0b869f366c7d795c503..a54e68b64d561e05e6187ba4006311d389855514 100644 --- a/sflphone-client-gnome/src/conference_obj.h +++ b/sflphone-client-gnome/src/conference_obj.h @@ -49,6 +49,7 @@ typedef struct { gchar* _confID; // The call ID gboolean _conference_secured; // the security state of the conference gboolean _conf_srtp_enabled; // security required for this conference + gchar** participant; // participant list for this } conference_obj_t; diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c index 3ee0a2da686e6279905d5c414b6562d1f927fdad..a420814dea0071ba12fec9d2bfe77748dc748cbe 100644 --- a/sflphone-client-gnome/src/config/preferencesdialog.c +++ b/sflphone-client-gnome/src/config/preferencesdialog.c @@ -26,7 +26,6 @@ #include <accountconfigdialog.h> #include <actions.h> #include <config.h> -#include <toolbar.h> #include <dbus/dbus.h> #include <mainwindow.h> #include <audioconf.h> diff --git a/sflphone-client-gnome/src/contacts/addressbook.c b/sflphone-client-gnome/src/contacts/addressbook.c index cadaa21d135de7746ce69e36db878a723e12e153..60557d04f6533ac2b87e724d6570bb170c7251ae 100644 --- a/sflphone-client-gnome/src/contacts/addressbook.c +++ b/sflphone-client-gnome/src/contacts/addressbook.c @@ -19,7 +19,6 @@ #include <addressbook.h> #include <searchbar.h> -#include <toolbar.h> #include <string.h> #include <addressbook-config.h> @@ -109,7 +108,7 @@ addressbook_config_books() } // Update buttons - toolbar_update_buttons(); + update_actions (); } /** diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 40e772bbd67c1823fdc43edc16bfb7c1b5d9b101..08b015d3a434c1136e6452a66c92912595d95ac1 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -24,7 +24,6 @@ #include <glib/gprintf.h> #include <calllist.h> #include <conferencelist.h> -#include <toolbar.h> #include <mainwindow.h> #include <history.h> @@ -145,7 +144,7 @@ call_selected_cb(GtkTreeSelection *sel, void* data UNUSED ) // sflphone_fill_conference_list(); g_value_unset(&val); - toolbar_update_buttons(); + update_actions(); } @@ -163,73 +162,84 @@ row_activated(GtkTreeView *tree_view UNUSED, DEBUG("double click action"); - if( active_calltree == current_calls ) + if(calltab_get_selected_type(active_calltree) == A_CALL) { - - if(calltab_get_selected_type(current_calls) == A_CALL) + + DEBUG("Selected a call\n"); + selectedCall = calltab_get_selected_call(active_calltree); + + if (selectedCall) { - selectedCall = calltab_get_selected_call(current_calls); + DEBUG("there is a selected call\n"); - if (selectedCall) + // Get the right event from the right calltree + if( active_calltree == current_calls ) { - // Get the right event from the right calltree - if( active_calltree == current_calls ) + + DEBUG("active tree is current calls"); + + switch(selectedCall->_state) { - switch(selectedCall->_state) - { - case CALL_STATE_INCOMING: - dbus_accept(selectedCall); - stop_notification(); - break; - case CALL_STATE_HOLD: - dbus_unhold(selectedCall); - break; - case CALL_STATE_RINGING: - case CALL_STATE_CURRENT: - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - break; - case CALL_STATE_DIALING: - sflphone_place_call (selectedCall); - break; - default: - WARN("Row activated - Should not happen!"); - break; - } + case CALL_STATE_INCOMING: + dbus_accept(selectedCall); + stop_notification(); + break; + case CALL_STATE_HOLD: + dbus_unhold(selectedCall); + break; + case CALL_STATE_RINGING: + case CALL_STATE_CURRENT: + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + break; + case CALL_STATE_DIALING: + sflphone_place_call (selectedCall); + break; + default: + WARN("Row activated - Should not happen!"); + break; } + } - // If history or contact: double click action places a new call - else - { - account_id = g_strdup (selectedCall->_accountID); + // If history or contact: double click action places a new call + else + { + DEBUG("active tree is history or contact"); - // Create a new call - create_new_call (CALL, CALL_STATE_DIALING, "", account_id, selectedCall->_peer_name, selectedCall->_peer_number, &new_call); - - calllist_add(current_calls, new_call); - calltree_add_call(current_calls, new_call, NULL); - sflphone_place_call(new_call); - calltree_display(current_calls); - } + account_id = g_strdup (selectedCall->_accountID); + + // Create a new call + create_new_call (CALL, CALL_STATE_DIALING, "", account_id, selectedCall->_peer_name, selectedCall->_peer_number, &new_call); + + calllist_add(current_calls, new_call); + calltree_add_call(current_calls, new_call, NULL); + sflphone_place_call(new_call); + calltree_display(current_calls); } } - else + } + else if(calltab_get_selected_type(current_calls) == A_CONFERENCE) + { + DEBUG("Selected a conference\n"); + + if( active_calltree == current_calls ) { + selectedConf = calltab_get_selected_conf(current_calls); if(selectedConf) { switch(selectedConf->_state) { - case CONFERENCE_STATE_ACTIVE_ATACHED: + case CONFERENCE_STATE_ACTIVE_ATACHED: sflphone_add_main_participant(selectedConf); break; - case CONFERENCE_STATE_ACTIVE_DETACHED: - sflphone_add_main_participant(selectedConf); - break; - case CONFERENCE_STATE_HOLD: - sflphone_conference_off_hold(selectedConf); - break; + case CONFERENCE_STATE_ACTIVE_DETACHED: + sflphone_add_main_participant(selectedConf); + break; + case CONFERENCE_STATE_HOLD: + sflphone_conference_off_hold(selectedConf); + break; } } } @@ -269,6 +279,12 @@ row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED) */ if( active_calltree == current_calls ) { + + // sflphone_selected_call_codec(selectedCall); + + // DEBUG("single click action: %s", dbus_get_current_codec_name(selectedCall)); + sflphone_display_selected_codec(dbus_get_current_codec_name(selectedCall)); + switch(selectedCall->_srtp_state) { case SRTP_STATE_SAS_UNCONFIRMED: @@ -326,14 +342,14 @@ calltree_reset (calltab_t* tab) void focus_on_calltree_out(){ - DEBUG("set_focus_on_calltree_out"); + //DEBUG("set_focus_on_calltree_out"); // gtk_widget_grab_focus(GTK_WIDGET(sw)); focus_is_on_calltree = FALSE; } void focus_on_calltree_in(){ - DEBUG("set_focus_on_calltree_in"); + //DEBUG("set_focus_on_calltree_in"); // gtk_widget_grab_focus(GTK_WIDGET(sw)); focus_is_on_calltree = TRUE; } @@ -494,7 +510,7 @@ calltree_remove_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) callable_obj_t * selectedCall = calltab_get_selected_call(tab); if(selectedCall == c) calltab_select_call(tab, NULL); - toolbar_update_buttons(); + update_actions(); } void @@ -666,7 +682,7 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) } } - toolbar_update_buttons(); + update_actions(); } @@ -887,7 +903,7 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf) GtkTreePath *path; GtkTreeModel *model = (GtkTreeModel*)active_calltree->store; - gchar** participant = (gchar**)dbus_get_participant_list(conf->_confID); + gchar** participant = conf->participant; gchar** pl; gchar* call_id; @@ -906,6 +922,8 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf) if( tab == current_calls ) { + + DEBUG("------------- calltree_add_conference %s, %s ------------------------", tab, current_calls); switch(conf->_state) { case CONFERENCE_STATE_ACTIVE_ATACHED: @@ -926,133 +944,137 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf) WARN("Update conference add - Should not happen!"); } - } - else { - WARN ("Conferences cannot be added in this widget - This is a bug in the application."); - } - //Resize it - if(pixbuf) - { - if(gdk_pixbuf_get_width(pixbuf) > 32 || gdk_pixbuf_get_height(pixbuf) > 32) - { - pixbuf = gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR); - } - } - else - { - DEBUG("Error no pixbuff for conference from %s", ICONS_DIR); - } - - - // Used to determine if at least one participant use a security feature - // If true (at least on call use a security feature) we need to display security icons - conf->_conf_srtp_enabled = FALSE; + //Resize it + if(pixbuf) + { + if(gdk_pixbuf_get_width(pixbuf) > 32 || gdk_pixbuf_get_height(pixbuf) > 32) + { + pixbuf = gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR); + } + } + else + { + DEBUG("Error no pixbuff for conference from %s", ICONS_DIR); + } - // Used to determine if the conference is secured - // Every participant to a conference must be secured, the conference is not secured elsewhere - conf->_conference_secured = TRUE; + // Used to determine if at least one participant use a security feature + // If true (at least on call use a security feature) we need to display security icons + conf->_conf_srtp_enabled = FALSE; - participant = (gchar**)dbus_get_participant_list(conf->_confID); - if(participant) - { - participant = (gchar**)dbus_get_participant_list(conf->_confID); - for (pl = participant; *participant; participant++) - { - call_id = (gchar*)(*participant); - call = calllist_get (tab, call_id); + // Used to determine if the conference is secured + // Every participant to a conference must be secured, the conference is not secured elsewhere + conf->_conference_secured = TRUE; - if(call != NULL) { - - account_details = account_list_get_by_id(call->_callID); - if(account_details != NULL) { - srtp_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_SRTP_ENABLED); - } - if(g_strcasecmp(srtp_enabled,"true") == 0) { - conf->_conf_srtp_enabled = TRUE; - break; - } - - - } - - } - - if(conf->_conf_srtp_enabled) + participant = conf->participant; + if(participant) { - participant = (gchar**)dbus_get_participant_list(conf->_confID); + participant = conf->participant; for (pl = participant; *participant; participant++) { call_id = (gchar*)(*participant); call = calllist_get (tab, call_id); - + if(call != NULL) { - if(call->_srtp_state == 0) - { - conf->_conference_secured = FALSE; + account_details = account_list_get_by_id(call->_callID); + if(account_details != NULL) { + srtp_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_SRTP_ENABLED); + } + + if(g_strcasecmp(srtp_enabled,"true") == 0) { + conf->_conf_srtp_enabled = TRUE; break; } + + } + } - } - } - if(conf->_conf_srtp_enabled) - { - if(conf->_conference_secured) - { - pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL); + if(conf->_conf_srtp_enabled) + { + participant = conf->participant; + for (pl = participant; *participant; participant++) + { + call_id = (gchar*)(*participant); + call = calllist_get (tab, call_id); + + if(call != NULL) { + + if(call->_srtp_state == 0) + { + conf->_conference_secured = FALSE; + break; + } + } + } + } } - else + + if(conf->_conf_srtp_enabled) { - pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL); + if(conf->_conference_secured) + { + pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL); + } + else + { + pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL); + } } - } - DEBUG("add conference to tree store"); - - gtk_tree_store_set(tab->store, &iter, - 0, pixbuf, // Icon - 1, description, // Description - 2, pixbuf_security, - 3, conf, // Pointer - -1); + DEBUG("add conference to tree store"); + + gtk_tree_store_set(tab->store, &iter, + 0, pixbuf, // Icon + 1, description, // Description + 2, pixbuf_security, + 3, conf, // Pointer + -1); - DEBUG("add conference to tree store"); + DEBUG("add conference to tree store"); - if (pixbuf != NULL) - g_object_unref(G_OBJECT(pixbuf)); + if (pixbuf != NULL) + g_object_unref(G_OBJECT(pixbuf)); - participant = (gchar**)dbus_get_participant_list(conf->_confID); - if(participant) - { - for (pl = participant; *participant; participant++) + participant = conf->participant; + if(participant) { - - - call_id = (gchar*)(*participant); - call = calllist_get (tab, call_id); - // create_new_call_from_details (conf_id, conference_details, &c); + for (pl = participant; *participant; participant++) + { + + + call_id = (gchar*)(*participant); + call = calllist_get (tab, call_id); + // create_new_call_from_details (conf_id, conference_details, &c); - calltree_remove_call(tab, call, NULL); - calltree_add_call (tab, call, &iter); + calltree_remove_call(tab, call, NULL); + calltree_add_call (tab, call, &iter); + } } - } + } + + else + { + WARN ("Conferences cannot be added in this widget - This is a bug in the application."); + } + gtk_tree_view_set_model(GTK_TREE_VIEW(tab->view), GTK_TREE_MODEL(tab->store)); path = gtk_tree_model_get_path(model, &iter); gtk_tree_view_expand_row(GTK_TREE_VIEW(tab->view), path, FALSE); - toolbar_update_buttons(); + update_actions(); + } @@ -1134,7 +1156,7 @@ void calltree_remove_conference (calltab_t* tab, const conference_obj_t* conf, G // if(selectedCall == c) // calltab_select_call(tab, NULL); - toolbar_update_buttons(); + update_actions(); } @@ -1153,12 +1175,14 @@ void calltree_display (calltab_t *tab) { DEBUG ("display main tab"); + if (active_calltree==contacts) { gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE); } else { gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE); } - + gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)currentCallsButton, TRUE); + } /* case 2: we want to display the history */ @@ -1195,7 +1219,7 @@ void calltree_display (calltab_t *tab) { sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (active_calltree->view)); DEBUG("Emit signal changed from calltree_display"); g_signal_emit_by_name(sel, "changed"); - toolbar_update_buttons(); + update_actions(); } @@ -1255,6 +1279,7 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d else if(selected_type == A_CALL && dragged_type == A_CONFERENCE) { // dragged a single call on a conference + selected_call->_confID = g_strdup(dragged_call_id); sflphone_add_participant(selected_call_id, dragged_call_id); } else if(selected_type == A_CONFERENCE && dragged_type == A_CALL) diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index 8a00188806bbf91413d08960d5a5bdb610a025a7..fd1392e1ea2e27e356289fc85be18249f11bd6d5 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -212,7 +212,7 @@ call_state_cb (DBusGProxy *proxy UNUSED, calllist_add (current_calls, new_call); calllist_add (history, new_call); calltree_add_call (current_calls, new_call, NULL); - update_menus (); + update_actions (); calltree_display (current_calls); //sflphone_incoming_call (new_call); @@ -249,6 +249,8 @@ conference_changed_cb (DBusGProxy *proxy UNUSED, changed_conf->_state = CONFERENCE_STATE_HOLD; } + changed_conf->participant = (gchar**)dbus_get_participant_list(changed_conf->_confID); + calltree_add_conference (current_calls, changed_conf); } } @@ -262,10 +264,24 @@ conference_created_cb (DBusGProxy *proxy UNUSED, DEBUG ("Conference added %s\n", confID); conference_obj_t* new_conf; + callable_obj_t* call; + gchar* call_id; + gchar** participant; + gchar** pl; create_new_conference(CONFERENCE_STATE_ACTIVE_ATACHED, confID, &new_conf); new_conf->_confID = g_strdup(confID); + new_conf->participant = (gchar**)dbus_get_participant_list(new_conf->_confID); conferencelist_add(new_conf); + + participant = new_conf->participant; + for (pl = participant; *participant; participant++) + { + call_id = (gchar*)(*participant); + call = calllist_get (current_calls, call_id); + call->_confID = g_strdup(confID); + } + calltree_add_conference (current_calls, new_conf); } diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h index 123322b2816652ce28162c92c78fdf04031fab46..2eee31056698cbb19485190723e5afb4e3fe939a 100644 --- a/sflphone-client-gnome/src/dbus/dbus.h +++ b/sflphone-client-gnome/src/dbus/dbus.h @@ -605,6 +605,7 @@ void dbus_set_confirm_go_clear (const callable_obj_t * c); */ gchar** dbus_get_supported_tls_method(); +gchar** dbus_get_participant_list (const char * confID); #endif diff --git a/sflphone-client-gnome/src/icons/Makefile b/sflphone-client-gnome/src/icons/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..af1bef0e29349a059e9c4a225cc1fca657caa76a --- /dev/null +++ b/sflphone-client-gnome/src/icons/Makefile @@ -0,0 +1,491 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# src/icons/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/SFLphone +pkglibdir = $(libdir)/SFLphone +pkgincludedir = $(includedir)/SFLphone +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +DIST_COMMON = $(srcdir)/../../globals.mak $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +subdir = src/icons +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libicons_la_LIBADD = +am_libicons_la_OBJECTS = libicons_la-icon_factory.lo +libicons_la_OBJECTS = $(am_libicons_la_OBJECTS) +libicons_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libicons_la_CFLAGS) \ + $(CFLAGS) $(libicons_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libicons_la_SOURCES) +DIST_SOURCES = $(libicons_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run autoconf +AUTOHEADER = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run autoheader +AUTOMAKE = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run automake-1.10 +AWK = mawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CHECK_CFLAGS = +CHECK_LIBS = -lcheck +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DBUSGLIB_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +DBUSGLIB_LIBS = -L//lib -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DEPS_CFLAGS = -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/evolution-data-server-2.26 -I/usr/include/libbonobo-2.0 -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/libsoup-2.4 -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gail-1.0 +DEPS_LIBS = -pthread -L//lib -lnotify -ldbus-glib-1 -ldbus-1 -lebook-1.2 -ledataserver-1.2 -lxml2 -lsoup-2.4 -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 +DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper +DOC_USER_FORMATS = +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GREP = /bin/grep +GTK216_CFLAGS = -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +GTK216_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 +HELP_DIR = ${datadir}/gnome/help +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBOBJS = +LIBS = +LIBSEXY_CFLAGS = +LIBSEXY_LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/manu/git-repos/sflphone/sflphone-client-gnome/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OMF_DIR = ${datadir}/omf +OTOOL = +OTOOL64 = +PACKAGE = SFLphone +PACKAGE_BUGREPORT = sflphoneteam@savoirfairelinux.com +PACKAGE_NAME = SFLphone +PACKAGE_STRING = SFLphone 0.9.6~beta +PACKAGE_TARNAME = sflphone-client-gnome +PACKAGE_VERSION = 0.9.6~beta +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 0.9.7~beta +abs_builddir = /home/manu/git-repos/sflphone/sflphone-client-gnome/src/icons +abs_srcdir = /home/manu/git-repos/sflphone/sflphone-client-gnome/src/icons +abs_top_builddir = /home/manu/git-repos/sflphone/sflphone-client-gnome +abs_top_srcdir = /home/manu/git-repos/sflphone/sflphone-client-gnome +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/manu/git-repos/sflphone/sflphone-client-gnome/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. + +# Global variables +src = $(top_srcdir) + +# Preprocessor flags +AM_CPPFLAGS = $(DEPS_CFLAGS) \ + $(LIBSEXY_CFLAGS) \ + -I$(src)/src \ + -I$(src)/src/config \ + -I$(src)/src/dbus \ + -I$(src)/src/contacts \ + -I$(src)/src/addressbook \ + -DDATA_DIR=\""$(prefix)/share/sflphone"\" \ + -DICONS_DIR=\""$(prefix)/share/sflphone"\" \ + -DCODECS_DIR=\""$(prefix)/lib/sflphone/codecs"\" \ + -DPREFIX=\"$(prefix)\" \ + -DENABLE_TRACE \ + -DPREFIX=\""$(prefix)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBDIR=\""$(libdir)"\" \ + -DSFLPHONE_UIDIR=\""$(datadir)/sflphone/ui"\" + +noinst_LTLIBRARIES = libicons.la +libicons_la_SOURCES = \ + icon_factory.c + +noinst_libicons_la_HEADER = \ + icon_factory.h \ + pixmaps_data.h + +libicons_la_LDFLAGS = @DEPS_LDFLAGS@ +libicons_la_CFLAGS = -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/evolution-data-server-2.26 -I/usr/include/libbonobo-2.0 -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/libsoup-2.4 -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gail-1.0 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../globals.mak $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/icons/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/icons/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libicons.la: $(libicons_la_OBJECTS) $(libicons_la_DEPENDENCIES) + $(libicons_la_LINK) $(libicons_la_OBJECTS) $(libicons_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/libicons_la-icon_factory.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +libicons_la-icon_factory.lo: icon_factory.c + $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libicons_la_CFLAGS) $(CFLAGS) -MT libicons_la-icon_factory.lo -MD -MP -MF $(DEPDIR)/libicons_la-icon_factory.Tpo -c -o libicons_la-icon_factory.lo `test -f 'icon_factory.c' || echo '$(srcdir)/'`icon_factory.c + mv -f $(DEPDIR)/libicons_la-icon_factory.Tpo $(DEPDIR)/libicons_la-icon_factory.Plo +# source='icon_factory.c' object='libicons_la-icon_factory.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libicons_la_CFLAGS) $(CFLAGS) -c -o libicons_la-icon_factory.lo `test -f 'icon_factory.c' || echo '$(srcdir)/'`icon_factory.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/sflphone-client-gnome/src/icons/Makefile.am b/sflphone-client-gnome/src/icons/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..2d4a193c28a192d4ae42364387017468b7276b48 --- /dev/null +++ b/sflphone-client-gnome/src/icons/Makefile.am @@ -0,0 +1,14 @@ +include ../../globals.mak + +noinst_LTLIBRARIES = libicons.la + +libicons_la_SOURCES = \ + icon_factory.c + +noinst_libicons_la_HEADER= \ + icon_factory.h \ + pixmaps_data.h + +libicons_la_LDFLAGS = @DEPS_LDFLAGS@ + +libicons_la_CFLAGS = @DEPS_CFLAGS@ diff --git a/sflphone-client-gnome/src/icons/README b/sflphone-client-gnome/src/icons/README new file mode 100644 index 0000000000000000000000000000000000000000..064443d612404e0796f8bbf0ae9269b5b029cbd7 --- /dev/null +++ b/sflphone-client-gnome/src/icons/README @@ -0,0 +1,14 @@ +To add a svg icon as a stock icon: + +1. Dump the raw data from the svg: +gdk-pixbuf-csource --raw --name=gnome_stock_example example.svg + +2. Copy the output in the file sflphone-client-gnome/src/icons/pixmaps_data.h + +3. Create the alias in sflphone-client-gnome/src/icons/icon_factory.h : + #define GTK_STOCK_EXAMPLE "gnome-stock-example" + +4. Add the icon to the factory. In sflphone-client-gnome/src/icons/icon_factory.c, function register_sflphone_stock_icons, add the line: + add_icon (factory, GTK_STOCK_EXAMPLE, gnome_stock_example, GTK_ICON_SIZE_SMALL_TOOLBAR) + + You may now use this icon in the code just like a GTK stock icon, the stock id being GTK_STOCK_EXAMPLE. diff --git a/sflphone-client-gnome/src/icons/icon_factory.c b/sflphone-client-gnome/src/icons/icon_factory.c new file mode 100644 index 0000000000000000000000000000000000000000..08b05a01963a6d89840739bc00b50cf60fce302a --- /dev/null +++ b/sflphone-client-gnome/src/icons/icon_factory.c @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "icon_factory.h" + +static GtkIconFactory *icon_factory = NULL; + +void init_icon_factory (void) +{ + // Init the factory + icon_factory = gtk_icon_factory_new (); + + // Load icons + register_sflphone_stock_icons (icon_factory); + + // Specify a default icon set + gtk_icon_factory_add_default (icon_factory); +} + +void add_icon (GtkIconFactory *factory, const gchar *stock_id, const guint8 *icon_data, GtkIconSize size) +{ + GtkIconSet *icons; + GtkIconSource *source; + GdkPixbuf *pixbuf; + + icons = gtk_icon_factory_lookup (factory, stock_id); + if (!icons) + { + pixbuf = gdk_pixbuf_new_from_inline (-1, icon_data, FALSE, NULL); + source = gtk_icon_source_new (); + gtk_icon_source_set_pixbuf (source, pixbuf); + gtk_icon_source_set_size (source, size); + + icons = gtk_icon_set_new (); + gtk_icon_set_add_source (icons, source); + + gtk_icon_factory_add (factory, stock_id, icons); + + g_object_unref (G_OBJECT (pixbuf)); + gtk_icon_source_free (source); + gtk_icon_set_unref (icons); + } + else + DEBUG ("Icon %s already exists in factory\n", stock_id); +} + +void register_sflphone_stock_icons (GtkIconFactory *factory) +{ + add_icon (factory, GTK_STOCK_PICKUP, gnome_stock_pickup, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_HANGUP, gnome_stock_hangup, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_DIAL, gnome_stock_dial, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_TRANSFER, gnome_stock_transfer, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_ONHOLD, gnome_stock_onhold, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_OFFHOLD, gnome_stock_offhold, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_CALL_CURRENT, gnome_stock_call_current, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_ADDRESSBOOK, gnome_stock_addressbook, GTK_ICON_SIZE_SMALL_TOOLBAR); + add_icon (factory, GTK_STOCK_CALLS, gnome_stock_calls, GTK_ICON_SIZE_SMALL_TOOLBAR); +} + diff --git a/sflphone-client-gnome/src/icons/icon_factory.h b/sflphone-client-gnome/src/icons/icon_factory.h new file mode 100644 index 0000000000000000000000000000000000000000..557f8f92b484e60798f86394e0b8a5d44f606815 --- /dev/null +++ b/sflphone-client-gnome/src/icons/icon_factory.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ICON_FACTORY_H +#define ICON_FACTORY_H + +#include <gtk/gtkiconfactory.h> +#include "icons/pixmap_data.h" +#include "sflphone_const.h" + +G_BEGIN_DECLS + +#define GTK_STOCK_PICKUP "gnome-stock-pickup" +#define GTK_STOCK_HANGUP "gnome-stock-hangup" +#define GTK_STOCK_ONHOLD "gnome-stock-onhold" +#define GTK_STOCK_OFFHOLD "gnome-stock-offhold" +#define GTK_STOCK_TRANSFER "gnome-stock-transfer" +#define GTK_STOCK_DIAL "gnome-stock-dial" +#define GTK_STOCK_CALL_CURRENT "gnome-stock-call-current" +#define GTK_STOCK_ADDRESSBOOK "gnome-stock-addressbook" +#define GTK_STOCK_CALLS "gnome-stock-calls" + +void init_icon_factory (void); + +G_END_DECLS + +#endif diff --git a/sflphone-client-gnome/src/icons/pixmap_data.h b/sflphone-client-gnome/src/icons/pixmap_data.h new file mode 100644 index 0000000000000000000000000000000000000000..95b215c6c53caf5655d80dd6fd06c55fe67462ca --- /dev/null +++ b/sflphone-client-gnome/src/icons/pixmap_data.h @@ -0,0 +1,999 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef PIXMAP_DATA_H +#define PIXMAP_DATA_H + +G_BEGIN_DECLS + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_pickup) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_pickup[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_pickup[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0'\260\0\204&\260\0\222\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0'\261\0b&\260\0\357&\260\0\357'\262\0p\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\257\0F" + "&\260\0\342&\260\0\345&\260\0\345&\260\0\344%\256\0R\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0/'\260\0\322" + "&\260\0\333&\260\0\333&\260\0\333&\260\0\333&\257\0\326(\256\0""9\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#\260\0\35%\260\0\277" + "&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261" + "\0\304\"\254\0%\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\257\0\20'\261\0" + "\252'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306" + "'\260\0\306'\260\0\306'\261\0\260#\256\0\26\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\266\0" + "\7&\261\0\223&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274" + "&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\233.\271" + "\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\200\0\2'\257\0|'\260\0\262'\260\0\262'\260\0\262'\260\0\262" + "'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260" + "\0\262'\260\0\262'\260\0\204@\277\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\257\0c&\260\0\250&\260\0\250&\260\0" + "\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250" + "&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\261\0l\0\0\0" + "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\260\0J'\260\0\236" + "'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260" + "\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0" + "\236'\260\0\236'\260\0\236'\260\0T\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0&\255\0""5&\261\0\223&\260\0\224&\260\0\224&\260\0\224&\260\0\224" + "&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260" + "\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0" + "\224&\260\0=\0\0\0\0\0\0\0\0\0\0\0\0#\261\0$(\260\0\207'\260\0\212'\260" + "\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0" + "\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212" + "'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\210$\260\0*\0\0\0" + "\0!\261\0\27&\260\0x&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257" + "\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0" + "\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200" + "&\257\0\200&\257\0\200&\257\0\200%\260\0{$\255\0\34""3\231\0\5\40\237" + "\0\10\40\237\0\10\40\237\0\10\40\237\0\10&\256\0/'\257\0v'\257\0v'\257" + "\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'" + "\257\0v&\262\0""5\40\237\0\10\40\237\0\10\40\237\0\10\40\237\0\10""3" + "\231\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(\256\0&&\260\0k&\260" + "\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&" + "\260\0k&\260\0k)\256\0,\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\264\0\"%\260\0a%\260\0a%\260\0a%" + "\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260" + "\0a&\263\0(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0)\255\0\37&\260\0W&\260\0W&\260\0W&\260\0W&\260" + "\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W#\261\0$\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0&\263\0\33$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M" + "$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M(\257\0\40\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0+\252\0\30&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C" + "&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C$\255\0\34\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0" + "\24$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256" + "\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9!\261\0\27\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\36\245\0\21&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/" + "&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/(\256\0\23\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0'\261\0\15)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%" + ")\263\0%)\263\0%)\263\0%)\263\0%)\263\0%\"\273\0\17\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\263" + "\0\12&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263" + "\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33.\271\0\13\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0+\252\0\6-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-" + "\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21" + "$\266\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}; + + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_hangup) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_hangup[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_hangup[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\0\0\3\277\40\0\10\277\40" + "\0\10\277\40\0\10\277\40\0\10\277\40\0\10\277\40\0\10\266$\0\7\266$\0" + "\7\266$\0\7\266$\0\7\266$\0\7\266$\0\7\252\0\0\3\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\237\40\0" + "\10\256\33\0\23\256\33\0\23\252\34\0\22\252\34\0\22\252\34\0\22\252\34" + "\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252" + "\34\0\22\277\40\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\25\0\14\260\32\0\35\260\32\0\35" + "\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0" + "\35\255\33\0\34\255\33\0\34\255\33\0\34\255\33\0\34\261\24\0\15\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\277\40\0\20\263\32\0(\263\32\0(\263\32\0(\263\32\0(\261\32\0'" + "\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0" + "'\270\34\0\22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\252\30\0\25\257\31\0""3\263\32\0""2\263\32\0" + "2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32" + "\0""2\263\32\0""2\261\32\0""1\261\32\0""1\261\26\0\27\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255" + "\24\0\31\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0=" + "\260\31\0=\256\32\0<\256\32\0<\256\32\0<\256\32\0<\256\32\0<\255\33\0" + "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\263\21\0\36\261\25\0H\261\25\0H\261\25\0H\260\26\0G\260" + "\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260" + "\26\0G\262\27\0!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255\27\0\"\261\26\0R\261\26\0R\261\26\0" + "R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\260\26" + "\0Q\260\26\0Q\260\26\0Q\256\24\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\256\24\0&\257\23\0]\257" + "\23\0]\257\23\0]\257\23\0]\257\23\0]\257\26\0\\\257\26\0\\\257\26\0\\" + "\257\26\0\\\257\26\0\\\257\26\0\\\257\26\0\\\262\30\0+\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\262" + "\22\0+\261\24\0h\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260" + "\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\257\24\0f\257\25\0""0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\263\20\0/\261\22\0r\261\22\0r\261\22\0r\261\22\0r\261\22" + "\0r\261\22\0r\261\22\0r\260\22\0q\260\22\0q\260\22\0q\260\22\0q\260\22" + "\0q\262\23\0""5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\257\17\0""3\257\20\0}\257\20\0}\257\20\0}" + "\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0" + "|\261\20\0|\261\20\0|\260\22\0:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\255\22\0\34\260\21\0-\260\21\0-\260\21\0-\260\21\0-\261\20\0R\260" + "\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17" + "\0\207\260\17\0\207\260\17\0\207\260\17\0\207\257\17\0\206\257\17\0\206" + "\257\17\0\206\260\17\0W\260\21\0-\260\21\0-\260\21\0-\260\21\0-\260\22" + "\0\35\261\24\0\15\256\15\0x\260\16\0\222\260\16\0\222\260\16\0\222\260" + "\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16" + "\0\222\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221" + "\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\257" + "\16\0\220\257\17\0y\257\20\0\20\0\0\0\0\263\0\0\12\256\12\0{\257\13\0" + "\235\257\13\0\235\257\13\0\235\257\13\0\235\257\13\0\235\261\13\0\234" + "\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261" + "\13\0\234\261\13\0\234\261\13\0\234\260\14\0\233\260\14\0\233\260\14" + "\0\233\260\14\0\233\260\14\0~\261\24\0\15\0\0\0\0\0\0\0\0\0\0\0\0\237" + "\0\0\10\260\12\0~\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247" + "\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260" + "\13\0\247\261\13\0\246\261\13\0\246\261\13\0\246\261\13\0\246\261\13" + "\0\246\261\13\0\246\261\12\0\202\271\0\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\252\0\0\6\260\10\0~\260\11\0\262\260\11\0\262\260\11\0" + "\262\260\11\0\262\260\11\0\262\260\12\0\261\260\12\0\261\260\12\0\261" + "\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260" + "\12\0\261\257\12\0\203\277\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\277\0\0\4\257\10\0}\260\10\0\274\260\10\0\274\260" + "\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10" + "\0\274\260\10\0\274\260\10\0\274\260\10\0\273\260\10\0\273\260\10\0\204" + "\266\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\377\0\0\2\257\6\0|\260\6\0\307\260\6\0\307\260\6\0\307" + "\260\6\0\307\260\6\0\307\260\6\0\306\260\6\0\306\260\6\0\306\260\6\0" + "\306\260\6\0\306\261\6\0\202\231\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\1" + "\260\4\0x\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321" + "\260\5\0\321\260\5\0\321\260\5\0\321\260\4\0\201\377\0\0\2\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\261\4\0r\260\3\0\334\260\3\0\334\260" + "\3\0\334\260\3\0\334\260\3\0\334\260\3\0\333\257\4\0}\377\0\0\1\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\257\2\0m\260\3" + "\0\346\260\3\0\346\260\3\0\346\260\3\0\346\260\4\0w\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\260" + "\0\0d\257\1\0\360\260\1\0\361\257\0\0p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\257\0\0\\\257\0\0i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}; + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_onhold) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_onhold[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_onhold[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\40jj\30\34knQ\35kp\217\33mq\330\35jo\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\33mm/\35joj\34lr\254\33mq\350" + "\34jo\374\27sy\362\20~\207\374\13\207\217\377\35jo\377\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\"" + "fw\17\34jnH\35lp\202\33ns\310\35kq\367\33nr\365\24z\201\364\15\206\217" + "\377\6\220\231\377\1\231\242\377\0\230\242\377\0\227\241\377\2\222\235" + "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "$mm\16\33ls\247\33ns\337\34ko\374\30sy\361\21\201\210\371\12\215\226" + "\377\3\227\242\377\0\234\247\377\0\233\246\377\1\231\243\377\6\216\230" + "\377\15\204\213\377\24sx\374\34kp\377\2\220\233\377\35jo\377\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32fo\36\35jo\377\7\224" + "\236\377\1\237\252\377\0\240\252\377\0\236\251\377\2\231\244\377\11\215" + "\226\377\17\201\210\376\27pv\371\34jo\375\33gk\370\26TW\341\22EG\324" + "\35jo\377\2\216\230\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\14\13+/G\33lp\373\1\236\251\377\13\213\223\377\22" + "{\203\374\30mr\372\34jn\376\30af\360\23IM\330\15.1\302\4\20\22\255\0" + "\0\0\243\0\0\0\243\4\22\23\256\33ko\373\2\214\225\377\35jo\377\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0x\4\22\23\254\33ko\375" + "\3\227\241\377\35jo\377\21@D\317\12%&\272\2\6\6\247\0\0\0\243\0\0\0\233" + "\0\0\0\232\0\0\0\234\0\0\0\243\0\0\0\237\4\22\23\256\33ko\373\2\212\223" + "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t" + "\4\22\23\256\33jo\375\3\225\237\377\33im\374\0\0\0\231\0\0\0\237\0\0" + "\0\213\0\0\0c\0\0\0;\0\0\0\30\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33" + "ko\373\2\207\220\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\223\235\377\34ko\371\0\0\0$\0" + "\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0\234\4\22" + "\23\256\33ko\373\2\205\217\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\221\233\377\34lp\366" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0" + "\234\4\22\23\256\33ko\373\2\202\214\377\35jo\377\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\217\230\377" + "\34lp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0:\0\0\0\234\4\22\23\256\33ko\373\2\200\212\377\35jo\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375\3\215" + "\226\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2~\207\377\35jo\377\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375" + "\3\212\224\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2|\204\377\35jo\377" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33" + "jn\375\3\210\221\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\30mm\25\26QT\216\25UZ\342\31bf\364\35jo\377\2z\202\377\35jo" + "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256" + "\33jn\375\3\206\220\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU" + "\3\32bf\177\35ko\371\24ms\372\13u|\377\10w~\377\12t|\377\2w\177\377\35" + "jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23" + "\256\33jn\375\3\204\215\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*\26" + "SV\325\27kq\373\5z\202\377\0|\204\377\0z\202\377\0y\201\377\0w\177\377" + "\5t{\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\36lp;\22EH" + "\264\25RV\342\35jo\377\3\202\213\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0O" + "\15""13\275\27jp\373\1{\203\377\0z\203\377\0y\201\377\0x\200\377\0v~" + "\377\0u}\377\11qw\377\33kp\311\0\0\0\0\0\0\0\0\0\0\0\0\31aeG\32gn\350" + "\32lp\370\21tz\375\16x\200\377\20v}\377\3\200\211\377\34ko\366\0\0\0" + "\0\0\0\0%\0\0\0\233\26W]\347\13u{\377\0y\202\377\0x\200\377\0v~\377\0" + "u}\377\0t|\377\6px\377\34jp\366\35lq4\0\0\0\0\0\0\0\12\22GJ\251\33jn" + "\374\13}\203\377\0\206\217\377\0\205\216\377\0\204\214\377\0\202\213" + "\377\7{\203\377\35jo\377\0\0\0\0\0\0\0d\0\0\0\242\26SV\341\21ou\375\0" + "w\177\377\0v~\377\0t|\377\4rz\377\20kr\375\34jn\367\33jmT\0\0\0\0\0\0" + "\0\12\13$&\250\32jn\373\3\204\215\377\0\205\216\377\0\204\215\377\0\203" + "\213\377\0\201\212\377\0\200\210\377\11x\200\377\34lp\346\0\0\0\0\0\0" + "\0D\0\0\0\234\4\22\22\255\31`e\362\32gm\374\27gm\371\32hl\372\34hn\371" + "\34hl\245!kk\37\0\0\0\0\0\0\0\0\0\0\0h\24RX\340\14y\201\377\0\204\215" + "\377\0\203\214\377\0\201\212\377\0\200\211\377\0\177\207\377\3{\204\377" + "\32mq\364\34ipI\0\0\0\0\0\0\0\1\0\0\0G\0\0\0\202\0\0\0\222\5\25\26\225" + "\16""02\200\20@D@3ff\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\26W" + "]\347\15w\177\377\0\202\212\377\0\201\211\377\0\177\210\377\1}\206\377" + "\13v|\377\33kp\370\35io\205\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0k\11\40!\261\33hm\373\25jp\372\20pv\374\23lr\372\33in\374\33" + "gm\341\34jnH\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\3\0\0\0A\4\21\21z\16""47\241\23FI\245\25PTy\35ch,\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}; + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_dial) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_dial[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_dial[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" + "\377\2f\231\\\31\200\257\200\20\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\5\377" + "\377\354)\374\374\352J\252\305\230r\316\335\271b\373\373\351G\377\377" + "\360#\377\377\377\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\377\377\377\11\377\377\354D\375\375\337g\375\375\332}\302\325\243" + "\236\334\347\271\222\375\375\332{\374\374\340b\373\373\352=\377\377\377" + "\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\2\210\256zk\347\355" + "\312t\374\374\323\222\374\373\313\257\307\330\243\262\341\351\267\253" + "\374\373\315\254\373\373\326\216\333\346\300r\204\255y]\0\0\0\0\0\0\0" + "\0\24v\0\15\27\200\0\247\30\200\0\270\30~\0\270\26~\0i\0\0\0\0$m\0\7" + "\26\200\0\241\30\200\0\270\30~\0\270\30~\0u\377\377\363\26\355\365\325" + "b\211\266o\335\231\276w\354\236\311\200\335\240\312\205\266\375\375\337" + "p\362\366\315\213\270\316\223\302\257\310\222\242\363\366\334X\377\377" + "\353\15\0\0\0\0\24z\0d\40\231\0\377!\232\0\377\40\226\0\377\30~\0\323" + "\0\0\0\0\24w\0M\37\225\0\375!\232\0\377\40\226\0\377\30\201\0\334\377" + "\377\356-\311\336\256\215\255\324\206\373\223\312q\377q\274T\377R\242" + ";\351\345\360\317E\365\367\331e\353\360\304\230\374\374\321\233\375\375" + "\337g\377\377\357\40\0\0\0\0\27|\0m\35\221\0\377\36\217\0\377\35\212" + "\0\377\26z\0\325\0\0\0\0\25w\0V\34\214\0\377\36\217\0\377\35\213\0\377" + "\27{\0\337\377\377\3545\310\336\253\225\264\326\213\373\216\306m\377" + "_\255E\377.\211\27\347\266\325\252*\374\374\346S\373\373\326\211\374" + "\372\317\243\375\375\336m\377\377\354(\0\0\0\0\25y\0c\34\206\0\377\34" + "\204\0\377\33\177\0\377\26v\0\321\0\0\0\0\24w\0K\33\204\0\374\34\204" + "\0\377\33\200\0\377\26w\0\333\377\377\356-\314\340\260\213\253\317\206" + "\372\203\266e\377l\254R\377P\232:\350\345\360\322D\351\356\316h\307\330" + "\246\244\374\374\321\233\375\375\337g\377\377\357\40\0\0\0\0\34q\0\11" + "\25w\0\235\25v\0\255\25t\0\255\25r\0b\0\0\0\0\0f\0\5\24v\0\227\25v\0" + "\255\25t\0\255\23p\0m\377\377\363\26\276\325\254r\204\260k\334\257\313" + "\211\346\241\306\204\327\234\300\201\266\361\366\326q\373\373\327\207" + "\324\341\254\270\237\275\206\252\313\334\267g\377\377\377\15\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\377\377\377\2\247\304\231Z\375\375\336m\374\374" + "\324\223\374\373\313\260\310\330\243\261\341\351\267\253\374\373\313" + "\255\373\373\324\217\370\372\333i\237\277\217P\0\0\0\0\0\0\0\0\0\0\0" + "\0\26y\0""9\23|\0P\23|\0P\24z\0\31\0\0\0\0\0\0\0\0\24x\0""3\23|\0P\23" + "|\0P\21w\0\36\0\0\0\0\377\377\346\12\262\320\236f\263\323\230\227\305" + "\337\245\247\262\315\226\254\335\347\272\224\375\375\332|\374\374\340" + "c\373\373\357>\377\377\377\5\0\0\0\0\0\0\0\0\25w\0<\34\217\0\365\37\225" + "\0\377\36\222\0\377\30~\0\316\0\0\0\0\23s\0(\33\214\0\360\37\225\0\377" + "\36\222\0\377\30\200\0\330\0\0\0\0\24v\0\32\40\213\5\352E\250(\377`\261" + "E\377_\242I\355\311\332\261h\373\373\352H\377\377\361%\377\377\377\3" + "\0\0\0\0\0\0\0\0\0\0\0\0\25w\0V\35\221\0\377\37\223\0\377\36\217\0\377" + "\30}\0\327\0\0\0\0\21s\0<\34\217\0\377\37\223\0\377\36\217\0\377\30~" + "\0\337\0\0\0\0\21q\0-\34\215\0\364\37\224\0\377!\220\3\377!\203\13\347" + "X\235N\32\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\25w\0" + "V\34\210\0\377\35\210\0\377\34\204\0\377\27y\0\327\0\0\0\0\21s\0<\33" + "\207\0\377\35\210\0\377\34\204\0\377\27x\0\337\0\0\0\0\21q\0-\33\206" + "\0\364\35\211\0\377\34\204\0\377\27y\0\345\21w\0\17\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20s\0\37\27x\0\325\26w\0\337\25u\0\337" + "\25t\0\251\0\0\0\0\15s\0\24\26x\0\322\26w\0\337\25v\0\337\25s\0\266\0" + "\0\0\0\25j\0\14\27w\0\314\26w\0\337\25v\0\337\24t\0\300\0\200\0\2\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\20x\0\40\31\204\0\316\32\210\0\322\32\206\0\322" + "\27\177\0\243\0\0\0\0\15s\0\24\30\204\0\313\32\210\0\322\32\206\0\322" + "\26}\0\257\0\0\0\0\25j\0\14\27\203\0\306\32\210\0\322\32\206\0\322\30" + "\200\0\266\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27" + "|\0m\36\224\0\377\40\227\0\377\37\222\0\377\30\177\0\327\0\0\0\0\24t" + "\0K\35\222\0\377\40\227\0\377\37\223\0\377\30\200\0\337\0\0\0\0\21q\0" + "-\35\220\0\364\40\230\0\377\37\223\0\377\32\201\0\345\21w\0\17\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27|\0m\35\213\0\377\36\214" + "\0\377\35\207\0\377\30z\0\327\0\0\0\0\24t\0K\34\212\0\377\36\214\0\377" + "\35\210\0\377\27z\0\337\0\0\0\0\21q\0-\33\210\0\364\36\215\0\377\35\210" + "\0\377\30|\0\345\21w\0\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\24w\0K\32~\0\367\32\177\0\377\32z\0\377\25u\0\315\0\0\0\0\24u\0" + "2\30}\0\363\32\177\0\377\32{\0\377\24u\0\327\0\0\0\0\22r\0\35\30}\0\352" + "\32\200\0\377\32{\0\377\26u\0\336$m\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\27v\0C\23r\0`\23r\0`\22r\0\35\0\0\0\0\0\0" + "\0\0\25q\0=\23r\0`\23r\0`\16q\0$\0\0\0\0\0\0\0\0\27r\0""8\23r\0`\23r" + "\0`\22w\0+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}; + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_transfer) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_transfer[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_transfer[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21i\377=\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\24i\3773\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\237\22k\377+\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17d\377" + "!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\377\4\27]\377" + "\13\17i\377\21\26o\377\27\22j\377\35\16c\377$\22e\377+\25h\3771\23k\377" + "7\20g\377>\23i\377D\21k\377J\20i\377P\22h\377\216\22i\377\234\22h\377" + "\246\21h\377\261\22h\377\246\27h\377\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<" + "\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22" + "h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22i\377\250" + "\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22d\377" + "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22" + "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377" + "\261\22h\377\273\22h\377\306\23h\377\244\34U\377\11\0\0\0\0\0\0\0\0\0" + "\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h" + "\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377" + "\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h" + "\377\321\21h\377\230\0f\377\5\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22" + "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377" + "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21" + "h\377\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\21g\377\224" + "\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21" + "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377" + "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h" + "\377\306\22h\377\321\21h\377\333\22h\377\346\22h\377\200\0\0\0\0\0m\377" + "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377" + "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377" + "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h" + "\377\333\22h\377\346\22h\377\361\23h\377n\0m\377\7\16c\377\22\22d\377" + "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22" + "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377" + "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\22h\377\346\22h" + "\377\361\21h\377v\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21" + "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377" + "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h" + "\377\306\22h\377\321\21h\377\333\22h\377\346\22g\377\212\0\0\0\0\0m\377" + "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377" + "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377" + "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h" + "\377\333\21g\377\224\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34" + "\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h" + "\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377" + "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\242\0f\377\5\0\0\0\0" + "\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22" + "h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h" + "\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306" + "\23h\377\245\24b\377\15\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22" + "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377" + "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21" + "h\377\261\22h\377\273\22i\377\252\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\200\377\4\27]\377\13\17i\377\21\26o\377\27\22j\377\35\16c" + "\377$\22e\377+\25h\3771\23k\3777\20g\377>\23i\377D\21k\377J\20i\377P" + "\22h\377\216\22i\377\234\22h\377\246\21h\377\261\22h\377\254\22d\377" + "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17i\377\"" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\242\21i\377.\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\22j\377:\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\23i\377D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0"}; + + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_offhold) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_offhold[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_offhold[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0ix\21\0mss\0mr\210\0lt@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "3ff\5\14kqV\14lr\250\0lr}\0mv\34\0\0\0\0\0ht\26\0ls\343\0ls\377\0ls\377" + "\0ls\377\0ms\242\0\200\200\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\34qq\11\33mm/\32kqX\33ms\205\26lq\320\17ou\377\22kp" + "\377\0ls\377\0ls\364\0lq-\0ks\212\0ls\377\0ls\377\0ls\377\0ls\377\0l" + "s\377\0ks\253\0ff\5\0\0\0\0\0\0\0\0\40`p\20\34mm6\35nta\33ms\214\34k" + "p\235\26tz\230\16\202\212\237\5\206\216\324\1\207\217\377\1\205\216\377" + "\21lq\377\0ls\377\0ls\377\0ks\262\0lr\256\0ls\377\0ls\377\0ls\377\0l" + "s\377\0ls\377\3lr\377\11lr\300\32mtn\34ns\222\34lq\234\26y\200\230\15" + "\207\217\240\6\222\233\241\0\233\245\241\0\232\245\241\0\216\226\324" + "\4\201\211\377\10z\200\377\2\203\213\377\21lq\377\0ls\377\0ls\377\0l" + "t\326\0lsv\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lq\377\16sy\377" + "\11\202\212\341\5\226\241\243\0\236\251\241\0\236\250\241\2\232\245\241" + "\6\217\230\241\16\202\212\237\20qy\321\21lq\377\17ls\377\22kp\377\2\201" + "\211\377\21kq\377\0ls\377\0ls\377\0ks\235\0\200\200\6\0ls\377\0ls\377" + "\0ls\377\0ls\377\0ls\377\17ls\377\3\210\220\377\1\212\223\377\6\205\215" + "\342\16\201\211\240\27rw\230\35ko\236\33lt\206\15lq\266\6ls\377\1ls\377" + "\0ls\377\21lq\377\2\177\207\377\21kq\377\0ls\377\0lr\341\0ju\30\0\0\0" + "\0\0pp\20\0ms\312\0ls\377\0ls\377\0ls\377\17ls\377\3\207\216\377\22k" + "p\377\15ms\377\13mr\314\26ot.$mm\7\0lr\223\0ls\377\0ls\377\0ls\377\0" + "ls\377\21lq\377\2~\206\377\21kq\377\0ls\340\0lt!\0\0\0\0\0\0\0\0\0\0" + "\0\0\0fw\17\0ls\307\0ls\377\0ls\377\17ls\377\3\205\216\377\22kp\377\0" + "ls\377\0ls\377\0ls\266\0kr\230\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377" + "\21lq\377\2}\204\377\22kq\362\0pp\40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0fw\17\0ks\305\0ls\377\17ls\377\3\204\214\377\22kp\377\0ls\377" + "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\21l" + "q\377\2|\204\362\32ko\247\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0mm\16\0lr\304\17ls\377\3\202\213\377\22kp\377\0ls\377\0" + "ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lp\361" + "\3~\210\254\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0vv\15\21ls\345\3\201\211\377\22kp\377\0ls\377\0ls\377" + "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\332\32lo\247\3\177" + "\210\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\32mr\224\3\201\211\351\22kp\377\0ls\377\0ls\377" + "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0mt\332\0hq\33\34lo\234\3}\205" + "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\33lq\220\3\201\211\335\22kp\377\0ls\377\0ls\377\0ls" + "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ms\305\0f\200\12\34lo\234\3z\203" + "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0UU\3\22lr\326\3}\205\377\22kp\377\0ls\377\0ls\377\0ls\377\0" + "ls\377\0ls\377\0ls\377\4ls\377\12lr\377\17mq\337\34ko\245\3x\200\241" + "\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U" + "U\3\0ks\244\17lr\377\3|\204\377\22kp\377\0ls\377\0ls\377\0ls\377\0ls" + "\377\3ls\377\16lq\377\17lr\377\11rx\377\5sz\377\7rx\351\3w\177\245\35" + "ko\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\0ls\246" + "\0ls\377\17kr\377\3{\202\377\22kp\377\0ls\377\0ls\377\0ls\377\2ls\377" + "\20lq\377\10rx\377\0v}\377\0u}\377\0t{\377\0sz\377\3rx\351\34jo\246\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\4\3ls\257\10lr\377\13" + "lr\377\22kp\377\3y\201\377\22kp\377\0ls\377\0ls\377\0ls\324\16lr\333" + "\10ry\377\0v}\377\0t|\377\0t{\377\0sz\377\0ry\377\6nv\377\16kr\337\0" + "fw\17\0\0\0\0\0\0\0\0\0\0\0\0\22mm\16\16lr\315\21lr\377\13qx\377\6v}" + "\377\10u{\377\2y\201\377\22kp\377\0ls\377\0ls\317\0ht\26\35kp\240\1u" + "|\344\0t{\377\0sz\377\0ry\377\0qx\377\4ov\377\20kq\377\3ls\377\0ls\307" + "\0fw\17\0\0\0\0\40\200\200\10\22lr\331\13qy\377\1}\204\377\0|\204\377" + "\0{\202\377\0z\202\377\1x\177\377\22kp\377\0ls\316\0ky\23\0\0\0\0\35" + "kp\217\13sy\242\1t|\343\0qx\377\4pv\377\13mt\377\20kp\377\4kr\377\0l" + "s\377\0ls\377\0ls\377\0\200\200\6\17mr\233\12ry\377\0}\204\377\0{\203" + "\377\0{\202\377\0y\201\377\0y\200\377\4u|\377\17lq\347\0qq\22\0\0\0\0" + "\0\0\0\0\34hq\33\32lp\200\34kp\235\23kp\341\17lq\377\11lr\377\1ks\377" + "\0ls\377\0ls\377\0ls\377\0ls\377\0lt\213\23kr\333\3y\201\377\0{\202\377" + "\0z\201\377\0y\200\377\0x\177\377\3v|\377\21jr\353\23mv6\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0mr\260\0ls\377\0ls" + "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\322\22lr\313\10s{\377\0y\200" + "\377\0x\200\377\2v}\377\11qw\377\21kq\353\27koL\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0ls\255\0ls\377" + "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\273\14jnA\17lq\370\21kq\377\20k" + "r\377\20lq\377\15kr\335\24bo'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ff\5\0lt\252\0ls\377\0ls\377" + "\0ls\377\0ls\374\0ksE\0\0\0\0\0lq-\2ms\242\1ls\275\0lrt\0tt\13\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0lrU\0mt\267\0lt\254\0js<\0\0\0\0"}; + + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_call_current) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_call_current[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_call_current[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\0\0\0" + "/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\12""8\0\205\21c\0\324\22f\0\326\12" + "-\0k\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\2\0\11\0:\20U\0\262\26\205\0\362\23r\0\364\24}\0\364\20e\0" + "\334\3\30\0J\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0%\20^\0\316\33\241\0\376\32\241\0\377\30\224\0\377\21g\0\364" + "\23w\0\375\17S\0\277\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0=\214U*\0\377\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\20\20^\0\301\30\231\0\377\30\231\0\377\27\216\0\377" + "\24z\0\377\21b\0\363\17_\0\335\0\13\0-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0<\214Ux:\217U0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15L\0\236\27\220\0\377\27\220\0\377\26\211" + "\0\377\23{\0\377\17]\0\356\17_\0\352\3\32\0M\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0""3\231M\12=\215S\\\0\0\0\0<\215Q/<\214Ux\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7+\0j\25\204\0\363\30\224\0\377" + "\26\211\0\377\24|\0\377\20Y\0\362\16M\0\265\0\5\0""2\0\0\0\0\0\0\0\0" + ":\216TF\0\377\0\1\0\0\0\0<\214T\203\0\0\0\0\0\377\0\1<\215S\245\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""6\22o\0\332" + "\30\227\0\377\26\215\0\377\21h\0\355\12*\0\206\0\0\0\25\0\0\0\0\0\0\0" + "\0\0\0\0\0;\215R8>\213UB\0\0\0\0;\214S\201\0\0\0\0\0\0\0\0=\215T\244" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\20" + "`\0\305\31\233\0\377\27\220\0\377\24~\0\377\16I\0\250\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0<\216Ts\0\0\0\0;\215TyI\222I\7\0\0\0\0;\215T" + "\243\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\13A\0\212\27\214\0\370\30\224\0\377\26\211\0\377\17\\\0\326\0\0\0\26" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0;\216Sh;\211X\32\0\0\0" + "\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\11\0""9\22n\0\332\30\227\0\377\26\214\0\377\23s\0\363\12;" + "\0\201\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0<\216Ts3\231M\12" + "\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\11\17W\0\270\30\225\0\377\27\220\0\377\25\204\0" + "\377\16[\0\330\0\0\0\24\0\0\0\0\0\0\0\0""9\216U\11<\215Sn\0\0\0\0;\214" + "S\201\0\0\0\0\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\33\0T\24t\0\343\30\224\0\377\26" + "\211\0\377\22s\0\364\13=\0\215\0\0\0\0\0\0\0\0<\214SY>\213U!\0\0\0\0" + ";\216T\205\0\0\0\0""9\216U\11<\214T\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\17Z\0\273\27\221" + "\0\377\26\214\0\377\25\202\0\377\20^\0\337\5\35\0""5\0\0\0\0>\213U!\0" + "\0\0\0+\200U\6<\215U{\0\0\0\0=\214SG;\216S_\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\31\0R\22o\0" + "\341\27\220\0\377\25\205\0\377\23w\0\377\15Q\0\304\0\0\0\12\0\0\0\0\0" + "\0\0\0\0\0\0\0@\200@\4\0\0\0\0;\216T\205;\211X\32\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10" + "\15H\0\233\25\202\0\364\26\211\0\377\24~\0\377\21g\0\357\12@\0\224\0" + "\0\0\5\0\0\0\7\3\25\0J\0\0\0\35\0\0\0\0\0\377\0\1\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\40\20]\0\313\26\211\0\377\25\201\0\377\23w\0\377\20_\0" + "\345\11""1\0\210\16U\0\326\23l\0\346\20`\0\315\4\27\0C\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\27\0N\20d\0\334\25\204\0\377\23z\0\377" + "\21o\0\377\20a\0\357\21k\0\375\23g\0\366\24|\0\375\17Z\0\313\0\7\0#\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\11(\0l\21j\0\342\24~\0\377" + "\22s\0\377\20h\0\377\20b\0\377\20f\0\377\21b\0\365\21m\0\370\13:\0\210" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11\11<\0\210\22i\0" + "\346\23w\0\377\21k\0\377\17a\0\377\17_\0\377\17[\0\373\20d\0\371\16S" + "\0\304\0\0\0\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15\12" + ";\0\206\21f\0\346\21o\0\377\17d\0\377\17_\0\377\17_\0\377\20Z\0\362\17" + "U\0\316\0\0\0\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\15\12""7\0\202\20`\0\340\20h\0\377\17_\0\377\17\\\0\366\20V\0" + "\363\10,\0y\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\12\7)\0k\17Z\0\336\16U\0\324\13""9\0\212\0\6\0(\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\4\3\15\0P\0\0\0+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0"}; + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_addressbook) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_addressbook[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_addressbook[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0#Q\220n3[\226\3105]\231\3125]\231\3125]\231\312" + "5]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\312" + "5]\231\3125]\231\3125]\231\3121[\227\306&Q\213X\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\200\200\200\2\227\241\244bGl\237\367\\\202\263\377" + "~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234" + "\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301" + "\377~\234\301\377~\234\301\377r\223\274\3778a\232\332\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\304\304\261\15\307\312\304\312\276\304\310\377Os\246" + "\376\237\263\313\377\334\343\352\377\334\343\352\377\334\343\352\377" + "\334\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334" + "\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334\343" + "\352\377\333\342\350\377\310\321\332\377=d\234\341\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\331\335\326\301\350\350\345\377f\201\242\264e\211\266" + "\375}\235\304\377\202\241\305\377\202\241\305\377\202\241\305\377\202" + "\241\305\377\202\241\305\377\202\241\305\377\201\240\305\377\201\240" + "\305\377\201\240\305\377\201\240\305\377\201\240\305\377\200\237\304" + "\377\177\236\304\377~\235\303\377Z~\257\374(U\2179\1\0\0\0\0\0\0\0\0" + "\0\0\0\326\330\324\376\326\330\322\373Dj\237\314\221\265\331\377a\215" + "\300\377q\236\316\377r\237\317\377r\237\317\377r\237\317\377r\237\317" + "\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377p\235\315\377" + "o\234\315\377n\233\314\377l\232\313\377k\231\312\377\217\260\326\377" + "7gs\347a\253\32\261Z\251\13D\0\0\0\0\300\303\274\342\323\324\320\377" + "\223\241\255\377\247\257\264\377\257\267\272\377Lv\254\377r\237\317\377" + "r\237\317\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377q\236" + "\316\377o\234\315\377n\233\314\377m\232\313\377k\231\312\377j\230\311" + "\377i\227\311\377\216\260\326\377Gw\200\377\257\347w\377q\267.\306\0" + "\0\0\0\310\313\305\257\275\277\271\377\305\306\303\377\274\276\274\377" + "|\216\237\377_\213\276\377r\237\317\377r\237\317\377r\237\317\377r\237" + "\317\377q\236\316\377p\235\315\377o\234\314\377m\232\313\377l\231\313" + "\377k\230\312\377j\227\311\377h\226\310\377g\225\307\377\213\255\324" + "\377Aut\377\232\342S\377v\2744\306\0\0\0\0\333\335\327\376\333\335\331" + "\374Hm\240\313\216\262\331\377n\233\314\377r\237\317\377r\237\317\377" + "r\237\317\377r\237\317\377\206\254\325\377\304\326\352\377\350\357\367" + "\377\362\366\372\377\344\354\365\377\273\320\346\377x\241\316\377g\225" + "\307\377f\224\307\377e\223\306\377\210\253\323\377Buv\377\237\343\\\377" + "t\2721\305\0\0\0\0\304\306\300\360\320\321\315\377\202\225\251\376\226" + "\247\262\377\230\245\262\377R~\262\377r\237\317\377q\236\316\377\250" + "\303\341\377\373\374\376\377\322\340\357\377\242\276\335\377\221\263" + "\327\377\237\274\334\377\324\341\357\377\367\371\374\377\217\260\325" + "\377d\222\305\377c\221\304\377\206\251\321\377Cux\377\242\343a\377r\271" + "-\305\0\0\0\0\274\277\271\234\276\301\273\377\313\314\310\377\307\310" + "\305\377\231\242\251\377W\203\267\377p\235\315\377\225\266\332\377\372" + "\373\375\377\227\270\332\377k\230\312\377o\232\313\377o\233\312\377g" + "\225\307\377f\223\306\377\244\277\335\377\370\372\374\377p\232\311\377" + "a\217\303\377\202\247\317\377Dlu\376\241\306A\376{\253\26\305\0\0\0\0" + "\337\342\334\375\337\340\333\375Xt\234\331\214\254\315\377p\235\316\377" + "o\234\315\377n\233\314\377\343\354\365\377\264\313\344\377j\227\311\377" + "\251\303\340\377\374\375\376\377\374\375\376\377\332\345\361\377\366" + "\371\374\377b\220\304\377\323\340\356\377\265\312\343\377_\215\301\377" + "\200\245\316\377Sn~\377\352\332l\377\347\322[\366\312\244\10C\311\314" + "\305\365\320\321\314\376r\213\247\372\214\241\267\377y\220\250\377W\202" + "\266\377}\245\320\377\377\377\377\377v\240\316\377z\241\316\377\375\375" + "\376\377\260\310\342\377s\234\312\377\340\351\363\377\366\370\373\377" + "`\216\303\377\246\300\335\377\323\337\356\377\\\213\300\377}\242\314" + "\377Tpw\377\364\342S\377\363\342o\377\311\246\10d\262\264\255\234\306" + "\310\302\377\314\315\311\377\314\315\311\377\257\263\263\377Mx\256\377" + "\214\257\325\377\367\372\374\377g\225\307\377\222\263\327\377\377\377" + "\377\377x\240\315\377b\220\304\377\260\307\341\377\366\370\373\377^\214" + "\301\377\245\277\334\377\317\335\354\377Z\211\277\377{\240\313\377To" + "z\377\364\345d\377\363\342r\377\311\246\10d\337\341\335\371\333\334\327" + "\376h}\231\352\207\242\275\377d\217\300\377i\226\310\377\201\246\321" + "\377\375\376\376\377j\227\310\377\203\250\321\377\377\377\377\377\217" + "\260\324\377`\216\302\377\310\330\352\377\365\370\373\377b\220\302\377" + "\337\350\363\377\246\277\334\377X\207\275\377w\235\311\377To{\377\364" + "\346q\377\362\342q\377\311\246\10d\316\320\312\371\316\321\313\376[z" + "\241\356\200\236\276\377]}\246\377Y\205\272\377f\224\306\377\361\365" + "\372\377\231\267\330\377b\220\303\377\321\337\356\377\366\371\374\377" + "\335\347\362\377\363\367\373\377\374\375\376\377\356\363\370\377\317" + "\335\354\377_\213\300\377V\205\274\377u\233\310\377Tp\200\377\365\350" + "|\377\360\336j\375\311\245\6U\263\266\256\261\314\316\311\377\313\314" + "\311\377\316\320\314\377\272\274\270\377Cm\245\377c\221\305\377\250\301" + "\336\377\356\363\371\377r\233\311\377a\217\302\377\220\257\324\377\221" + "\260\324\377{\241\314\377\230\265\327\377{\240\313\377W\205\274\377U" + "\204\273\377T\203\272\377r\231\306\377Xez\375\343\235N\367\347\240R\364" + "\333z\36\254\336\341\334\362\320\323\316\377z\213\235\366\206\233\260" + "\377[\201\254\377`\216\303\377a\217\303\377a\217\302\377\311\331\352" + "\377\360\364\371\377\233\270\330\377i\223\305\377^\213\300\377w\235\311" + "\377\271\315\343\377\305\325\350\377U\204\273\377S\202\272\377R\201\271" + "\377p\226\305\377_jw\377\371\260C\377\374\272Y\377\345\224E\326\320\322" + "\315\372\317\320\313\374Jn\235\340t\232\306\377Jr\243\377Z\207\274\377" + "_\215\302\377^\214\301\377^\213\300\377\235\271\331\377\347\356\366\377" + "\377\377\377\377\377\377\377\377\375\376\376\377\324\340\356\377~\242" + "\313\377S\202\271\377Q\200\270\377P\177\267\377l\223\302\377^iv\377\371" + "\261G\377\374\267S\377\344\221@\326\267\273\263\306\322\323\317\377\275" + "\300\277\377\306\310\304\377\300\300\275\377\77j\241\377]\213\300\377" + "\\\212\277\377Z\211\277\377Y\210\276\377X\207\275\377g\220\302\377p\227" + "\306\377_\213\276\377S\202\271\377R\201\270\377P\177\267\377O~\267\377" + "N}\266\377j\221\301\377^jy\377\372\271Y\377\374\273\\\377\343\216=\325" + "\333\335\331\336\306\307\304\377\231\243\251\375\226\243\256\377Zz\236" + "\377[\211\275\377`\216\302\377_\215\302\377_\214\301\377]\213\300\377" + "\\\212\277\377[\212\277\377Z\210\276\377Y\207\276\377X\206\275\377W\206" + "\274\377V\205\273\377U\203\272\377T\202\272\377m\225\304\377^l}\377\372" + "\276g\377\374\300f\377\342\2147\324\323\326\321\375\322\324\317\373=" + "g\235\303w\237\314\377N{\261\377a\220\303\377d\222\305\377c\221\305\377" + "b\221\304\377b\220\304\377a\217\303\377a\217\303\377_\216\302\377_\215" + "\302\377^\215\301\377]\214\301\377]\214\301\377\\\212\300\377[\212\277" + "\377s\233\311\377P]u\361\341\2105\314\342\2101\314\331r\23\206\273\275" + "\270\326\323\325\321\377\247\260\265\374\266\272\270\377\272\276\274" + "\377Fp\247\377i\227\311\377i\226\311\377h\226\311\377h\225\310\377h\225" + "\310\377g\225\310\377g\224\310\377f\224\307\377f\223\307\377e\223\307" + "\377e\223\306\377e\222\306\377d\222\306\377z\241\316\377%O\210\273\0" + "\0\0\3\0\0\0\0\0\0\0\0\221\230\221%\251\254\246\343\266\270\270\377\255" + "\263\264\377l\203\234\377c\221\303\377q\236\317\377q\236\317\377q\236" + "\316\377q\236\316\377q\236\316\377p\236\316\377p\236\316\377p\236\316" + "\377p\235\316\377p\235\316\377p\235\316\377p\235\316\377o\235\316\377" + "\177\247\322\377\"H\177\273\0\0\0\36\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0\34" + "\30""0R`Qy\253\351e\214\273\364e\214\272\364e\213\272\364e\213\272\364" + "e\213\272\364d\213\272\364d\213\272\364c\212\271\364c\212\271\364b\212" + "\271\364b\212\271\364a\211\271\364a\211\270\364a\210\270\364`\210\270" + "\364Fo\242\344\21\37;J\0\0\0\32\0\0\0\0\0\0\0\0"}; + +/* GdkPixbuf RGBA C-Source image dump */ + +#ifdef __SUNPRO_C +#pragma align 4 (gnome_stock_calls) +#endif +#ifdef __GNUC__ +static const guint8 gnome_stock_calls[] __attribute__ ((__aligned__ (4))) = +#else +static const guint8 gnome_stock_calls[] = +#endif +{ "" + /* Pixbuf magic (0x47646b50) */ + "GdkP" + /* length: header (24) + pixel_data (2304) */ + "\0\0\11\30" + /* pixdata_type (0x1010002) */ + "\1\1\0\2" + /* rowstride (96) */ + "\0\0\0`" + /* width (24) */ + "\0\0\0\30" + /* height (24) */ + "\0\0\0\30" + /* pixel_data: */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\0\2\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\22\11.\0p\20^\0\311\12\77\0\202\0\0\0\13\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34q\34\11\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3" + "\4\14\0>\15Z\0\275\23p\0\365\24w\0\361\24v\0\353\11<\0\210\0\0\0\4\0" + "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\3\377\377\370#\377\377\370H\224\267" + "\207\206\377\377\366U\377\377\3655\377\377\355\16\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\31\0e\22s\0\344\32\241\0\376\31\234\0" + "\377\24y\0\367\22p\0\364\21c\0\335\4\21\0;\0\0\0\0\0\0\0\0\377\377\346" + "\12\377\377\365P\377\377\360{\375\375\360\225\261\312\242\272\375\375" + "\357\234\375\375\360\211\377\377\365h\377\377\370&\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\5\36\0]\24}\0\352\31\234\0\377\31\227\0\377\26" + "\210\0\377\21c\0\363\22o\0\375\14E\0\233\0\0\0\0t\242t\13\275\323\263" + "h\375\375\360\212\376\376\353\267\376\376\350\326\301\325\254\352\376" + "\376\347\340\376\376\352\307\375\375\355\240\360\364\345t\206\260}7\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\21o\0\333\30\225\0\377\27\221" + "\0\377\24\203\0\377\22i\0\375\20d\0\364\15Q\0\300\0\0\0\2\377\377\370" + "&\277\324\261\223\262\313\243\313\357\365\331\335\376\376\354\262\346" + "\356\330\244\375\375\354\245\374\374\351\306\314\335\272\331\256\311" + "\240\263\344\354\327_\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!\20" + "g\0\313\31\230\0\377\27\216\0\377\25\203\0\377\22o\0\377\17W\0\365\13" + "A\0\244\0\0\0\4\377\377\365N\375\375\360\227\372\373\343\332\315\335" + "\276\275\377\377\362z\377\377\366Y\377\377\365f\336\347\321\240\346\356" + "\322\326\376\376\353\264\377\377\362r\377\377\377\22\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\5\16U\0\261\30\226\0\377\27\221\0\377\25\205\0\377\17" + "Y\0\347\7(\0r\0\0\0\26\377\377\377\1\377\377\364_\375\375\354\243\376" + "\376\347\337\375\375\356\232\377\377\366V\377\377\377\30\377\377\372" + "8\377\377\360{\376\376\352\300\376\376\352\303\377\377\361}\377\377\366" + "\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7-\0l\25\203\0\361\30\225\0\377\26" + "\212\0\377\21^\0\330\0\0\0!\0\0\0\0\377\377\377\1\377\377\364[\375\375" + "\355\240\376\376\350\344\347\356\326\250\377\377\364a\377\377\3724\377" + "\377\370I\351\360\335\211\367\372\345\306\376\376\352\276\377\377\362" + "z\377\377\377\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""3\23m\0\330\31" + "\230\0\377\27\216\0\377\22q\0\361\7""1\0n\0\0\0\0\0\0\0\0\377\377\367" + "=\347\356\333\223\270\320\246\331\321\340\277\314\375\375\357\222\377" + "\377\362x\375\375\361\202\356\363\335\257\276\323\253\351\311\333\272" + "\270\377\377\363i\377\377\377\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\11\17W\0\265\30\226\0\377\27\221\0\377\25\204\0\377\17V\0\314\0\0" + "\0\11\0\0\0\0\272\316\261\32\246\303\234\215\371\372\350\245\376\376" + "\350\324\376\376\351\315\270\317\247\316\376\376\352\303\376\376\347" + "\340\376\376\353\273\324\342\306\224\236\277\224_\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\36\0\\\25{\0\351\30\225\0\377\26\212\0" + "\377\21k\0\354\10/\0b\0\0\0\0\0\0\0\0\377\377\364.\377\377\362s\375\375" + "\357\234\376\376\352\271\273\320\251\325\376\376\352\301\376\376\355" + "\253\375\375\360\207\377\377\366U\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\20a\0\313\30\226\0\377\27\215\0\377" + "\24\202\0\377\17V\0\317\0\0\0\13\0\0\0\0\0\0\0\0\377\377\370#\377\377" + "\364^\377\377\362w\245\302\231\242\377\377\361}\377\377\363k\377\377" + "\367@\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\7,\0m\25|\0\354\27\221\0\377\25\206\0\377\21l\0\360\13" + "=\0\206\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\4\377\377\363\26\230\274" + "\2179\377\377\366\35\377\377\377\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\31\20_\0\312\30" + "\221\0\377\26\212\0\377\24\177\0\377\17\\\0\336\5\31\0""3\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\40" + "\0Y\22n\0\341\27\215\0\377\25\203\0\377\23s\0\376\15P\0\305\0\0\0\21" + "\0\0\0\0\0\0\0\7\0\0\0\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\10\15G\0\232\24\177\0\363\25\206\0\377\23{\0\377\22i\0\364\15" + "H\0\256\7\25\0I\16U\0\267\21b\0\323\12""1\0i\0\0\0\3\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\40\17[\0\310\26\204\0\376\24\177\0\377\22" + "t\0\377\17`\0\357\20`\0\352\23m\0\367\26\202\0\364\22k\0\337\6#\0X\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\14\0>\20`\0\324\25\177\0" + "\377\23w\0\377\21m\0\377\21j\0\377\24w\0\377\23t\0\370\24\201\0\374\17" + "]\0\311\0\0\0\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\35\0Y" + "\20c\0\334\22z\0\377\22p\0\377\20e\0\377\21j\0\377\24y\0\377\21g\0\364" + "\22l\0\347\6\34\0R\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\3\5$\0b\20`\0\334\22s\0\377\20i\0\377\17_\0\377\22l\0\377\22i\0\363" + "\22q\0\377\12;\0z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\3\5\40\0a\17^\0\331\21j\0\377\17b\0\377\17_\0\377\22b\0\365\17" + "Z\0\336\3\30\0V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\3\3\26\0R\17X\0\320\20_\0\366\16W\0\327\13C\0\235\0\6\0" + "+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\11\0<\13""5\0\213\0\5\0""0\0\0\0\2\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}; + + +G_END_DECLS + +#endif diff --git a/sflphone-client-gnome/src/main.c b/sflphone-client-gnome/src/main.c index 4f5415b7ce04772c91d2f9687ac3064e46e8092c..ad6058561af6fa37b8ec456b37cb43359bc3cc1b 100644 --- a/sflphone-client-gnome/src/main.c +++ b/sflphone-client-gnome/src/main.c @@ -26,7 +26,6 @@ #include <libgnome/libgnome.h> #include <libgnomeui/libgnomeui.h> - #include <gtk/gtk.h> #include <stdlib.h> diff --git a/sflphone-client-gnome/src/mainwindow.c b/sflphone-client-gnome/src/mainwindow.c index 71377ff085a958373eac254bb83c757abed1e055..742276a52dd68252ee00d44354222e90a5ea00c8 100644 --- a/sflphone-client-gnome/src/mainwindow.c +++ b/sflphone-client-gnome/src/mainwindow.c @@ -19,7 +19,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <toolbar.h> #include <config.h> #include <actions.h> #include <calltree.h> @@ -27,7 +26,6 @@ #include <preferencesdialog.h> #include <dialpad.h> #include <mainwindow.h> -#include <menus.h> #include <sliders.h> #include <contacts/searchbar.h> #include <assistant.h> @@ -37,6 +35,7 @@ #include <gtk/gtk.h> /** Local variables */ +GtkUIManager *ui_manager = NULL; GtkAccelGroup * accelGroup = NULL; GtkWidget * window = NULL; GtkWidget * subvbox = NULL; @@ -51,375 +50,387 @@ PidginScrollBook *embedded_error_notebook; /** * Minimize the main window. */ -static gboolean + static gboolean on_delete (GtkWidget * widget UNUSED, gpointer data UNUSED) { #if GTK_CHECK_VERSION(2,10,0) - gtk_widget_hide(GTK_WIDGET( get_main_window() )); - set_minimized( TRUE ); + gtk_widget_hide(GTK_WIDGET( get_main_window() )); + set_minimized( TRUE ); #endif - return TRUE; + return TRUE; } /** Ask the user if he wants to hangup current calls */ gboolean main_window_ask_quit(){ - guint count = calllist_get_size(current_calls); - GtkWidget * dialog; - gint response; - gchar * question; - - if(count == 1) - { - question = _("There is one call in progress."); - } - else - { - question = _("There are calls in progress."); - } - - dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window) , - GTK_DIALOG_MODAL, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - "%s\n%s", - question, - _("Do you still want to 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; + guint count = calllist_get_size(current_calls); + GtkWidget * dialog; + gint response; + gchar * question; + + if(count == 1) + { + question = _("There is one call in progress."); + } + else + { + question = _("There are calls in progress."); + } + + dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window) , + GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + "%s\n%s", + question, + _("Do you still want to 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; } -static gboolean + static gboolean on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSED) { - DEBUG("On key released from Main Window : %s", gtk_widget_get_name(widget)); - - if (focus_is_on_searchbar == FALSE) { - // If a modifier key is pressed, it's a shortcut, pass along - if(event->state & GDK_CONTROL_MASK || - event->state & GDK_MOD1_MASK || - event->keyval == 60 || // < - event->keyval == 62 || // > - event->keyval == 34 || // " - event->keyval == 65361 || // left arrow - event->keyval == 65363 || // right arrow - event->keyval >= 65470 || // F-keys - event->keyval == 32 // space - ) - return FALSE; - else - sflphone_keypad(event->keyval, event->string); - } - - return TRUE; + DEBUG("On key released from Main Window : %s", gtk_widget_get_name(widget)); + + if (focus_is_on_searchbar == FALSE) { + // If a modifier key is pressed, it's a shortcut, pass along + if(event->state & GDK_CONTROL_MASK || + event->state & GDK_MOD1_MASK || + event->keyval == 60 || // < + event->keyval == 62 || // > + event->keyval == 34 || // " + event->keyval == 65361 || // left arrow + event->keyval == 65363 || // right arrow + event->keyval >= 65470 || // F-keys + event->keyval == 32 // space + ) + return FALSE; + else + sflphone_keypad(event->keyval, event->string); + } + + return TRUE; } void focus_on_mainwindow_out(){ - DEBUG("focus_on_mainwindow_out"); - // gtk_widget_grab_focus(GTK_WIDGET(window)); - + // gtk_widget_grab_focus(GTK_WIDGET(window)); + } void focus_on_mainwindow_in(){ - DEBUG("focus_on_mainwindow_in"); - // gtk_widget_grab_focus(GTK_WIDGET(window)); + // gtk_widget_grab_focus(GTK_WIDGET(window)); } -void + void create_main_window () { - GtkWidget *widget; + GtkWidget *widget; + gchar *path; + GError *error = NULL; + gboolean ret; + + focus_is_on_calltree = FALSE; + focus_is_on_searchbar = FALSE; - focus_is_on_calltree = FALSE; - focus_is_on_searchbar = FALSE; + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_container_set_border_width (GTK_CONTAINER (window), 0); + gtk_window_set_title (GTK_WINDOW (window), PACKAGE); + gtk_window_set_default_size (GTK_WINDOW (window), MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT); + gtk_window_set_default_icon_from_file (LOGO, + NULL); + gtk_window_set_position( GTK_WINDOW( window ) , GTK_WIN_POS_MOUSE); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_container_set_border_width (GTK_CONTAINER (window), 0); - gtk_window_set_title (GTK_WINDOW (window), PACKAGE); - gtk_window_set_default_size (GTK_WINDOW (window), MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT); - gtk_window_set_default_icon_from_file (LOGO, - NULL); - gtk_window_set_position( GTK_WINDOW( window ) , GTK_WIN_POS_MOUSE); + // GTK_WIDGET_SET_FLAGS (GTK_WIDGET(window),GTK_CAN_FOCUS); + // gtk_widget_grab_focus (GTK_WIDGET(window)); - // GTK_WIDGET_SET_FLAGS (GTK_WIDGET(window),GTK_CAN_FOCUS); - // gtk_widget_grab_focus (GTK_WIDGET(window)); + /* Connect the destroy event of the window with our on_destroy function + * When the window is about to be destroyed we get a notificaiton and + * stop the main GTK loop + */ + g_signal_connect (G_OBJECT (window), "delete-event", + G_CALLBACK (on_delete), NULL); - /* Connect the destroy event of the window with our on_destroy function - * When the window is about to be destroyed we get a notificaiton and - * stop the main GTK loop - */ - g_signal_connect (G_OBJECT (window), "delete-event", - G_CALLBACK (on_delete), NULL); + g_signal_connect (G_OBJECT (window), "key-release-event", + G_CALLBACK (on_key_released), NULL); - g_signal_connect (G_OBJECT (window), "key-release-event", - G_CALLBACK (on_key_released), NULL); + g_signal_connect_after (G_OBJECT (window), "focus-in-event", + G_CALLBACK (focus_on_mainwindow_in), NULL); - g_signal_connect_after (G_OBJECT (window), "focus-in-event", - G_CALLBACK (focus_on_mainwindow_in), NULL); + g_signal_connect_after (G_OBJECT (window), "focus-out-event", + G_CALLBACK (focus_on_mainwindow_out), NULL); - g_signal_connect_after (G_OBJECT (window), "focus-out-event", - G_CALLBACK (focus_on_mainwindow_out), NULL); - - gtk_widget_set_name (window, "mainwindow"); + gtk_widget_set_name (window, "mainwindow"); - /* Create an accel group for window's shortcuts */ - accelGroup = gtk_accel_group_new (); - gtk_window_add_accel_group(GTK_WINDOW(window), accelGroup); + ret = uimanager_new (&ui_manager); + if (!ret) + { + //show_error_dialog (GTK_WINDOW (window), error->message, + // _("Could not load ui.xml. The program may be not properly installed")); + g_error_free (error); + exit (1); + } - vbox = gtk_vbox_new ( FALSE /*homogeneous*/, 0 /*spacing*/); - subvbox = gtk_vbox_new ( FALSE /*homogeneous*/, 5 /*spacing*/); + /* Create an accel group for window's shortcuts */ + gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group (ui_manager)); - widget = create_menus(); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + vbox = gtk_vbox_new ( FALSE /*homogeneous*/, 0 /*spacing*/); + subvbox = gtk_vbox_new ( FALSE /*homogeneous*/, 5 /*spacing*/); - widget = create_toolbar(); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + widget = create_menus (ui_manager); + gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + widget = create_toolbar_actions (ui_manager); + gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_box_pack_start (GTK_BOX (vbox), current_calls->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_box_pack_start (GTK_BOX (vbox), contacts->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_box_pack_start (GTK_BOX (vbox), current_calls->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_box_pack_start (GTK_BOX (vbox), contacts->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/, FALSE /*fill*/, 0 /*padding*/); + gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/, FALSE /*fill*/, 0 /*padding*/); - embedded_error_notebook = PIDGIN_SCROLL_BOOK(pidgin_scroll_book_new()); - gtk_box_pack_start(GTK_BOX(subvbox), - GTK_WIDGET(embedded_error_notebook), FALSE, FALSE, 0); + embedded_error_notebook = PIDGIN_SCROLL_BOOK(pidgin_scroll_book_new()); + gtk_box_pack_start(GTK_BOX(subvbox), + GTK_WIDGET(embedded_error_notebook), FALSE, FALSE, 0); - if(SHOW_VOLUME){ - speaker_control = create_slider("speaker"); - gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (speaker_control); - mic_control = create_slider("mic"); - gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (mic_control); - } + widget = create_toolbar_windows (ui_manager); + gtk_toolbar_set_style (GTK_TOOLBAR (widget), GTK_TOOLBAR_ICONS); + gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - if(SHOW_DIALPAD){ - dialpad = create_dialpad(); - gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (dialpad); - } + if(SHOW_VOLUME){ + speaker_control = create_slider("speaker"); + gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (speaker_control); + mic_control = create_slider("mic"); + gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (mic_control); + } - /* Status bar */ - statusBar = gtk_statusbar_new(); - gtk_box_pack_start (GTK_BOX (vbox), statusBar, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_container_add (GTK_CONTAINER (window), vbox); + if(SHOW_DIALPAD){ + dialpad = create_dialpad(); + gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (dialpad); + } - /* make sure that everything, window and label, are visible */ - gtk_widget_show_all (window); + /* Status bar */ + statusBar = gtk_statusbar_new(); + gtk_box_pack_start (GTK_BOX (vbox), statusBar, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_container_add (GTK_CONTAINER (window), vbox); - /* dont't show the history */ - gtk_widget_hide(history->tree); + /* make sure that everything, window and label, are visible */ + gtk_widget_show_all (window); - /* dont't show the contact list */ - gtk_widget_hide(contacts->tree); + /* dont't show the history */ + gtk_widget_hide(history->tree); - searchbar_init(history); - searchbar_init(contacts); + /* dont't show the contact list */ + gtk_widget_hide(contacts->tree); - /* don't show waiting layer */ - gtk_widget_hide(waitingLayer); + searchbar_init(history); + searchbar_init(contacts); - // Configuration wizard - if (account_list_get_size() == 0) - { + /* don't show waiting layer */ + gtk_widget_hide(waitingLayer); + + // Configuration wizard + if (account_list_get_size() == 0) + { #if GTK_CHECK_VERSION(2,10,0) - build_wizard(); + build_wizard(); #else - GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_YES_NO, - "<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?"); + GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_YES_NO, + "<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?"); - int response = gtk_dialog_run (GTK_DIALOG(dialog)); + int response = gtk_dialog_run (GTK_DIALOG(dialog)); - gtk_widget_destroy (GTK_WIDGET(dialog)); + gtk_widget_destroy (GTK_WIDGET(dialog)); - if (response == GTK_RESPONSE_YES) - { - show_preferences_dialog(); - } + if (response == GTK_RESPONSE_YES) + { + show_preferences_dialog(); + } #endif - } + } } -GtkAccelGroup * + GtkAccelGroup * get_accel_group() { - return accelGroup; + return accelGroup; } -GtkWidget * + GtkWidget * get_main_window() { - return window; + return window; } void main_window_message(GtkMessageType type, gchar * markup){ - - GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(get_main_window()), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - type, - GTK_BUTTONS_CLOSE, - "%s\n", - markup); + + GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(get_main_window()), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + type, + GTK_BUTTONS_CLOSE, + "%s\n", + markup); - gtk_window_set_title(GTK_WINDOW(dialog), _("SFLphone Error")); + gtk_window_set_title(GTK_WINDOW(dialog), _("SFLphone Error")); - gtk_dialog_run (GTK_DIALOG(dialog)); - gtk_widget_destroy (GTK_WIDGET(dialog)); + gtk_dialog_run (GTK_DIALOG(dialog)); + gtk_widget_destroy (GTK_WIDGET(dialog)); } void main_window_error_message(gchar * markup){ - main_window_message(GTK_MESSAGE_ERROR, markup); + main_window_message(GTK_MESSAGE_ERROR, markup); } void main_window_warning_message(gchar * markup){ - main_window_message(GTK_MESSAGE_WARNING, markup); + main_window_message(GTK_MESSAGE_WARNING, markup); } void main_window_info_message(gchar * markup){ - main_window_message(GTK_MESSAGE_INFO, markup); + main_window_message(GTK_MESSAGE_INFO, markup); } void main_window_dialpad( gboolean state ){ - if(state) { - dialpad = create_dialpad(); - gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (dialpad); - } else { - gtk_container_remove(GTK_CONTAINER (subvbox), dialpad); - } + if(state) { + dialpad = create_dialpad(); + gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (dialpad); + } else { + gtk_container_remove(GTK_CONTAINER (subvbox), dialpad); + } } void main_window_volume_controls( gboolean state ){ - if(state){ - speaker_control = create_slider("speaker"); - gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (speaker_control); - mic_control = create_slider("mic"); - gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (mic_control); - } else { - gtk_container_remove( GTK_CONTAINER(subvbox) , speaker_control ); - gtk_container_remove( GTK_CONTAINER(subvbox) , mic_control ); - } + if(state){ + speaker_control = create_slider("speaker"); + gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (speaker_control); + mic_control = create_slider("mic"); + gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_widget_show_all (mic_control); + } else { + gtk_container_remove( GTK_CONTAINER(subvbox) , speaker_control ); + gtk_container_remove( GTK_CONTAINER(subvbox) , mic_control ); + } } -void + void statusbar_push_message(const gchar * message, guint id) { - gtk_statusbar_push(GTK_STATUSBAR(statusBar), id, message); + gtk_statusbar_push(GTK_STATUSBAR(statusBar), id, message); } -void + void statusbar_pop_message(guint id) { - gtk_statusbar_pop(GTK_STATUSBAR(statusBar), id); + gtk_statusbar_pop(GTK_STATUSBAR(statusBar), id); } -static void + static void add_error_dialog(GtkWidget *dialog, callable_obj_t * call) { - gtk_container_add(GTK_CONTAINER(embedded_error_notebook), dialog); - call_add_error(call, dialog); + gtk_container_add(GTK_CONTAINER(embedded_error_notebook), dialog); + call_add_error(call, dialog); } -static void + static void destroy_error_dialog_cb(GtkObject *dialog, callable_obj_t * call) { - call_remove_error(call, dialog); + call_remove_error(call, dialog); } -void + void main_window_zrtp_not_supported(callable_obj_t * c) { - account_t* account_details=NULL; - gchar* warning_enabled=""; - - account_details = account_list_get_by_id(c->_accountID); - if(account_details != NULL) { - warning_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING); - DEBUG("Warning Enabled %s", warning_enabled); - } else { - DEBUG("Account is null callID %s", c->_callID); - GHashTable * properties = NULL; - properties = sflphone_get_ip2ip_properties(); - if(properties != NULL) - { warning_enabled = g_hash_table_lookup(properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING); } - } - - if(g_strcasecmp(warning_enabled,"true") == 0) { - PidginMiniDialog *mini_dialog; - gchar *desc = g_markup_printf_escaped(_("ZRTP is not supported by peer %s\n"), c->_peer_number); - mini_dialog = pidgin_mini_dialog_new(_("Secure Communication Unavailable"), desc, GTK_STOCK_DIALOG_WARNING); - pidgin_mini_dialog_add_button(mini_dialog, _("Continue"), NULL, NULL); - pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); - - g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c); - - add_error_dialog(GTK_WIDGET(mini_dialog), c); - } + account_t* account_details=NULL; + gchar* warning_enabled=""; + + account_details = account_list_get_by_id(c->_accountID); + if(account_details != NULL) { + warning_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING); + DEBUG("Warning Enabled %s", warning_enabled); + } else { + DEBUG("Account is null callID %s", c->_callID); + GHashTable * properties = NULL; + properties = sflphone_get_ip2ip_properties(); + if(properties != NULL) + { warning_enabled = g_hash_table_lookup(properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING); } + } + + if(g_strcasecmp(warning_enabled,"true") == 0) { + PidginMiniDialog *mini_dialog; + gchar *desc = g_markup_printf_escaped(_("ZRTP is not supported by peer %s\n"), c->_peer_number); + mini_dialog = pidgin_mini_dialog_new(_("Secure Communication Unavailable"), desc, GTK_STOCK_DIALOG_WARNING); + pidgin_mini_dialog_add_button(mini_dialog, _("Continue"), NULL, NULL); + pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); + + g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c); + + add_error_dialog(GTK_WIDGET(mini_dialog), c); + } } -void + void main_window_zrtp_negotiation_failed(const gchar* callID, const gchar* reason, const gchar* severity) { - gchar* peer_number = "(number unknown)"; - callable_obj_t * c = NULL; - c = calllist_get(current_calls, callID); - if (c != NULL) { - peer_number = c->_peer_number; - } - - PidginMiniDialog *mini_dialog; - gchar *desc = g_markup_printf_escaped(_("A %s error forced the call with %s to fall under unencrypted mode.\nExact reason: %s\n"), severity, peer_number, reason); - mini_dialog = pidgin_mini_dialog_new(_("ZRTP negotiation failed"), desc, GTK_STOCK_DIALOG_WARNING); - pidgin_mini_dialog_add_button(mini_dialog, _("Continue"), NULL, NULL); - pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); - - g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c); - - add_error_dialog(GTK_WIDGET(mini_dialog), c); + gchar* peer_number = "(number unknown)"; + callable_obj_t * c = NULL; + c = calllist_get(current_calls, callID); + if (c != NULL) { + peer_number = c->_peer_number; + } + + PidginMiniDialog *mini_dialog; + gchar *desc = g_markup_printf_escaped(_("A %s error forced the call with %s to fall under unencrypted mode.\nExact reason: %s\n"), severity, peer_number, reason); + mini_dialog = pidgin_mini_dialog_new(_("ZRTP negotiation failed"), desc, GTK_STOCK_DIALOG_WARNING); + pidgin_mini_dialog_add_button(mini_dialog, _("Continue"), NULL, NULL); + pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); + + g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c); + + add_error_dialog(GTK_WIDGET(mini_dialog), c); } -void + void main_window_confirm_go_clear(callable_obj_t * c) { - PidginMiniDialog *mini_dialog; - gchar *desc = g_markup_printf_escaped(_("%s wants to stop using secure communication. Confirm will resume conversation without SRTP.\n"), c->_peer_number); - mini_dialog = pidgin_mini_dialog_new(_("Confirm Go Clear"), desc, GTK_STOCK_STOP); - pidgin_mini_dialog_add_button(mini_dialog, _("Confirm"), sflphone_set_confirm_go_clear, NULL); - pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); - - add_error_dialog(GTK_WIDGET(mini_dialog), c); + PidginMiniDialog *mini_dialog; + gchar *desc = g_markup_printf_escaped(_("%s wants to stop using secure communication. Confirm will resume conversation without SRTP.\n"), c->_peer_number); + mini_dialog = pidgin_mini_dialog_new(_("Confirm Go Clear"), desc, GTK_STOCK_STOP); + pidgin_mini_dialog_add_button(mini_dialog, _("Confirm"), sflphone_set_confirm_go_clear, NULL); + pidgin_mini_dialog_add_button(mini_dialog, _("Stop Call"), sflphone_hang_up, NULL); + + add_error_dialog(GTK_WIDGET(mini_dialog), c); } diff --git a/sflphone-client-gnome/src/mainwindow.h b/sflphone-client-gnome/src/mainwindow.h index ec35b4a2f2562bc6ebcea42c78427c9ac092e3aa..aea6763bcff63ea1dd6ec2b776b3f4b30730173a 100644 --- a/sflphone-client-gnome/src/mainwindow.h +++ b/sflphone-client-gnome/src/mainwindow.h @@ -22,8 +22,9 @@ #include <calllist.h> #include <calltree.h> +#include <uimanager.h> -#define MAIN_WINDOW_WIDTH 300 +#define MAIN_WINDOW_WIDTH 400 #define MAIN_WINDOW_HEIGHT 320 /** @file mainwindow.h diff --git a/sflphone-client-gnome/src/menus.c b/sflphone-client-gnome/src/menus.c deleted file mode 100644 index cac13584d57296bf57f628ac2a7fbed4f459dfb1..0000000000000000000000000000000000000000 --- a/sflphone-client-gnome/src/menus.c +++ /dev/null @@ -1,1205 +0,0 @@ -/* - * Copyright (C) 2007 Savoir-Faire Linux inc. - * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> - * Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <menus.h> -#include <config.h> -#include <preferencesdialog.h> -#include <accountlistconfigdialog.h> -#include <dbus/dbus.h> -#include <mainwindow.h> -#include <assistant.h> -#include <gtk/gtk.h> -#include <glib/gprintf.h> -#include <string.h> // for strlen -#include <libgnome/gnome-help.h> - -GtkWidget * pickUpMenu; -GtkWidget * hangUpMenu; -GtkWidget * newCallMenu; -GtkWidget * holdMenu; -GtkWidget * copyMenu; -GtkWidget * pasteMenu; -GtkWidget * recordMenu; - -GtkWidget * editable_num; -GtkDialog * edit_dialog; - -guint holdConnId; //The hold_menu signal connection ID - -GtkWidget * dialpadMenu; -GtkWidget * volumeMenu; -GtkWidget * searchbarMenu; - - -void update_menus() -{ - //Block signals for holdMenu - gtk_signal_handler_block(GTK_OBJECT(holdMenu), holdConnId); - - gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(recordMenu), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(copyMenu), FALSE); - - callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); - if (selectedCall) - { - gtk_widget_set_sensitive( GTK_WIDGET(copyMenu), TRUE); - switch(selectedCall->_state) - { - case CALL_STATE_INCOMING: - gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - break; - case CALL_STATE_HOLD: - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg")); - break; - case CALL_STATE_RINGING: - gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - break; - case CALL_STATE_DIALING: - gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE); - break; - case CALL_STATE_CURRENT: - case CALL_STATE_RECORD: - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(recordMenu), TRUE); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg")); - break; - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - break; - default: - WARN("Should not happen in update_menus()!"); - break; - } - } - else - { - gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu), TRUE); - } - gtk_signal_handler_unblock(holdMenu, holdConnId); - -} -/* ----------------------------------------------------------------- */ -static void help_contents_cb () -{ - GError *error = NULL; - - gnome_help_display ("sflphone.xml", NULL, &error); - if (error != NULL) { - g_warning ("%s", error->message); - g_error_free (error); - } -} - - - - static void -help_about ( void * foo UNUSED) -{ - gchar *authors[] = { - "Yan Morin <yan.morin@savoirfairelinux.com>", - "Jérôme Oufella <jerome.oufella@savoirfairelinux.com>", - "Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>", - "Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>", - "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", - "Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>", - "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", - "Yun Liu <yun.liu@savoirfairelinux.com>", - "Alexandre Savard <alexandre.savard@savoirfairelinux.com>", - "Jean-Philippe Barrette-LaPierre", - "Laurielle Lea", - "Pierre-Luc Bacon <pierre-luc.bacon@savoifairelinux.com>", - NULL}; - gchar *artists[] = { - "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", - "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", - NULL}; - - gtk_show_about_dialog( GTK_WINDOW(get_main_window()), - "artists", artists, - "authors", authors, - "comments", _("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."), - "copyright", "Copyright © 2004-2009 Savoir-faire Linux Inc.", - "name", PACKAGE, - "title", _("About SFLphone"), - "version", VERSION, - "website", "http://www.sflphone.org", - NULL); - -} - - - GtkWidget * -create_help_menu() -{ - GtkWidget * menu; - GtkWidget * root_menu; - GtkWidget * menu_items; - - menu = gtk_menu_new (); - - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_ABOUT, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (help_about), - NULL); - gtk_widget_show (menu_items); - - - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_HELP, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (help_contents_cb), - NULL); - gtk_widget_show (menu_items); - - root_menu = gtk_menu_item_new_with_mnemonic (_("_Help")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu); - - return root_menu; -} -/* ----------------------------------------------------------------- */ - GtkWidget * -create_waiting_icon() -{ - GtkWidget * waiting_icon; - waiting_icon = gtk_image_menu_item_new_with_label(""); - gtk_image_menu_item_set_image ( - GTK_IMAGE_MENU_ITEM(waiting_icon), - gtk_image_new_from_animation( - gdk_pixbuf_animation_new_from_file(ICONS_DIR "/wait-on.gif", NULL))); - gtk_menu_item_set_right_justified(GTK_MENU_ITEM(waiting_icon),TRUE); - - return waiting_icon; -} -/* ----------------------------------------------------------------- */ - - static void -call_new_call ( void * foo UNUSED) -{ - sflphone_new_call(); -} - - static void -call_quit ( void * foo UNUSED) -{ - sflphone_quit(); -} - - static void -call_minimize ( void * foo UNUSED) -{ -#if GTK_CHECK_VERSION(2,10,0) - gtk_widget_hide(GTK_WIDGET( get_main_window() )); - set_minimized( TRUE ); -#endif -} - - static void -switch_account( GtkWidget* item , gpointer data UNUSED) -{ - account_t* acc = g_object_get_data( G_OBJECT(item) , "account" ); - DEBUG("%s" , acc->accountID); - account_list_set_current (acc); - status_bar_display_account (); -} - - static void -call_hold (void* foo UNUSED) -{ - callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); - - if(selectedCall) - { - if(selectedCall->_state == CALL_STATE_HOLD) - { - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg")); - sflphone_off_hold(); - } - else - { - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg")); - sflphone_on_hold(); - } - } -} - - static void -conference_hold (void* foo UNUSED) -{ - conference_obj_t * selectedConf = calltab_get_selected_conf(); - - switch(selectedConf->_state) - { - case CONFERENCE_STATE_HOLD: - { - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg")); - selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED; - sflphone_conference_off_hold(selectedConf); - } - break; - - case CONFERENCE_STATE_ACTIVE_ATACHED: - case CONFERENCE_STATE_ACTIVE_DETACHED: - { - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg")); - selectedConf->_state = CONFERENCE_STATE_HOLD; - sflphone_conference_on_hold(selectedConf); - } - break; - default: - break; - } -} - - static void -call_pick_up ( void * foo UNUSED) -{ - sflphone_pick_up(); -} - - static void -call_hang_up ( void * foo UNUSED) -{ - sflphone_hang_up(); -} - - static void -conference_hang_up ( void * foo UNUSED) -{ - sflphone_conference_hang_up(); -} - - static void -call_record ( void * foo UNUSED) -{ - sflphone_rec_call(); -} - - static void -call_configuration_assistant ( void * foo UNUSED) -{ -#if GTK_CHECK_VERSION(2,10,0) - build_wizard(); -#endif -} - - static void -remove_from_history( void * foo UNUSED) -{ - callable_obj_t* c = calltab_get_selected_call( history ); - if(c){ - DEBUG("Remove the call from the history"); - calllist_remove_from_history( c ); - } -} - - static void -call_back( void * foo UNUSED) -{ - callable_obj_t *selected_call, *new_call; - - selected_call = calltab_get_selected_call( active_calltree ); - - if( selected_call ) - { - create_new_call (CALL, CALL_STATE_DIALING, "", "", selected_call->_peer_name, selected_call->_peer_number, &new_call); - - calllist_add(current_calls, new_call); - calltree_add_call(current_calls, new_call, NULL); - sflphone_place_call(new_call); - calltree_display (current_calls); - } -} - - GtkWidget * -create_call_menu() -{ - GtkWidget * menu; - GtkWidget * root_menu; - GtkWidget * menu_items; - GtkWidget * image; - - menu = gtk_menu_new (); - - image = gtk_image_new_from_file( ICONS_DIR "/icon_dialpad.svg"); - newCallMenu = gtk_image_menu_item_new_with_mnemonic(_("_New call")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( newCallMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), newCallMenu); - g_signal_connect_swapped (G_OBJECT (newCallMenu), "activate", - G_CALLBACK (call_new_call), - NULL); - gtk_widget_show (newCallMenu); - - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - - image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); - pickUpMenu = gtk_image_menu_item_new_with_mnemonic(_("_Pick up")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( pickUpMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), pickUpMenu); - gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), FALSE); - g_signal_connect_swapped (G_OBJECT (pickUpMenu), "activate", - G_CALLBACK (call_pick_up), - NULL); - gtk_widget_show (pickUpMenu); - - image = gtk_image_new_from_file( ICONS_DIR "/icon_hangup.svg"); - hangUpMenu = gtk_image_menu_item_new_with_mnemonic(_("_Hang up")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( hangUpMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), hangUpMenu); - gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), FALSE); - g_signal_connect_swapped (G_OBJECT (hangUpMenu), "activate", - G_CALLBACK (call_hang_up), - NULL); - gtk_widget_show (hangUpMenu); - - image = gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg"); - holdMenu = gtk_image_menu_item_new_with_mnemonic (_("On _Hold")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), holdMenu); - gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE); - //Here we connect only to activate - //The toggled state is managed from update_menus() - holdConnId = g_signal_connect(G_OBJECT (holdMenu), "activate", - G_CALLBACK (call_hold), - NULL); - gtk_widget_show (menu_items); - - image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_MENU); - recordMenu = gtk_image_menu_item_new_with_mnemonic(_("_Record")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( recordMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), recordMenu); - gtk_widget_set_sensitive( GTK_WIDGET(recordMenu), FALSE); - g_signal_connect_swapped (G_OBJECT (recordMenu), "activate", - G_CALLBACK (call_record), - NULL); - gtk_widget_show (recordMenu); - - // Separator - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - - // Close menu to minimize the main window to the system tray - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_CLOSE, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (call_minimize), - NULL); - gtk_widget_show (menu_items); - - // Quit Menu - quit SFLphone - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_QUIT, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (call_quit), - NULL); - gtk_widget_show (menu_items); - - - root_menu = gtk_menu_item_new_with_mnemonic (_("_Call")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu); - - return root_menu; -} -/* ----------------------------------------------------------------- */ - - static void -edit_preferences ( void * foo UNUSED) -{ - show_preferences_dialog(); -} - - static void -edit_accounts ( void * foo UNUSED) -{ - show_account_list_config_dialog(); -} - -// The menu Edit/Copy should copy the current selected call's number - static void -edit_copy ( void * foo UNUSED) -{ - GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); - callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); - gchar * no = NULL; - - if(selectedCall) - { - switch(selectedCall->_state) - { - case CALL_STATE_TRANSFERT: - case CALL_STATE_DIALING: - case CALL_STATE_RINGING: - no = selectedCall->_peer_number; - break; - case CALL_STATE_CURRENT: - case CALL_STATE_HOLD: - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - case CALL_STATE_INCOMING: - default: - no = selectedCall->_peer_number; - break; - } - DEBUG("Clipboard number: %s\n", no); - gtk_clipboard_set_text (clip, no, strlen(no) ); - } - -} - -// The menu Edit/Paste should paste the clipboard into the current selected call - static void -edit_paste ( void * foo UNUSED) -{ - GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); - callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); - gchar * no = gtk_clipboard_wait_for_text (clip); - - if(no && selectedCall) - { - switch(selectedCall->_state) - { - case CALL_STATE_TRANSFERT: - case CALL_STATE_DIALING: - // Add the text to the number - { - gchar * before; - before = selectedCall->_peer_number; - DEBUG("TO: %s\n", before); - selectedCall->_peer_number = g_strconcat(before, no, NULL); - - if(selectedCall->_state == CALL_STATE_DIALING) - { - selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); - } - calltree_update_call(current_calls, selectedCall, NULL); - } - break; - case CALL_STATE_RINGING: - case CALL_STATE_INCOMING: - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - case CALL_STATE_HOLD: - { // Create a new call to hold the new text - selectedCall = sflphone_new_call(); - - gchar * before = selectedCall->_peer_number; - selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number, no, NULL); - DEBUG("TO: %s", selectedCall->_peer_number); - - selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); - - calltree_update_call(current_calls, selectedCall, NULL); - } - break; - case CALL_STATE_CURRENT: - default: - { - unsigned int i; - for(i = 0; i < strlen(no); i++) - { - gchar * oneNo = g_strndup(&no[i], 1); - DEBUG("<%s>", oneNo); - dbus_play_dtmf(oneNo); - - gchar * temp = g_strconcat(selectedCall->_peer_number, oneNo, NULL); - selectedCall->_peer_info = get_peer_info (temp, selectedCall->_peer_name); - // g_free(temp); - calltree_update_call(current_calls, selectedCall, NULL); - - } - } - break; - } - - } - else // There is no current call, create one - { - selectedCall = sflphone_new_call(); - - gchar * before = selectedCall->_peer_number; - selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number, no, NULL); - g_free(before); - DEBUG("TO: %s", selectedCall->_peer_number); - - g_free(selectedCall->_peer_info); - selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); - calltree_update_call(current_calls, selectedCall, NULL); - } - -} - - static void -clear_history (void) -{ - if( calllist_get_size( history ) != 0 ){ - calllist_clean_history(); - } -} - - GtkWidget * -create_edit_menu() -{ - GtkWidget * menu; - GtkWidget * image; - GtkWidget * root_menu; - GtkWidget * menu_items; - - menu = gtk_menu_new (); - - copyMenu = gtk_image_menu_item_new_from_stock( GTK_STOCK_COPY, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), copyMenu); - g_signal_connect_swapped (G_OBJECT (copyMenu), "activate", - G_CALLBACK (edit_copy), - NULL); - gtk_widget_show (copyMenu); - - pasteMenu = gtk_image_menu_item_new_from_stock( GTK_STOCK_PASTE, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), pasteMenu); - g_signal_connect_swapped (G_OBJECT (pasteMenu), "activate", - G_CALLBACK (edit_paste), - NULL); - gtk_widget_show (pasteMenu); - - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - - menu_items = gtk_image_menu_item_new_with_mnemonic(_("Clear _history")); - image = gtk_image_new_from_stock( GTK_STOCK_CLEAR , GTK_ICON_SIZE_MENU ); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( menu_items ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (clear_history), - NULL); - gtk_widget_show (menu_items); - - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - -#if GTK_CHECK_VERSION(2,10,0) - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Account creation assistant")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped( G_OBJECT( menu_items ) , "activate" , G_CALLBACK( call_configuration_assistant ) , NULL ); - gtk_widget_show (menu_items); -#endif - - menu_items = gtk_menu_item_new_with_mnemonic( _("_Manage accounts") ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_accounts), - NULL); - gtk_widget_show (menu_items); - - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_PREFERENCES, NULL); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_preferences), - NULL); - gtk_widget_show (menu_items); - - - root_menu = gtk_menu_item_new_with_mnemonic (_("_Edit")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu); - - return root_menu; -} - -/* - static void - view_searchbar (GtkImageMenuItem *imagemenuitem UNUSED, - void* foo UNUSED) - { - gboolean state; - main_window_searchbar( &state ); - dbus_set_searchbar( state ); - } - */ - - -static void volume_bar_cb (GtkCheckMenuItem *checkmenuitem, gpointer user_data) -{ - gboolean toggled = gtk_check_menu_item_get_active(checkmenuitem); - main_window_volume_controls(toggled); - dbus_set_volume_controls(toggled); -} - -static void dialpad_bar_cb (GtkCheckMenuItem *checkmenuitem, gpointer user_data) -{ - gboolean toggled = gtk_check_menu_item_get_active(checkmenuitem); - main_window_dialpad(toggled); - dbus_set_dialpad(toggled); -} - - GtkWidget * -create_view_menu() -{ - GtkWidget * menu; - GtkWidget * root_menu; - GtkWidget * volumeBar; - GtkWidget * dialpadBar; - - menu = gtk_menu_new (); - - dialpadBar = gtk_check_menu_item_new_with_mnemonic(_("_Dialpad")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), dialpadBar); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(dialpadBar), (gboolean) SHOW_DIALPAD); - g_signal_connect(G_OBJECT (dialpadBar), "toggled", G_CALLBACK (dialpad_bar_cb), NULL); - gtk_widget_show (dialpadBar); - - - volumeBar = gtk_check_menu_item_new_with_mnemonic(_("_Volume Controls")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), volumeBar); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(volumeBar), (gboolean) SHOW_VOLUME); - g_signal_connect(G_OBJECT (volumeBar), "toggled", G_CALLBACK (volume_bar_cb), NULL); - gtk_widget_show (volumeBar); - - /*image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_MENU ); - searchbarMenu = gtk_image_menu_item_new_with_mnemonic (_("_Search bar")); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( searchbarMenu ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), searchbarMenu); - g_signal_connect(G_OBJECT (searchbarMenu), "activate", - G_CALLBACK (view_searchbar), - NULL); - gtk_widget_show (searchbarMenu); - */ - - root_menu = gtk_menu_item_new_with_mnemonic (_("_View")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu); - return root_menu; -} -/* ----------------------------------------------------------------- */ - GtkWidget * -create_menus ( ) -{ - - GtkWidget * menu_bar; - GtkWidget * root_menu; - - menu_bar = gtk_menu_bar_new (); - - root_menu = create_call_menu(); - gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu); - - root_menu = create_edit_menu(); - gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu); - - root_menu = create_view_menu(); - gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu); - - root_menu = create_help_menu(); - gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu); - - // Create waiting icon - waitingLayer = create_waiting_icon(); - gtk_menu_shell_append(GTK_MENU_SHELL (menu_bar),waitingLayer); - - return menu_bar; -} - -/* ----------------------------------------------------------------- */ - -static void edit_number_cb (GtkWidget *widget UNUSED, gpointer user_data) { - - show_edit_number ((callable_obj_t*)user_data); -} - - - void -show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) -{ - // TODO update the selection to make sure the call under the mouse is the call selected - - // call type boolean - gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, record = FALSE, detach = FALSE; - gboolean accounts = FALSE; - - // conference type boolean - gboolean hangup_conf = FALSE, hold_conf = FALSE; - - callable_obj_t * selectedCall; - conference_obj_t * selectedConf; - - if (calltab_get_selected_type(current_calls) == A_CALL) - { - DEBUG("MENUS: SELECTED A CALL"); - selectedCall = calltab_get_selected_call(current_calls); - - if (selectedCall) - { - copy = TRUE; - switch(selectedCall->_state) - { - case CALL_STATE_INCOMING: - pickup = TRUE; - hangup = TRUE; - detach = TRUE; - break; - case CALL_STATE_HOLD: - hangup = TRUE; - hold = TRUE; - detach = TRUE; - break; - case CALL_STATE_RINGING: - hangup = TRUE; - detach = TRUE; - break; - case CALL_STATE_DIALING: - pickup = TRUE; - hangup = TRUE; - accounts = TRUE; - break; - case CALL_STATE_RECORD: - case CALL_STATE_CURRENT: - hangup = TRUE; - hold = TRUE; - record = TRUE; - detach = TRUE; - break; - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - hangup = TRUE; - break; - default: - WARN("Should not happen in show_popup_menu for calls!"); - break; - } - } - } - else - { - DEBUG("MENUS: SELECTED A CONF"); - selectedConf = calltab_get_selected_conf(); - - if (selectedConf) - { - switch(selectedConf->_state) - { - case CONFERENCE_STATE_ACTIVE_ATACHED: - hangup_conf = TRUE; - hold_conf = TRUE; - break; - case CONFERENCE_STATE_ACTIVE_DETACHED: - break; - case CONFERENCE_STATE_HOLD: - hangup_conf = TRUE; - hold_conf = TRUE; - break; - default: - WARN("Should not happen in show_popup_menu for conferences!"); - break; - } - } - - } - - GtkWidget *menu; - GtkWidget *image; - int button, event_time; - GtkWidget * menu_items; - - menu = gtk_menu_new (); - //g_signal_connect (menu, "deactivate", - // G_CALLBACK (gtk_widget_destroy), NULL); - if (calltab_get_selected_type(current_calls) == A_CALL) - { - DEBUG("BUILD CALL MENU"); - - if(copy) - { - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_COPY, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_copy), - NULL); - gtk_widget_show (menu_items); - } - - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_PASTE, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_paste), - NULL); - gtk_widget_show (menu_items); - - if(pickup || hangup || hold) - { - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - gtk_widget_show (menu_items); - } - - if(pickup) - { - - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Pick up")); - image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (call_pick_up), - NULL); - gtk_widget_show (menu_items); - } - - if(hangup) - { - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up")); - image = gtk_image_new_from_file( ICONS_DIR "/icon_hangup.svg"); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (call_hang_up), - NULL); - gtk_widget_show (menu_items); - } - - if(hold) - { - menu_items = gtk_check_menu_item_new_with_mnemonic (_("On _Hold")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), - (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE)); - g_signal_connect(G_OBJECT (menu_items), "activate", - G_CALLBACK (call_hold), - NULL); - gtk_widget_show (menu_items); - } - - if(record) - { - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Record")); - image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (call_record), - NULL); - gtk_widget_show (menu_items); - } - - } - else - { - DEBUG("BUILD CONFERENCE MENU"); - - if(hangup_conf) - { - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up")); - image = gtk_image_new_from_file( ICONS_DIR "/icon_hangup.svg"); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (conference_hang_up), - NULL); - gtk_widget_show (menu_items); - } - - if(hold_conf) - { - menu_items = gtk_check_menu_item_new_with_mnemonic (_("On _Hold")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), - (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE)); - g_signal_connect(G_OBJECT (menu_items), "activate", - G_CALLBACK (conference_hold), - NULL); - gtk_widget_show (menu_items); - } - } - - if(accounts) - { - add_registered_accounts_to_menu (menu); - } - - if (event) - { - button = event->button; - event_time = event->time; - } - else - { - button = 0; - event_time = gtk_get_current_event_time (); - } - - gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - button, event_time); -} - - - void -show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event) -{ - - gboolean pickup = FALSE; - gboolean remove = FALSE; - gboolean edit = FALSE; - - callable_obj_t * selectedCall = calltab_get_selected_call( history ); - if (selectedCall) - { - remove = TRUE; - pickup = TRUE; - edit = TRUE; - } - - GtkWidget *menu; - GtkWidget *image; - int button, event_time; - GtkWidget * menu_items; - - menu = gtk_menu_new (); - //g_signal_connect (menu, "deactivate", - // G_CALLBACK (gtk_widget_destroy), NULL); - - if(pickup) - { - - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Call back")); - image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( menu_items ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL); - gtk_widget_show (menu_items); - } - - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - gtk_widget_show (menu_items); - - if (edit) - { - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_EDIT, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall); - gtk_widget_show (menu_items); - } - - - if(remove) - { - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_DELETE, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate", G_CALLBACK (remove_from_history), NULL); - gtk_widget_show (menu_items); - } - - if (event) - { - button = event->button; - event_time = event->time; - } - else - { - button = 0; - event_time = gtk_get_current_event_time (); - } - - gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - button, event_time); -} - void -show_popup_menu_contacts(GtkWidget *my_widget, GdkEventButton *event) -{ - - gboolean pickup = FALSE; - gboolean accounts = FALSE; - gboolean edit = FALSE; - - callable_obj_t * selectedCall = calltab_get_selected_call( contacts ); - if (selectedCall) - { - pickup = TRUE; - accounts = TRUE; - edit = TRUE; - } - - GtkWidget *menu; - GtkWidget *image; - int button, event_time; - GtkWidget * menu_items; - - menu = gtk_menu_new (); - //g_signal_connect (menu, "deactivate", - // G_CALLBACK (gtk_widget_destroy), NULL); - - if(pickup) - { - - menu_items = gtk_image_menu_item_new_with_mnemonic(_("_New call")); - image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( menu_items ), image ); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL); - gtk_widget_show (menu_items); - } - - if (edit) - { - menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_EDIT, get_accel_group()); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall); - gtk_widget_show (menu_items); - } - - if(accounts) - { - add_registered_accounts_to_menu (menu); - } - - if (event) - { - button = event->button; - event_time = event->time; - } - else - { - button = 0; - event_time = gtk_get_current_event_time (); - } - - gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - button, event_time); -} - - -void add_registered_accounts_to_menu (GtkWidget *menu) { - - GtkWidget *menu_items; - unsigned int i; - account_t* acc, *current; - gchar* alias; - - menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - gtk_widget_show (menu_items); - - for( i = 0 ; i < account_list_get_size() ; i++ ){ - acc = account_list_get_nth(i); - // Display only the registered accounts - if( g_strcasecmp( account_state_name(acc->state) , account_state_name(ACCOUNT_STATE_REGISTERED) ) == 0 ){ - alias = g_strconcat( g_hash_table_lookup(acc->properties , ACCOUNT_ALIAS) , " - ",g_hash_table_lookup(acc->properties , ACCOUNT_TYPE), NULL); - menu_items = gtk_check_menu_item_new_with_mnemonic(alias); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - g_object_set_data( G_OBJECT( menu_items ) , "account" , acc ); - g_free( alias ); - current = account_list_get_current(); - if(current){ - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), - (g_strcasecmp( acc->accountID , current->accountID) == 0)? TRUE : FALSE); - } - g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (switch_account), - NULL); - gtk_widget_show (menu_items); - } // fi - } - -} - -static void ok_cb (GtkWidget *widget UNUSED, gpointer userdata) { - - gchar *new_number; - callable_obj_t *modified_call, *original; - - // Change the number of the selected call before calling - new_number = (gchar*) gtk_entry_get_text (GTK_ENTRY (editable_num)); - original = (callable_obj_t*)userdata; - - // Create the new call - create_new_call (CALL, CALL_STATE_DIALING, "", g_strdup (original->_accountID), original->_peer_name, g_strdup (new_number), &modified_call); - - // Update the internal data structure and the GUI - calllist_add(current_calls, modified_call); - calltree_add_call(current_calls, modified_call, NULL); - sflphone_place_call(modified_call); - calltree_display (current_calls); - - // Close the contextual menu - gtk_widget_destroy (GTK_WIDGET (edit_dialog)); -} - -static void on_delete (GtkWidget * widget) -{ - gtk_widget_destroy (widget); -} - -void show_edit_number (callable_obj_t *call) { - - GtkWidget *ok, *hbox, *image; - GdkPixbuf *pixbuf; - - edit_dialog = GTK_DIALOG (gtk_dialog_new()); - - // Set window properties - gtk_window_set_default_size(GTK_WINDOW(edit_dialog), 300, 20); - gtk_window_set_title(GTK_WINDOW(edit_dialog), _("Edit phone number")); - gtk_window_set_resizable (GTK_WINDOW (edit_dialog), FALSE); - - g_signal_connect (G_OBJECT (edit_dialog), "delete-event", G_CALLBACK (on_delete), NULL); - - hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start(GTK_BOX (edit_dialog->vbox), hbox, TRUE, TRUE, 0); - - // Set the number to be edited - editable_num = gtk_entry_new (); -#if GTK_CHECK_VERSION(2,12,0) - gtk_widget_set_tooltip_text(GTK_WIDGET(editable_num), _("Edit the phone number before making a call")); -#endif - if (call) - gtk_entry_set_text(GTK_ENTRY(editable_num), g_strdup (call->_peer_number)); - else - ERROR ("This a bug, the call should be defined. menus.c line 1051"); - - gtk_box_pack_start(GTK_BOX (hbox), editable_num, TRUE, TRUE, 0); - - // Set a custom image for the button - pixbuf = gdk_pixbuf_new_from_file_at_scale (ICONS_DIR "/outgoing.svg", 32, 32, TRUE, NULL); - image = gtk_image_new_from_pixbuf (pixbuf); - ok = gtk_button_new (); - gtk_button_set_image (GTK_BUTTON (ok), image); - gtk_box_pack_start(GTK_BOX (hbox), ok, TRUE, TRUE, 0); - g_signal_connect(G_OBJECT (ok), "clicked", G_CALLBACK (ok_cb), call); - - gtk_widget_show_all (edit_dialog->vbox); - - gtk_dialog_run(edit_dialog); - -} - - diff --git a/sflphone-client-gnome/src/menus.h b/sflphone-client-gnome/src/menus.h deleted file mode 100644 index b74c75249b9e5092384557e147c7573050d86fe9..0000000000000000000000000000000000000000 --- a/sflphone-client-gnome/src/menus.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2007 Savoir-Faire Linux inc. - * Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __MENUS_H__ -#define __MENUS_H__ - -#include <gtk/gtk.h> -#include <callable_obj.h> -/** @file menus.h - * @brief The menus of the main window. - */ - -/** - * Build the menus bar - * @return GtkWidget* The menu bar - */ -GtkWidget * create_menus(); - -/** - * Update the menu state - */ -void update_menus(); - -/** - * Create a menu on right-click - * @param my_widget The widget you click on - * @param event The mouse event - */ -void show_popup_menu (GtkWidget *my_widget, GdkEventButton *event); - -/** - * Create a menu on right-click for the history - * @param my_widget The widget you click on - * @param event The mouse event - */ -void show_popup_menu_history (GtkWidget *my_widget, GdkEventButton *event); - -void show_popup_menu_contacts (GtkWidget *my_widget, GdkEventButton *event); - -void add_registered_accounts_to_menu (GtkWidget *menu); - -void show_edit_number (callable_obj_t *call); -#endif diff --git a/sflphone-client-gnome/src/toolbar.c b/sflphone-client-gnome/src/toolbar.c index e320920458af6ba10779ec2902d7f5a0502fb0b9..bf71aa1e8c66def3e25c48886b11966b70c392a9 100644 --- a/sflphone-client-gnome/src/toolbar.c +++ b/sflphone-client-gnome/src/toolbar.c @@ -20,20 +20,6 @@ #include <toolbar.h> #include <contacts/addressbook.h> - static gboolean -is_inserted( GtkWidget* button ) -{ - return ( GTK_WIDGET(button)->parent == GTK_WIDGET( toolbar ) ); -} - -/** - * Static rec_button - */ - static void -rec_button( GtkWidget *widget UNUSED, gpointer data UNUSED) -{ - sflphone_rec_call(); -} static void call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED) @@ -53,7 +39,7 @@ call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED) DEBUG("TO : %s" , mailbox_call->_peer_number); calllist_add( current_calls , mailbox_call ); calltree_add_call( current_calls, mailbox_call, NULL); - update_menus(); + update_actions(); sflphone_place_call( mailbox_call ); calltree_display(current_calls); } @@ -96,62 +82,9 @@ call_button( GtkWidget *widget UNUSED, gpointer data UNUSED) } } -/** - * Hang up the line - */ - static void -hang_up( GtkWidget *widget UNUSED, gpointer data UNUSED) -{ - sflphone_hang_up(); -} -/** - * Hold the line - */ - static void -hold( GtkWidget *widget UNUSED, gpointer data UNUSED) -{ - sflphone_on_hold(); -} - -/** - * Transfert the line - */ - static void -transfert (GtkToggleToolButton *toggle_tool_button, - gpointer user_data UNUSED ) -{ - gboolean up = gtk_toggle_tool_button_get_active(toggle_tool_button); - if(up) - { - sflphone_set_transfert(); - } - else - { - sflphone_unset_transfert(); - } -} - -/** - * Unhold call - */ - static void -unhold( GtkWidget *widget UNUSED, gpointer data UNUSED) -{ - sflphone_off_hold(); -} - -static void toggle_button_cb (GtkToggleToolButton *widget, gpointer user_data) -{ - calltab_t * to_switch; - gboolean toggle; - - to_switch = (calltab_t*) user_data; - toggle = gtk_toggle_tool_button_get_active (widget); - - (toggle)? calltree_display (to_switch) : calltree_display (current_calls); -} +/* GtkWidget *create_toolbar () { GtkWidget *ret; @@ -269,143 +202,4 @@ GtkWidget *create_toolbar () return ret; } - - void -toolbar_update_buttons () -{ - - gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(holdButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(contactButton), FALSE); - g_object_ref (contactButton); - if( is_inserted( GTK_WIDGET(contactButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET (contactButton)); - g_object_ref(holdButton); - g_object_ref(unholdButton); - if( is_inserted( GTK_WIDGET(holdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); - if( is_inserted( GTK_WIDGET(unholdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(unholdButton)); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), holdButton, 3); - g_object_ref(callButton); - g_object_ref(pickupButton); - if( is_inserted( GTK_WIDGET(callButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); - if( is_inserted( GTK_WIDGET(pickupButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton)); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), callButton, 0); - - // If addressbook support has been enabled and all addressbooks are loaded, display the icon - if (addressbook_is_enabled () && addressbook_is_ready()) { - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), contactButton, 5); - // Make the icon clickable only if at least one address book is active - if (addressbook_is_active ()) gtk_widget_set_sensitive( GTK_WIDGET(contactButton), TRUE); - } - - gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId); - gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transfertButton), FALSE); - gtk_signal_handler_unblock(transfertButton, transfertButtonConnId); - - callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); - conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree); - if (selectedCall) - { - switch(selectedCall->_state) - { - case CALL_STATE_INCOMING: - gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - g_object_ref(callButton); - gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), pickupButton, 0); - break; - case CALL_STATE_HOLD: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); - g_object_ref(holdButton); - gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), unholdButton, 3); - break; - case CALL_STATE_RINGING: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); - break; - case CALL_STATE_DIALING: - if( active_calltree == current_calls ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); - g_object_ref(callButton); - gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); - gtk_toolbar_insert(GTK_TOOLBAR(toolbar), pickupButton, 0); - break; - case CALL_STATE_CURRENT: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE); - break; - case CALL_STATE_BUSY: - case CALL_STATE_FAILURE: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - break; - case CALL_STATE_TRANSFERT: - gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId); - gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transfertButton), TRUE); - gtk_signal_handler_unblock(transfertButton, transfertButtonConnId); - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); - break; - case CALL_STATE_RECORD: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); - gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE); - break; - default: - // Fix bug #1145 - // Actually it could happen when sflphone_fill_account_list() - // call this function and no "call" is selected - // WARN("Toolbar update - Should not happen!"); - break; - } - } - else if(selectedConf) - { - switch(selectedConf->_state) - { - case CONFERENCE_STATE_ACTIVE_ATACHED: - gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); - break; - case CONFERENCE_STATE_ACTIVE_DETACHED: - gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); - break; - case CONFERENCE_STATE_RECORD: - gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); - break; - case CONFERENCE_STATE_HOLD: - gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); - break; - default: - break; - } - } - else - { - if( account_list_get_size() > 0 ) - { - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE ); - if (account_list_current_account_has_mailbox ()) - gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), TRUE ); - } - else - { - gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); - } - } - - -} +*/ diff --git a/sflphone-client-gnome/src/toolbar.h b/sflphone-client-gnome/src/toolbar.h index 7c539f34fa95d480a6aeeff2f503a9d0bbd1f094..ddd3b3a1148432ef31f1b9edb45bfd2d4112cb84 100644 --- a/sflphone-client-gnome/src/toolbar.h +++ b/sflphone-client-gnome/src/toolbar.h @@ -22,7 +22,6 @@ #include <callable_obj.h> #include <gtk/gtk.h> -#include <menus.h> #include <sflphone_const.h> #include <actions.h> diff --git a/sflphone-client-gnome/src/ui.xml b/sflphone-client-gnome/src/ui.xml new file mode 100644 index 0000000000000000000000000000000000000000..72b51160a1e691d1ac9a8da4772cd77c070aaa50 --- /dev/null +++ b/sflphone-client-gnome/src/ui.xml @@ -0,0 +1,63 @@ +<ui> + + <menubar name="MenuBar"> + <menu name="CallMenu" action="Call"> + <menuitem action="NewCall"/> + <separator/> + <menuitem action="PickUp"/> + <menuitem action="HangUp"/> + <menuitem name="OnHoldMenu" action="OnHold"/> + <menuitem action="Record"/> + <separator/> + <menuitem action="AccountAssistant"/> + <separator/> + <menuitem action="Close"/> + <menuitem action="Quit"/> + </menu> + + <menu name="EditMenu" action="Edit"> + <menuitem action="Copy"/> + <menuitem action="Paste"/> + <separator/> + <menuitem action="ClearHistory"/> + <separator/> + <menuitem action="Accounts"/> + <menuitem action="Preferences"/> + </menu> + + <menu name="ViewMenu" action="View"> + <menuitem action="Toolbar"/> + <separator/> + <menuitem action="Dialpad"/> + <menuitem action="VolumeControls"/> + <separator/> + <menuitem action="CallWindow"/> + <menuitem action="History"/> + <menuitem action="Addressbook"/> + </menu> + + <menu name="HelpMenu" action="Help"> + <menuitem action="HelpContents"/> + <menuitem action="About"/> + </menu> + + </menubar> + + <toolbar name="ToolbarActions"> + <toolitem name="NewCallToolbar" action="NewCall"/> + <toolitem name="PickUpToolbar" action="PickUp"/> + <toolitem action="HangUp"/> + <toolitem name="OnHoldToolbar" action="OnHold"/> + <toolitem name="OffHoldToolbar" action="OffHold"/> + <toolitem name="TransferToolbar" action="Transfer"/> + <separator/> + <toolitem action="Voicemail"/> + </toolbar> + + <toolbar name="ToolbarWindows"> + <toolitem name="CallWindowToolbar" action="CallWindow"/> + <toolitem name="HistoryToolbar" action="History"/> + <toolitem name="AddressbookToolbar" action="Addressbook"/> + </toolbar> + +</ui> diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c index 70267888b9d7ccb3f8244fbe3fb8c7b4b1e18a37..255e340d933f082ebf76c9396eb5014b6aee3be4 100644 --- a/sflphone-client-gnome/src/uimanager.c +++ b/sflphone-client-gnome/src/uimanager.c @@ -17,7 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <menus.h> #include <config.h> #include <preferencesdialog.h> #include <dbus/dbus.h> @@ -26,42 +25,1376 @@ #include <gtk/gtk.h> #include <glib/gprintf.h> #include <libgnome/gnome-help.h> +#include <uimanager.h> -static void help_contents_cb (GtkAction *action, GSRWindow *window) -{ - GError *error = NULL; - - gnome_help_display ("sflphone.xml", NULL, &error); - if (error != NULL) { - g_warning ("%s", error->message); - g_error_free (error); - } -} - -static const GtkActionEntry menu_entries[] = -{ - /* Call Menu */ - { "Call", NULL, _("_Call") }, - { "NewCall", GTK_STOCK_NEW, _("_New call"), "<control>N", _("Place a new call"), G_CALLBACK (call_new_call) }, - { "PickUp", GTK_STOCK_NEW, _("_Pick up"), NULL, _("Answer the call"), G_CALLBACK (call_pick_up) }, - { "HangUp", GTK_STOCK_NEW, _("_Hang up"), GDK_Escape, _("Finish the call"), G_CALLBACK (call_hang_up) }, - { "OnHold", GTK_STOCK_NEW, _("O_n hold"), NULL, _("Place the call on hold"), G_CALLBACK (call_hold) }, - { "Record", GTK_STOCK_MEDIA_RECORD, _("_Record"), "<control>R", _("Record the current conversation"), G_CALLBACK (call_record) }, - { "OnHold", NULL, _("Configuration _Assistant"), NULL, _("Run the configuration assistant"), G_CALLBACK (call_wizard) }, - { "Close", GTK_STOCK_CLOSE, _("_Close"), "<control>W", _("Minimize to system tray"), G_CALLBACK (call_minimize) }, - { "Quit", GTK_STOCK_CLOSE, _("_Quit"), "<control>Q", _("Quit the program"), G_CALLBACK (call_quit) }, - - /* Edit Menu */ - { "Edit", NULL, _("_Edit") }, - { "Copy", GTK_STOCK_COPY, _("_Copy"), "<control>C", _("Copy the selection"), G_CALLBACK (edit_copy) }, - { "Paste", GTK_STOCK_PASTE, _("_Paste"), "<control>V", _("Paste the clipboard"), G_CALLBACK (edit_paste) }, - { "ClearHistory", GTK_STOCK_CLEAR, _("Clear _history"), NULL, _("Clear the call history"), G_CALLBACK (clear_history) }, - { "Accounts", NULL, _("_Accounts"), NULL, _("Edit your accounts"), G_CALLBACK (edit_accounts) }, - { "Preferences", GTK_STOCK_PREFERENCES, _("_Preferences"), NULL, _("Change your preferences"), G_CALLBACK (edit_preferences) }, - - /* Help menu */ - { "Help", NULL, N_("_Help") }, - {"HelpContents", GTK_STOCK_HELP, N_("Contents"), "F1", N_("Open the manual"), G_CALLBACK (help_contents_cb) }, - { "About", GTK_STOCK_ABOUT, NULL, NULL, N_("About this application"), G_CALLBACK (help_about) } - +static GtkWidget *toolbar; + +guint transfertButtonConnId; //The button toggled signal connection ID + +GtkAction * pickUpAction; +GtkWidget * pickUpWidget; +GtkWidget * newCallAction; +GtkWidget * newCallWidget; +GtkAction * hangUpAction; +GtkWidget * holdMenu; +GtkWidget * holdToolbar; +GtkWidget * offHoldToolbar; +GtkWidget * transferToolbar; +GtkAction * copyAction; +GtkAction * pasteAction; +GtkAction * recordAction; +GtkAction * voicemailAction; + +GtkWidget * editable_num; +GtkDialog * edit_dialog; + + +enum { + CALLTREE_CALLS, + CALLTREE_HISTORY, + CALLTREE_CONTACTS +}; + + +static gboolean is_inserted (GtkWidget* button) +{ + return (GTK_WIDGET (button)->parent == GTK_WIDGET (toolbar)); +} + + +void toolbar_update_buttons () +{ + + /* + gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); + gtk_action_set_sensitive( GTK_ACTION(hangUpAction), FALSE); + gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE); + gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), FALSE); + gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , FALSE); + gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE); + gtk_action_set_sensitive( GTK_ACTION(recordButton), FALSE); + gtk_widget_set_sensitive( GTK_WIDGET(contactButton), FALSE); + g_object_ref (contactButton); + if( is_inserted( GTK_WIDGET(contactButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET (contactButton)); + g_object_ref(holdButton); + g_object_ref(unholdButton); + if( is_inserted( GTK_WIDGET(holdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); + if( is_inserted( GTK_WIDGET(unholdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(unholdButton)); + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), holdButton, 3); + g_object_ref(callButton); + g_object_ref(pickupButton); + if( is_inserted( GTK_WIDGET(callButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); + if( is_inserted( GTK_WIDGET(pickupButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton)); + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), callButton, 0); + + // If addressbook support has been enabled and all addressbooks are loaded, display the icon + if (addressbook_is_enabled () && addressbook_is_ready()) { + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), contactButton, 5); + // Make the icon clickable only if at least one address book is active + if (addressbook_is_active ()) gtk_widget_set_sensitive( GTK_WIDGET(contactButton), TRUE); + } + + gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transfertButton), FALSE); + gtk_signal_handler_unblock(transfertButton, transfertButtonConnId); + + callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); + conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree); + if (selectedCall) + { + switch(selectedCall->_state) + { + case CALL_STATE_INCOMING: + gtk_widget_set_sensitive( GTK_WIDGET(pickUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + g_object_ref(callButton); + gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), pickupButton, 0); + break; + case CALL_STATE_HOLD: + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + g_object_ref(holdButton); + gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), unholdButton, 3); + break; + case CALL_STATE_RINGING: + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + break; + case CALL_STATE_DIALING: + if( active_calltree == current_calls ) gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); + g_object_ref(callButton); + gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); + gtk_toolbar_insert(GTK_TOOLBAR(toolbar), pickupButton, 0); + break; + case CALL_STATE_CURRENT: + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE); + break; + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + break; + case CALL_STATE_TRANSFERT: + gtk_signal_handler_block(GTK_OBJECT(transfertButton),transfertButtonConnId); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transfertButton), TRUE); + gtk_signal_handler_unblock(transfertButton, transfertButtonConnId); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); + break; + case CALL_STATE_RECORD: + gtk_widget_set_sensitive( GTK_WIDGET(hangUpAction), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(holdButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE); + break; + default: + // Fix bug #1145 + // Actually it could happen when sflphone_fill_account_list() + // call this function and no "call" is selected + // WARN("Toolbar update - Should not happen!"); + break; +} +} +else if(selectedConf) +{ + switch(selectedConf->_state) + { + case CONFERENCE_STATE_ACTIVE_ATACHED: + gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); + break; + case CONFERENCE_STATE_ACTIVE_DETACHED: + gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); + break; + case CONFERENCE_STATE_RECORD: + gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); + break; + case CONFERENCE_STATE_HOLD: + gtk_widget_set_sensitive( GTK_WIDGET(recButton), FALSE); + break; + default: + break; + } +} +else +{ + if( account_list_get_size() > 0 ) + { + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE ); + if (account_list_current_account_has_mailbox ()) + gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), TRUE ); + } + else + { + gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); + } +} +*/ + +} + + + +void update_actions() +{ + // Block signals for holdMenu + // gtk_signal_handler_block (GTK_OBJECT(holdToolbar), holdConnId); + + gtk_action_set_sensitive( GTK_ACTION (newCallAction), TRUE); + gtk_action_set_sensitive (GTK_ACTION (pickUpAction), FALSE); + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), FALSE); + gtk_action_set_sensitive (GTK_ACTION (recordAction), FALSE); + gtk_action_set_sensitive (GTK_ACTION (copyAction), FALSE); + gtk_action_set_sensitive (GTK_ACTION (voicemailAction), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET (transferToolbar), FALSE); + + //g_object_ref (holdToolbar); + //g_object_ref (unholdButton); + if (is_inserted (GTK_WIDGET (holdToolbar))) + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (holdToolbar)); + if (is_inserted (GTK_WIDGET (offHoldToolbar))) + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (offHoldToolbar)); + gtk_toolbar_insert (GTK_TOOLBAR (toolbar), holdToolbar, 3); + + if (is_inserted (GTK_WIDGET (newCallWidget))) + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget)); + if (is_inserted (GTK_WIDGET (pickUpWidget))) + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (pickUpWidget)); + gtk_toolbar_insert (GTK_TOOLBAR (toolbar), newCallWidget, 0); + + g_signal_handler_block ( (gpointer)transferToolbar, transfertButtonConnId); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (transferToolbar), FALSE); + g_signal_handler_unblock ( (gpointer)transferToolbar, transfertButtonConnId); + + callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); + conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree); + + if (selectedCall) + { + gtk_action_set_sensitive (GTK_ACTION (copyAction), TRUE); + + switch(selectedCall->_state) + { + case CALL_STATE_INCOMING: + // Make the button toolbar clickable + gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE); + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + // Replace the dial button with the hangup button + g_object_ref (newCallWidget); + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET(newCallWidget)); + gtk_toolbar_insert (GTK_TOOLBAR (toolbar), pickUpWidget, 0); + break; + case CALL_STATE_HOLD: + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (newCallWidget), TRUE); + // Replace the hold button with the off-hold button + g_object_ref (holdToolbar); + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET(holdToolbar)); + gtk_toolbar_insert (GTK_TOOLBAR(toolbar), offHoldToolbar, 3); + break; + case CALL_STATE_RINGING: + gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE); + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + break; + case CALL_STATE_DIALING: + gtk_action_set_sensitive (GTK_ACTION(pickUpAction), TRUE); + if (active_calltree == current_calls) gtk_action_set_sensitive( GTK_ACTION(hangUpAction), TRUE); + //gtk_action_set_sensitive( GTK_ACTION(newCallMenu),TRUE); + g_object_ref (newCallWidget); + gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget)); + gtk_toolbar_insert (GTK_TOOLBAR (toolbar), pickUpWidget, 0); + break; + case CALL_STATE_CURRENT: + case CALL_STATE_RECORD: + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE); + //gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (holdMenu), gtk_image_new_from_stock (GTK_STOCK_ONHOLD, GTK_ICON_SIZE_MENU)); + gtk_widget_set_sensitive (GTK_WIDGET (transferToolbar), TRUE); + //gtk_action_set_sensitive( GTK_ACTION(newCallMenu),TRUE); + gtk_action_set_sensitive( GTK_ACTION (recordAction), TRUE); + break; + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + gtk_action_set_sensitive( GTK_ACTION(hangUpAction), TRUE); + break; + case CALL_STATE_TRANSFERT: + gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON(transferToolbar), TRUE); + gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId); + gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (transferToolbar), TRUE); + break; + default: + WARN("Should not happen in update_actions()!"); + break; + } + } + + else if(selectedConf) + { + switch(selectedConf->_state) + { + case CONFERENCE_STATE_ACTIVE_ATACHED: + gtk_action_set_sensitive( GTK_ACTION(recordAction), FALSE); + break; + case CONFERENCE_STATE_ACTIVE_DETACHED: + gtk_action_set_sensitive( GTK_ACTION(recordAction), FALSE); + break; + case CONFERENCE_STATE_RECORD: + gtk_action_set_sensitive( GTK_ACTION(recordAction), FALSE); + break; + case CONFERENCE_STATE_HOLD: + gtk_action_set_sensitive( GTK_ACTION(recordAction), FALSE); + break; + default: + break; + } + } + + else + { + if( account_list_get_size() > 0 ) + { + //gtk_widget_set_sensitive (GTK_WIDGET(callButton), TRUE); + if (account_list_current_account_has_mailbox ()) + gtk_action_set_sensitive (GTK_ACTION (voicemailAction), TRUE); + } + else + { + // gtk_widget_set_sensitive (GTK_WIDGET(callButton), FALSE); + } + + // gtk_action_set_sensitive( GTK_ACTION(newCallMenu), TRUE); + } + //gtk_signal_handler_unblock (holdToolbar, holdConnId); + +} + +static void volume_bar_cb (GtkToggleAction *togglemenuitem, gpointer user_data) +{ + gboolean toggled = gtk_toggle_action_get_active (togglemenuitem); + main_window_volume_controls(toggled); + dbus_set_volume_controls(toggled); +} + +static void dialpad_bar_cb (GtkToggleAction *togglemenuitem, gpointer user_data) +{ + gboolean toggled = gtk_toggle_action_get_active (togglemenuitem); + main_window_dialpad(toggled); + dbus_set_dialpad(toggled); +} + +static void help_contents_cb (GtkAction *action) +{ + GError *error = NULL; + + gnome_help_display ("sflphone.xml", NULL, &error); + if (error != NULL) { + g_warning ("%s", error->message); + g_error_free (error); + } +} + +static void help_about ( void * foo UNUSED) +{ + gchar *authors[] = { + "Yan Morin <yan.morin@savoirfairelinux.com>", + "Jérôme Oufella <jerome.oufella@savoirfairelinux.com>", + "Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>", + "Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>", + "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", + "Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>", + "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", + "Yun Liu <yun.liu@savoirfairelinux.com>", + "Alexandre Savard <alexandre.savard@savoirfairelinux.com>", + "Jean-Philippe Barrette-LaPierre", + "Laurielle Lea", + "Pierre-Luc Bacon <pierre-luc.bacon@savoifairelinux.com>", + NULL}; + gchar *artists[] = { + "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", + "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", + NULL}; + + gtk_show_about_dialog( GTK_WINDOW(get_main_window()), + "artists", artists, + "authors", authors, + "comments", _("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."), + "copyright", "Copyright © 2004-2009 Savoir-faire Linux Inc.", + "name", PACKAGE, + "title", _("About SFLphone"), + "version", VERSION, + "website", "http://www.sflphone.org", + NULL); + +} + +/* ----------------------------------------------------------------- */ + + static void +call_new_call ( void * foo UNUSED) +{ + sflphone_new_call(); +} + + static void +call_quit ( void * foo UNUSED) +{ + sflphone_quit(); +} + + static void +call_minimize ( void * foo UNUSED) +{ +#if GTK_CHECK_VERSION(2,10,0) + gtk_widget_hide(GTK_WIDGET( get_main_window() )); + set_minimized( TRUE ); +#endif +} + + static void +switch_account( GtkWidget* item , gpointer data UNUSED) +{ + account_t* acc = g_object_get_data( G_OBJECT(item) , "account" ); + DEBUG("%s" , acc->accountID); + account_list_set_current (acc); + status_bar_display_account (); +} + + static void +call_hold (void* foo UNUSED) +{ + callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); + + if(selectedCall) + { + if(selectedCall->_state == CALL_STATE_HOLD) + { + sflphone_off_hold(); + } + else + { + sflphone_on_hold(); + } + } +} + + static void +conference_hold (void* foo UNUSED) +{ + conference_obj_t * selectedConf = calltab_get_selected_conf(); + + switch(selectedConf->_state) + { + case CONFERENCE_STATE_HOLD: + { + selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED; + sflphone_conference_off_hold(selectedConf); + } + break; + + case CONFERENCE_STATE_ACTIVE_ATACHED: + case CONFERENCE_STATE_ACTIVE_DETACHED: + { + selectedConf->_state = CONFERENCE_STATE_HOLD; + sflphone_conference_on_hold(selectedConf); + } + break; + default: + break; + } +} + + static void +call_pick_up ( void * foo UNUSED) +{ + DEBUG("------ call_button -----"); + callable_obj_t * selectedCall; + callable_obj_t* new_call; + + selectedCall = calltab_get_selected_call(active_calltree); + + if(calllist_get_size(current_calls)>0) + sflphone_pick_up(); + + else if(calllist_get_size(active_calltree) > 0){ + if( selectedCall) + { + create_new_call (CALL, CALL_STATE_DIALING, "", "", "", selectedCall->_peer_number, &new_call); + + calllist_add(current_calls, new_call); + calltree_add_call(current_calls, new_call, NULL); + sflphone_place_call(new_call); + calltree_display (current_calls); + } + else + { + sflphone_new_call(); + calltree_display(current_calls); + } + } + else + { + sflphone_new_call(); + calltree_display(current_calls); + } +} + +static void call_hang_up (void) +{ + sflphone_hang_up(); +} + +static void conference_hang_up (void) +{ + sflphone_conference_hang_up(); +} + +static void call_record (void) +{ + sflphone_rec_call(); +} + + static void +call_configuration_assistant ( void * foo UNUSED) +{ +#if GTK_CHECK_VERSION(2,10,0) + build_wizard(); +#endif +} + + static void +remove_from_history( void * foo UNUSED) +{ + callable_obj_t* c = calltab_get_selected_call( history ); + if(c){ + DEBUG("Remove the call from the history"); + calllist_remove_from_history( c ); + } +} + + static void +call_back( void * foo UNUSED) +{ + callable_obj_t *selected_call, *new_call; + + selected_call = calltab_get_selected_call( active_calltree ); + + if( selected_call ) + { + create_new_call (CALL, CALL_STATE_DIALING, "", "", selected_call->_peer_name, selected_call->_peer_number, &new_call); + + calllist_add(current_calls, new_call); + calltree_add_call(current_calls, new_call, NULL); + sflphone_place_call(new_call); + calltree_display (current_calls); + } +} + + static void +edit_preferences ( void * foo UNUSED) +{ + show_preferences_dialog(); +} + + static void +edit_accounts ( void * foo UNUSED) +{ + show_account_list_config_dialog(); +} + +// The menu Edit/Copy should copy the current selected call's number + static void +edit_copy ( void * foo UNUSED) +{ + GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); + gchar * no = NULL; + + if(selectedCall) + { + switch(selectedCall->_state) + { + case CALL_STATE_TRANSFERT: + case CALL_STATE_DIALING: + case CALL_STATE_RINGING: + no = selectedCall->_peer_number; + break; + case CALL_STATE_CURRENT: + case CALL_STATE_HOLD: + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + case CALL_STATE_INCOMING: + default: + no = selectedCall->_peer_number; + break; + } + DEBUG("Clipboard number: %s\n", no); + gtk_clipboard_set_text (clip, no, strlen(no) ); + } + +} + +// The menu Edit/Paste should paste the clipboard into the current selected call + static void +edit_paste ( void * foo UNUSED) +{ + GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); + gchar * no = gtk_clipboard_wait_for_text (clip); + + if(no && selectedCall) + { + switch(selectedCall->_state) + { + case CALL_STATE_TRANSFERT: + case CALL_STATE_DIALING: + // Add the text to the number + { + gchar * before; + before = selectedCall->_peer_number; + DEBUG("TO: %s\n", before); + selectedCall->_peer_number = g_strconcat(before, no, NULL); + + if(selectedCall->_state == CALL_STATE_DIALING) + { + selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); + } + calltree_update_call(current_calls, selectedCall, NULL); + } + break; + case CALL_STATE_RINGING: + case CALL_STATE_INCOMING: + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + case CALL_STATE_HOLD: + { // Create a new call to hold the new text + selectedCall = sflphone_new_call(); + + gchar * before = selectedCall->_peer_number; + selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number, no, NULL); + DEBUG("TO: %s", selectedCall->_peer_number); + + selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); + + calltree_update_call(current_calls, selectedCall, NULL); + } + break; + case CALL_STATE_CURRENT: + default: + { + unsigned int i; + for(i = 0; i < strlen(no); i++) + { + gchar * oneNo = g_strndup(&no[i], 1); + DEBUG("<%s>", oneNo); + dbus_play_dtmf(oneNo); + + gchar * temp = g_strconcat(selectedCall->_peer_number, oneNo, NULL); + selectedCall->_peer_info = get_peer_info (temp, selectedCall->_peer_name); + // g_free(temp); + calltree_update_call(current_calls, selectedCall, NULL); + + } + } + break; + } + + } + else // There is no current call, create one + { + selectedCall = sflphone_new_call(); + + gchar * before = selectedCall->_peer_number; + selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number, no, NULL); + g_free(before); + DEBUG("TO: %s", selectedCall->_peer_number); + + g_free(selectedCall->_peer_info); + selectedCall->_peer_info = g_strconcat("\"\" <", selectedCall->_peer_number, ">", NULL); + calltree_update_call(current_calls, selectedCall, NULL); + } + +} + +static void clear_history (void) +{ + if( calllist_get_size( history ) != 0 ){ + calllist_clean_history(); + } +} + +static void calltree_switch_cb (GtkRadioAction *action, GtkRadioAction *current) +{ + gint value = gtk_radio_action_get_current_value (current); + switch (value) + { + case CALLTREE_CALLS: + calltree_display (current_calls); + break; + case CALLTREE_HISTORY: + calltree_display (history); + break; + case CALLTREE_CONTACTS: + calltree_display (contacts); + break; + default: + calltree_display (current_calls); + break; + } +} + + +/** + * Transfert the line + */ +static void call_transfer_cb () +{ + gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (transferToolbar))? sflphone_set_transfert() : sflphone_unset_transfert() ; +} + +static void call_mailbox_cb (void) +{ + account_t* current; + callable_obj_t *mailbox_call; + gchar *to, *from, *account_id; + + current = account_list_get_current (); + if( current == NULL ) // Should not happens + return; + + to = g_strdup(g_hash_table_lookup(current->properties, ACCOUNT_MAILBOX)); + account_id = g_strdup (current->accountID); + + create_new_call (CALL, CALL_STATE_DIALING, "", account_id, _("Voicemail"), to, &mailbox_call); + DEBUG("TO : %s" , mailbox_call->_peer_number); + calllist_add( current_calls , mailbox_call ); + calltree_add_call( current_calls, mailbox_call, NULL); + update_actions(); + sflphone_place_call( mailbox_call ); + calltree_display(current_calls); +} + +static const GtkActionEntry menu_entries[] = { + + // Call Menu + { "Call", NULL, "Call" }, + { "NewCall", GTK_STOCK_DIAL, "_New call", "<control>N", "Place a new call", G_CALLBACK (call_new_call) }, + { "PickUp", GTK_STOCK_PICKUP, "_Pick up", NULL, "Answer the call", G_CALLBACK (call_pick_up) }, + { "HangUp", GTK_STOCK_HANGUP, "_Hang up", "<control>S", "Finish the call", G_CALLBACK (call_hang_up) }, + { "Record", GTK_STOCK_MEDIA_RECORD, "_Record", "<control>R", "Record the current conversation", G_CALLBACK (call_record) }, + { "AccountAssistant", NULL, "Configuration _Assistant", NULL, "Run the configuration assistant", G_CALLBACK (call_configuration_assistant) }, + { "Voicemail", "mail-message-new", "Voicemail", NULL, "Call your voicemail", G_CALLBACK (call_mailbox_cb) }, + { "Close", GTK_STOCK_CLOSE, "_Close", "<control>W", "Minimize to system tray", G_CALLBACK (call_minimize) }, + { "Quit", GTK_STOCK_CLOSE, "_Quit", "<control>Q", "Quit the program", G_CALLBACK (call_quit) }, + + // Edit Menu + { "Edit", NULL, "_Edit" }, + { "Copy", GTK_STOCK_COPY, "_Copy", "<control>C", "Copy the selection", G_CALLBACK (edit_copy) }, + { "Paste", GTK_STOCK_PASTE, "_Paste", "<control>V", "Paste the clipboard", G_CALLBACK (edit_paste) }, + { "ClearHistory", GTK_STOCK_CLEAR, "Clear _history", NULL, "Clear the call history", G_CALLBACK (clear_history) }, + { "Accounts", NULL, "_Accounts", NULL, "Edit your accounts", G_CALLBACK (edit_accounts) }, + { "Preferences", GTK_STOCK_PREFERENCES, "_Preferences", NULL, "Change your preferences", G_CALLBACK (edit_preferences) }, + + // View Menu + { "View", NULL, "_View" }, + + // Help menu + { "Help", NULL, "_Help" }, + { "HelpContents", GTK_STOCK_HELP, "Contents", "F1", "Open the manual", G_CALLBACK (help_contents_cb) }, + { "About", GTK_STOCK_ABOUT, NULL, NULL, "About this application", G_CALLBACK (help_about) } + +}; + +static const GtkToggleActionEntry toggle_menu_entries[] = { + + { "OnHold", GTK_STOCK_ONHOLD, "O_n hold", "<control>P", "Place the call on hold", G_CALLBACK (call_hold) }, + { "OffHold", GTK_STOCK_OFFHOLD, "O_ff hold", "<control>P", "Place the call off hold", G_CALLBACK (call_hold) }, + { "Transfer", GTK_STOCK_TRANSFER, "_Transfer", "<control>T", "Transfer the call", G_CALLBACK (call_transfer_cb) }, + { "Toolbar", NULL, "_Show toolbar", "<control>T", "Show the toolbar", NULL }, + { "Dialpad", NULL, "_Dialpad", "<control>D", "Show the dialpad", G_CALLBACK (dialpad_bar_cb) }, + { "VolumeControls",NULL, "_Volume controls", "<control>V", "Show the volume controls", G_CALLBACK (volume_bar_cb) } + +}; + +static const GtkRadioActionEntry radio_menu_entries[] = { + + {"CallWindow", GTK_STOCK_CALLS, "_Call window", NULL, "Calls list", CALLTREE_CALLS}, + {"History", "appointment-soon", "_History", NULL, "Calls history", CALLTREE_HISTORY}, + {"Addressbook", GTK_STOCK_ADDRESSBOOK, "_Address book", NULL, "Address book", CALLTREE_CONTACTS} + +}; + +gboolean uimanager_new (GtkUIManager **_ui_manager) { + + GtkUIManager *ui_manager; + GtkActionGroup *action_group; + GtkWidget *window; + gchar *path; + GError *error = NULL; + + window = get_main_window (); + ui_manager = gtk_ui_manager_new (); + + /* Create an accel group for window's shortcuts */ + path = g_build_filename (SFLPHONE_UIDIR_UNINSTALLED, "./ui.xml", NULL); + if (g_file_test (path, G_FILE_TEST_EXISTS)) { + gtk_ui_manager_add_ui_from_file (ui_manager, path, &error); + + if (error != NULL) + { + g_error_free (error); + return FALSE; + } + g_free (path); + } + else { + path = g_build_filename (SFLPHONE_UIDIR, "./ui.xml", NULL); + if (g_file_test (path, G_FILE_TEST_EXISTS)) { + gtk_ui_manager_add_ui_from_file (ui_manager, path, &error); + + if (error != NULL) + { + g_error_free (error); + return FALSE; + } + g_free (path); + } + else + return FALSE; + } + action_group = gtk_action_group_new ("SFLphoneWindowActions"); + // To translate label and tooltip entries + gtk_action_group_set_translation_domain (action_group, "sflphone-client-gnome"); + gtk_action_group_add_actions (action_group, menu_entries, G_N_ELEMENTS (menu_entries), window); + gtk_action_group_add_toggle_actions (action_group, toggle_menu_entries, G_N_ELEMENTS (toggle_menu_entries), window); + gtk_action_group_add_radio_actions (action_group, radio_menu_entries, G_N_ELEMENTS (radio_menu_entries), CALLTREE_CALLS, G_CALLBACK (calltree_switch_cb), window); + gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); + + *_ui_manager = ui_manager; + + return TRUE; +} + +static void edit_number_cb (GtkWidget *widget UNUSED, gpointer user_data) { + + + show_edit_number ((callable_obj_t*)user_data); +} + + + void +show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) +{ + // TODO update the selection to make sure the call under the mouse is the call selected + + // call type boolean + gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, record = FALSE, detach = FALSE; + gboolean accounts = FALSE; + + // conference type boolean + gboolean hangup_conf = FALSE, hold_conf = FALSE; + + callable_obj_t * selectedCall; + conference_obj_t * selectedConf; + + if (calltab_get_selected_type(current_calls) == A_CALL) + { + DEBUG("MENUS: SELECTED A CALL"); + selectedCall = calltab_get_selected_call(current_calls); + + if (selectedCall) + { + copy = TRUE; + switch(selectedCall->_state) + { + case CALL_STATE_INCOMING: + pickup = TRUE; + hangup = TRUE; + detach = TRUE; + break; + case CALL_STATE_HOLD: + hangup = TRUE; + hold = TRUE; + detach = TRUE; + break; + case CALL_STATE_RINGING: + hangup = TRUE; + detach = TRUE; + break; + case CALL_STATE_DIALING: + pickup = TRUE; + hangup = TRUE; + accounts = TRUE; + break; + case CALL_STATE_RECORD: + case CALL_STATE_CURRENT: + hangup = TRUE; + hold = TRUE; + record = TRUE; + detach = TRUE; + break; + case CALL_STATE_BUSY: + case CALL_STATE_FAILURE: + hangup = TRUE; + break; + default: + WARN("Should not happen in show_popup_menu for calls!"); + break; + } + } + } + else + { + DEBUG("MENUS: SELECTED A CONF"); + selectedConf = calltab_get_selected_conf(); + + if (selectedConf) + { + switch(selectedConf->_state) + { + case CONFERENCE_STATE_ACTIVE_ATACHED: + hangup_conf = TRUE; + hold_conf = TRUE; + break; + case CONFERENCE_STATE_ACTIVE_DETACHED: + break; + case CONFERENCE_STATE_HOLD: + hangup_conf = TRUE; + hold_conf = TRUE; + break; + default: + WARN("Should not happen in show_popup_menu for conferences!"); + break; + } + } + + } + + GtkWidget *menu; + GtkWidget *image; + int button, event_time; + GtkWidget * menu_items; + + menu = gtk_menu_new (); + //g_signal_connect (menu, "deactivate", + // G_CALLBACK (gtk_widget_destroy), NULL); + if (calltab_get_selected_type(current_calls) == A_CALL) + { + DEBUG("BUILD CALL MENU"); + + if(copy) + { + menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_COPY, get_accel_group()); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (edit_copy), + NULL); + gtk_widget_show (menu_items); + } + + menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_PASTE, get_accel_group()); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (edit_paste), + NULL); + gtk_widget_show (menu_items); + + if(pickup || hangup || hold) + { + menu_items = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + gtk_widget_show (menu_items); + } + + if(pickup) + { + + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Pick up")); + image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (call_pick_up), + NULL); + gtk_widget_show (menu_items); + } + + if(hangup) + { + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up")); + image = gtk_image_new_from_file( ICONS_DIR "/icon_hangup.svg"); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (call_hang_up), + NULL); + gtk_widget_show (menu_items); + } + + if(hold) + { + menu_items = gtk_check_menu_item_new_with_mnemonic (_("On _Hold")); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), + (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE)); + g_signal_connect(G_OBJECT (menu_items), "activate", + G_CALLBACK (call_hold), + NULL); + gtk_widget_show (menu_items); + } + + if(record) + { + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Record")); + image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (call_record), + NULL); + gtk_widget_show (menu_items); + } + + } + else + { + DEBUG("BUILD CONFERENCE MENU"); + + if(hangup_conf) + { + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up")); + image = gtk_image_new_from_file( ICONS_DIR "/icon_hangup.svg"); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (conference_hang_up), + NULL); + gtk_widget_show (menu_items); + } + + if(hold_conf) + { + menu_items = gtk_check_menu_item_new_with_mnemonic (_("On _Hold")); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), + (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE)); + g_signal_connect(G_OBJECT (menu_items), "activate", + G_CALLBACK (conference_hold), + NULL); + gtk_widget_show (menu_items); + } + } + + if(accounts) + { + add_registered_accounts_to_menu (menu); + } + + if (event) + { + button = event->button; + event_time = event->time; + } + else + { + button = 0; + event_time = gtk_get_current_event_time (); + } + + gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + button, event_time); +} + + + void +show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event) +{ + + gboolean pickup = FALSE; + gboolean remove = FALSE; + gboolean edit = FALSE; + + callable_obj_t * selectedCall = calltab_get_selected_call( history ); + if (selectedCall) + { + remove = TRUE; + pickup = TRUE; + edit = TRUE; + } + + GtkWidget *menu; + GtkWidget *image; + int button, event_time; + GtkWidget * menu_items; + + menu = gtk_menu_new (); + //g_signal_connect (menu, "deactivate", + // G_CALLBACK (gtk_widget_destroy), NULL); + + if(pickup) + { + + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Call back")); + image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( menu_items ), image ); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL); + gtk_widget_show (menu_items); + } + + menu_items = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + gtk_widget_show (menu_items); + + if (edit) + { + menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_EDIT, get_accel_group()); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall); + gtk_widget_show (menu_items); + } + + + if(remove) + { + menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_DELETE, get_accel_group()); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate", G_CALLBACK (remove_from_history), NULL); + gtk_widget_show (menu_items); + } + + if (event) + { + button = event->button; + event_time = event->time; + } + else + { + button = 0; + event_time = gtk_get_current_event_time (); + } + + gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + button, event_time); +} + void +show_popup_menu_contacts(GtkWidget *my_widget, GdkEventButton *event) +{ + + gboolean pickup = FALSE; + gboolean accounts = FALSE; + gboolean edit = FALSE; + + callable_obj_t * selectedCall = calltab_get_selected_call( contacts ); + if (selectedCall) + { + pickup = TRUE; + accounts = TRUE; + edit = TRUE; + } + + GtkWidget *menu; + GtkWidget *image; + int button, event_time; + GtkWidget * menu_items; + + menu = gtk_menu_new (); + //g_signal_connect (menu, "deactivate", + // G_CALLBACK (gtk_widget_destroy), NULL); + + if(pickup) + { + + menu_items = gtk_image_menu_item_new_with_mnemonic(_("_New call")); + image = gtk_image_new_from_file( ICONS_DIR "/icon_accept.svg"); + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( menu_items ), image ); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL); + gtk_widget_show (menu_items); + } + + if (edit) + { + menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_EDIT, get_accel_group()); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall); + gtk_widget_show (menu_items); + } + + if(accounts) + { + add_registered_accounts_to_menu (menu); + } + + if (event) + { + button = event->button; + event_time = event->time; + } + else + { + button = 0; + event_time = gtk_get_current_event_time (); + } + + gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + button, event_time); +} + + +void add_registered_accounts_to_menu (GtkWidget *menu) { + + GtkWidget *menu_items; + unsigned int i; + account_t* acc, *current; + gchar* alias; + + menu_items = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + gtk_widget_show (menu_items); + + for( i = 0 ; i < account_list_get_size() ; i++ ){ + acc = account_list_get_nth(i); + // Display only the registered accounts + if( g_strcasecmp( account_state_name(acc->state) , account_state_name(ACCOUNT_STATE_REGISTERED) ) == 0 ){ + alias = g_strconcat( g_hash_table_lookup(acc->properties , ACCOUNT_ALIAS) , " - ",g_hash_table_lookup(acc->properties , ACCOUNT_TYPE), NULL); + menu_items = gtk_check_menu_item_new_with_mnemonic(alias); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); + g_object_set_data( G_OBJECT( menu_items ) , "account" , acc ); + g_free( alias ); + current = account_list_get_current(); + if(current){ + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items), + (g_strcasecmp( acc->accountID , current->accountID) == 0)? TRUE : FALSE); + } + g_signal_connect (G_OBJECT (menu_items), "activate", + G_CALLBACK (switch_account), + NULL); + gtk_widget_show (menu_items); + } // fi + } + +} + +static void ok_cb (GtkWidget *widget UNUSED, gpointer userdata) { + + gchar *new_number; + callable_obj_t *modified_call, *original; + + // Change the number of the selected call before calling + new_number = (gchar*) gtk_entry_get_text (GTK_ENTRY (editable_num)); + original = (callable_obj_t*)userdata; + + // Create the new call + create_new_call (CALL, CALL_STATE_DIALING, "", g_strdup (original->_accountID), original->_peer_name, g_strdup (new_number), &modified_call); + + // Update the internal data structure and the GUI + calllist_add(current_calls, modified_call); + calltree_add_call(current_calls, modified_call, NULL); + sflphone_place_call(modified_call); + calltree_display (current_calls); + + // Close the contextual menu + gtk_widget_destroy (GTK_WIDGET (edit_dialog)); +} + +static void on_delete (GtkWidget * widget) +{ + gtk_widget_destroy (widget); +} + +void show_edit_number (callable_obj_t *call) { + + GtkWidget *ok, *hbox, *image; + GdkPixbuf *pixbuf; + + edit_dialog = GTK_DIALOG (gtk_dialog_new()); + + // Set window properties + gtk_window_set_default_size(GTK_WINDOW(edit_dialog), 300, 20); + gtk_window_set_title(GTK_WINDOW(edit_dialog), _("Edit phone number")); + gtk_window_set_resizable (GTK_WINDOW (edit_dialog), FALSE); + + g_signal_connect (G_OBJECT (edit_dialog), "delete-event", G_CALLBACK (on_delete), NULL); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start(GTK_BOX (edit_dialog->vbox), hbox, TRUE, TRUE, 0); + + // Set the number to be edited + editable_num = gtk_entry_new (); +#if GTK_CHECK_VERSION(2,12,0) + gtk_widget_set_tooltip_text(GTK_WIDGET(editable_num), _("Edit the phone number before making a call")); +#endif + if (call) + gtk_entry_set_text(GTK_ENTRY(editable_num), g_strdup (call->_peer_number)); + else + ERROR ("This a bug, the call should be defined. menus.c line 1051"); + + gtk_box_pack_start(GTK_BOX (hbox), editable_num, TRUE, TRUE, 0); + + // Set a custom image for the button + pixbuf = gdk_pixbuf_new_from_file_at_scale (ICONS_DIR "/outgoing.svg", 32, 32, TRUE, NULL); + image = gtk_image_new_from_pixbuf (pixbuf); + ok = gtk_button_new (); + gtk_button_set_image (GTK_BUTTON (ok), image); + gtk_box_pack_start(GTK_BOX (hbox), ok, TRUE, TRUE, 0); + g_signal_connect(G_OBJECT (ok), "clicked", G_CALLBACK (ok_cb), call); + + gtk_widget_show_all (edit_dialog->vbox); + + gtk_dialog_run(edit_dialog); + +} + +GtkWidget* create_waiting_icon() +{ + GtkWidget * waiting_icon; + waiting_icon = gtk_image_menu_item_new_with_label(""); + gtk_image_menu_item_set_image ( + GTK_IMAGE_MENU_ITEM(waiting_icon), + gtk_image_new_from_animation( + gdk_pixbuf_animation_new_from_file(ICONS_DIR "/wait-on.gif", NULL))); + gtk_menu_item_set_right_justified(GTK_MENU_ITEM(waiting_icon),TRUE); + + return waiting_icon; +} + +GtkWidget* create_menus (GtkUIManager *ui_manager) +{ + + GtkWidget * menu_bar; + + menu_bar = gtk_ui_manager_get_widget (ui_manager, "/MenuBar"); + pickUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/PickUp"); + newCallAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/NewCall"); + hangUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/HangUp"); + holdMenu = gtk_ui_manager_get_widget (ui_manager, "/MenuBar/CallMenu/OnHoldMenu"); + recordAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/Record"); + copyAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Copy"); + pasteAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Paste"); + + // Set the toggle buttons + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Dialpad")), (gboolean)SHOW_DIALPAD); + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/VolumeControls")), (gboolean) SHOW_VOLUME); + + + // GtkWidget * newCallMenu; + + waitingLayer = create_waiting_icon (); + gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), waitingLayer); + + return menu_bar; +} + +GtkWidget* create_toolbar_actions (GtkUIManager *ui_manager) +{ + toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions"); + + holdToolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/OnHoldToolbar"); + offHoldToolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/OffHoldToolbar"); + transferToolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/TransferToolbar"); + voicemailAction = gtk_ui_manager_get_action (ui_manager, "/ToolbarActions/Voicemail"); + newCallWidget = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/NewCallToolbar"); + pickUpWidget = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions/PickUpToolbar"); + + // Set the handler ID for the transfer + transfertButtonConnId = g_signal_connect (G_OBJECT (transferToolbar), "toggled", G_CALLBACK (call_transfer_cb), NULL); + holdConnId = g_signal_connect (G_OBJECT (holdToolbar), "toggled", G_CALLBACK (call_hold), NULL); + + return toolbar; +} + +GtkWidget* create_toolbar_windows (GtkUIManager *ui_manager) +{ + GtkWidget *toolbar; + + toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows"); + active_calltree = current_calls; + + historyButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/HistoryToolbar"); + contactButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/AddressbookToolbar"); + currentCallsButton = gtk_ui_manager_get_widget (ui_manager, "/ToolbarWindows/CallWindowToolbar"); + + return toolbar; } diff --git a/sflphone-client-gnome/src/uimanager.h b/sflphone-client-gnome/src/uimanager.h new file mode 100644 index 0000000000000000000000000000000000000000..3eeb42820a88ef2887c39e31307dd84a89471920 --- /dev/null +++ b/sflphone-client-gnome/src/uimanager.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef UI_MANAGER_H +#define UI_MANAGER_H + +#include "icons/icon_factory.h" + +G_BEGIN_DECLS + +guint holdConnId; //The hold_menu signal connection ID + +GtkWidget *historyButton; +GtkWidget *contactButton; +GtkWidget *currentCallsButton; + +gboolean uimanager_new (GtkUIManager**); + +G_END_DECLS + +#endif diff --git a/sflphone-common/libs/dbus-c++/src/Makefile.am b/sflphone-common/libs/dbus-c++/src/Makefile.am index 064d3fc059a14473ec69ddcd03be112d9a82722b..09d7bd659f7c9f460d95dcc9847272f0061008fb 100644 --- a/sflphone-common/libs/dbus-c++/src/Makefile.am +++ b/sflphone-common/libs/dbus-c++/src/Makefile.am @@ -34,8 +34,8 @@ HEADER_FILES = \ $(HEADER_DIR)/eventloop-integration.h \ $(GLIB_H) -lib_includedir=$(includedir)/dbus-c++-1/dbus-c++/ -lib_include_HEADERS = $(HEADER_FILES) +# noinst_lib_includedir=$(includedir)/dbus-c++-1/dbus-c++/ +noinst_HEADERS = $(HEADER_FILES) lib_LTLIBRARIES = libdbus-c++-1.la libdbus_c___1_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp types.cpp connection.cpp connection_p.h property.cpp dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h eventloop.cpp eventloop-integration.cpp $(GLIB_CPP) $(ECORE_CPP) diff --git a/sflphone-common/libs/pjproject/build.mak b/sflphone-common/libs/pjproject/build.mak deleted file mode 100644 index 80ff11095e0fa962c6089f73eb1e8031f2fd8214..0000000000000000000000000000000000000000 --- a/sflphone-common/libs/pjproject/build.mak +++ /dev/null @@ -1,93 +0,0 @@ -# build.mak. Generated from build.mak.in by configure. -export MACHINE_NAME := auto -export OS_NAME := auto -export HOST_NAME := unix -export CC_NAME := gcc -export TARGET_NAME := i686-pc-linux-gnu -export CROSS_COMPILE := -export LINUX_POLL := select - -LIB_SUFFIX = $(TARGET_NAME).a - -# Determine which party libraries to use -export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME) -lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME) -export APP_THIRD_PARTY_LIB_FILES = $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX) - -ifneq (,1) -APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME) -APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libgsmcodec-$(LIB_SUFFIX) -endif - -ifneq (,1) -APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME) -APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libspeex-$(LIB_SUFFIX) -endif - -ifneq (,1) -APP_THIRD_PARTY_LIBS += -lilbccodec-$(TARGET_NAME) -APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libilbccodec-$(LIB_SUFFIX) -endif - -ifneq (,1) -APP_THIRD_PARTY_LIBS += -lg7221codec-$(TARGET_NAME) -APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libg7221codec-$(LIB_SUFFIX) -endif - -ifneq ($(findstring pa,pa_unix),) -APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME) -APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libportaudio-$(LIB_SUFFIX) -endif - -# Additional flags - - -# CFLAGS, LDFLAGS, and LIBS to be used by applications -export PJDIR := /home/alexandresavard/Development/sflphone/sflphone-common/libs/pjproject -export APP_CC := $(CROSS_COMPILE)$(CC_NAME) -export APP_CFLAGS := -DPJ_AUTOCONF=1\ - -O2\ - -I$(PJDIR)/pjlib/include\ - -I$(PJDIR)/pjlib-util/include\ - -I$(PJDIR)/pjnath/include\ - -I$(PJDIR)/pjmedia/include\ - -I$(PJDIR)/pjsip/include -export APP_CXXFLAGS := $(APP_CFLAGS) -export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\ - -L$(PJDIR)/pjlib-util/lib\ - -L$(PJDIR)/pjnath/lib\ - -L$(PJDIR)/pjmedia/lib\ - -L$(PJDIR)/pjsip/lib\ - -L$(PJDIR)/third_party/lib\ - -export APP_LDLIBS := -lpjsua-sfl-$(TARGET_NAME)\ - -lpjsip-ua-sfl-$(TARGET_NAME)\ - -lpjsip-simple-sfl-$(TARGET_NAME)\ - -lpjsip-sfl-$(TARGET_NAME)\ - -lpjmedia-codec-sfl-$(TARGET_NAME)\ - -lpjmedia-sfl-$(TARGET_NAME)\ - -lpjmedia-audiodev-sfl-$(TARGET_NAME)\ - -lpjnath-sfl-$(TARGET_NAME)\ - -lpjlib-util-sfl-$(TARGET_NAME)\ - $(APP_THIRD_PARTY_LIBS)\ - -lpj-sfl-$(TARGET_NAME)\ - -lm -luuid -lnsl -lrt -lpthread -lasound -lssl -lcrypto -export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjsip/lib/libpjsip-ua-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjsip/lib/libpjsip-simple-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjsip/lib/libpjsip-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjmedia/lib/libpjmedia-codec-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjmedia/lib/libpjmedia-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjmedia/lib/libpjmedia-audiodev-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjnath/lib/libpjnath-sfl-$(LIB_SUFFIX) \ - $(PJ_DIR)/pjlib-util/lib/libpjlib-util-sfl-$(LIB_SUFFIX) \ - $(APP_THIRD_PARTY_LIB_FILES) \ - $(PJ_DIR)/pjlib/lib/libpj-sfl-$(LIB_SUFFIX) - -export PJ_DIR := $(PJDIR) -export PJ_CC := $(APP_CC) -export PJ_CFLAGS := $(APP_CFLAGS) -export PJ_CXXFLAGS := $(APP_CXXFLAGS) -export PJ_LDFLAGS := $(APP_LDFLAGS) -export PJ_LDLIBS := $(APP_LDLIBS) -export PJ_LIB_FILES := $(APP_LIB_FILES) - diff --git a/sflphone-common/libs/pjproject/config.log b/sflphone-common/libs/pjproject/config.log deleted file mode 100644 index 656155f0ee52e06effbf9cbb591f01b20230ae85..0000000000000000000000000000000000000000 --- a/sflphone-common/libs/pjproject/config.log +++ /dev/null @@ -1,2098 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by pjproject aconfigure 1.0, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ ./aconfigure - -## --------- ## -## Platform. ## -## --------- ## - -hostname = alexandresavard-desktop -uname -m = i686 -uname -r = 2.6.28-15-generic -uname -s = Linux -uname -v = #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009 - -/usr/bin/uname -p = unknown -/bin/uname -X = unknown - -/bin/arch = unknown -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /usr/local/sbin -PATH: /usr/local/bin -PATH: /usr/sbin -PATH: /usr/bin -PATH: /sbin -PATH: /bin -PATH: /usr/games - - -## ----------- ## -## Core tests. ## -## ----------- ## - -aconfigure:1802: checking build system type -aconfigure:1820: result: i686-pc-linux-gnu -aconfigure:1842: checking host system type -aconfigure:1857: result: i686-pc-linux-gnu -aconfigure:1879: checking target system type -aconfigure:1894: result: i686-pc-linux-gnu -aconfigure:1984: checking for gcc -aconfigure:2000: found /usr/bin/gcc -aconfigure:2011: result: gcc -aconfigure:2249: checking for C compiler version -aconfigure:2256: gcc --version >&5 -gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3 -Copyright (C) 2008 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -aconfigure:2259: $? = 0 -aconfigure:2266: gcc -v >&5 -Using built-in specs. -Target: i486-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu -Thread model: posix -gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) -aconfigure:2269: $? = 0 -aconfigure:2276: gcc -V >&5 -gcc: '-V' option must have argument -aconfigure:2279: $? = 1 -aconfigure:2302: checking for C compiler default output file name -aconfigure:2329: gcc -O2 conftest.c >&5 -aconfigure:2332: $? = 0 -aconfigure:2370: result: a.out -aconfigure:2387: checking whether the C compiler works -aconfigure:2397: ./a.out -aconfigure:2400: $? = 0 -aconfigure:2417: result: yes -aconfigure:2424: checking whether we are cross compiling -aconfigure:2426: result: no -aconfigure:2429: checking for suffix of executables -aconfigure:2436: gcc -o conftest -O2 conftest.c >&5 -aconfigure:2439: $? = 0 -aconfigure:2463: result: -aconfigure:2469: checking for suffix of object files -aconfigure:2495: gcc -c -O2 conftest.c >&5 -aconfigure:2498: $? = 0 -aconfigure:2521: result: o -aconfigure:2525: checking whether we are using the GNU C compiler -aconfigure:2554: gcc -c -O2 conftest.c >&5 -aconfigure:2560: $? = 0 -aconfigure:2577: result: yes -aconfigure:2582: checking whether gcc accepts -g -aconfigure:2612: gcc -c -g conftest.c >&5 -aconfigure:2618: $? = 0 -aconfigure:2717: result: yes -aconfigure:2734: checking for gcc option to accept ISO C89 -aconfigure:2808: gcc -c -O2 conftest.c >&5 -aconfigure:2814: $? = 0 -aconfigure:2837: result: none needed -aconfigure:2913: checking for g++ -aconfigure:2929: found /usr/bin/g++ -aconfigure:2940: result: g++ -aconfigure:2971: checking for C++ compiler version -aconfigure:2978: g++ --version >&5 -g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3 -Copyright (C) 2008 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -aconfigure:2981: $? = 0 -aconfigure:2988: g++ -v >&5 -Using built-in specs. -Target: i486-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu -Thread model: posix -gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) -aconfigure:2991: $? = 0 -aconfigure:2998: g++ -V >&5 -g++: '-V' option must have argument -aconfigure:3001: $? = 1 -aconfigure:3004: checking whether we are using the GNU C++ compiler -aconfigure:3033: g++ -c -O2 conftest.cpp >&5 -aconfigure:3039: $? = 0 -aconfigure:3056: result: yes -aconfigure:3061: checking whether g++ accepts -g -aconfigure:3091: g++ -c -g conftest.cpp >&5 -aconfigure:3097: $? = 0 -aconfigure:3196: result: yes -aconfigure:3239: checking for pthread_create in -lpthread -aconfigure:3274: gcc -o conftest -O2 conftest.c -lpthread >&5 -aconfigure:3280: $? = 0 -aconfigure:3298: result: yes -aconfigure:3310: checking for puts in -lwsock32 -aconfigure:3345: gcc -o conftest -O2 conftest.c -lwsock32 -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -/usr/bin/ld: cannot find -lwsock32 -collect2: ld returned 1 exit status -aconfigure:3351: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char puts (); -| int -| main () -| { -| return puts (); -| ; -| return 0; -| } -aconfigure:3369: result: no -aconfigure:3381: checking for puts in -lws2_32 -aconfigure:3416: gcc -o conftest -O2 conftest.c -lws2_32 -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -/usr/bin/ld: cannot find -lws2_32 -collect2: ld returned 1 exit status -aconfigure:3422: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char puts (); -| int -| main () -| { -| return puts (); -| ; -| return 0; -| } -aconfigure:3440: result: no -aconfigure:3452: checking for puts in -lole32 -aconfigure:3487: gcc -o conftest -O2 conftest.c -lole32 -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -/usr/bin/ld: cannot find -lole32 -collect2: ld returned 1 exit status -aconfigure:3493: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char puts (); -| int -| main () -| { -| return puts (); -| ; -| return 0; -| } -aconfigure:3511: result: no -aconfigure:3523: checking for puts in -lwinmm -aconfigure:3558: gcc -o conftest -O2 conftest.c -lwinmm -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -/usr/bin/ld: cannot find -lwinmm -collect2: ld returned 1 exit status -aconfigure:3564: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char puts (); -| int -| main () -| { -| return puts (); -| ; -| return 0; -| } -aconfigure:3582: result: no -aconfigure:3594: checking for puts in -lsocket -aconfigure:3629: gcc -o conftest -O2 conftest.c -lsocket -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -/usr/bin/ld: cannot find -lsocket -collect2: ld returned 1 exit status -aconfigure:3635: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| /* end confdefs.h. */ -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char puts (); -| int -| main () -| { -| return puts (); -| ; -| return 0; -| } -aconfigure:3653: result: no -aconfigure:3665: checking for puts in -lrt -aconfigure:3700: gcc -o conftest -O2 conftest.c -lrt -lpthread >&5 -conftest.c:16: warning: conflicting types for built-in function 'puts' -aconfigure:3706: $? = 0 -aconfigure:3724: result: yes -aconfigure:3736: checking for puts in -lnsl -aconfigure:3771: gcc -o conftest -O2 conftest.c -lnsl -lrt -lpthread >&5 -conftest.c:17: warning: conflicting types for built-in function 'puts' -aconfigure:3777: $? = 0 -aconfigure:3795: result: yes -aconfigure:3807: checking for uuid_generate in -luuid -aconfigure:3842: gcc -o conftest -O2 conftest.c -luuid -lnsl -lrt -lpthread >&5 -aconfigure:3848: $? = 0 -aconfigure:3866: result: yes -aconfigure:3877: checking for uuid_generate in -luuid -aconfigure:3936: result: yes -aconfigure:3943: result: Setting PJ_M_NAME to i686 -aconfigure:3950: checking memory alignment -aconfigure:3966: result: 4 bytes (default) -aconfigure:3977: checking how to run the C preprocessor -aconfigure:4017: gcc -E conftest.c -aconfigure:4023: $? = 0 -aconfigure:4054: gcc -E conftest.c -conftest.c:14:28: error: ac_nonexistent.h: No such file or directory -aconfigure:4060: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| /* end confdefs.h. */ -| #include <ac_nonexistent.h> -aconfigure:4093: result: gcc -E -aconfigure:4122: gcc -E conftest.c -aconfigure:4128: $? = 0 -aconfigure:4159: gcc -E conftest.c -conftest.c:14:28: error: ac_nonexistent.h: No such file or directory -aconfigure:4165: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| /* end confdefs.h. */ -| #include <ac_nonexistent.h> -aconfigure:4203: checking for grep that handles long lines and -e -aconfigure:4277: result: /bin/grep -aconfigure:4282: checking for egrep -aconfigure:4360: result: /bin/grep -E -aconfigure:4365: checking for ANSI C header files -aconfigure:4395: gcc -c -O2 conftest.c >&5 -aconfigure:4401: $? = 0 -aconfigure:4500: gcc -o conftest -O2 conftest.c -luuid -lnsl -lrt -lpthread >&5 -aconfigure:4503: $? = 0 -aconfigure:4509: ./conftest -aconfigure:4512: $? = 0 -aconfigure:4529: result: yes -aconfigure:4553: checking for sys/types.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for sys/stat.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for stdlib.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for string.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for memory.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for strings.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for inttypes.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for stdint.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4553: checking for unistd.h -aconfigure:4574: gcc -c -O2 conftest.c >&5 -aconfigure:4580: $? = 0 -aconfigure:4596: result: yes -aconfigure:4608: checking whether byte ordering is bigendian -aconfigure:4641: gcc -c -O2 conftest.c >&5 -aconfigure:4647: $? = 0 -aconfigure:4679: gcc -c -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:31: error: 'not' undeclared (first use in this function) -conftest.c:31: error: (Each undeclared identifier is reported only once -conftest.c:31: error: for each function it appears in.) -conftest.c:31: error: expected ';' before 'big' -aconfigure:4685: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <sys/types.h> -| #include <sys/param.h> -| -| int -| main () -| { -| #if BYTE_ORDER != BIG_ENDIAN -| not big endian -| #endif -| -| ; -| return 0; -| } -aconfigure:4825: result: no -aconfigure:4907: result: Checking if floating point is disabled... no -aconfigure:4910: checking for fmod in -lm -aconfigure:4945: gcc -o conftest -O2 conftest.c -lm -luuid -lnsl -lrt -lpthread >&5 -conftest.c:33: warning: conflicting types for built-in function 'fmod' -aconfigure:4951: $? = 0 -aconfigure:4969: result: yes -aconfigure:4995: checking arpa/inet.h usability -aconfigure:5012: gcc -c -O2 conftest.c >&5 -aconfigure:5018: $? = 0 -aconfigure:5032: result: yes -aconfigure:5036: checking arpa/inet.h presence -aconfigure:5051: gcc -E conftest.c -aconfigure:5057: $? = 0 -aconfigure:5071: result: yes -aconfigure:5099: checking for arpa/inet.h -aconfigure:5106: result: yes -aconfigure:5128: checking assert.h usability -aconfigure:5145: gcc -c -O2 conftest.c >&5 -aconfigure:5151: $? = 0 -aconfigure:5165: result: yes -aconfigure:5169: checking assert.h presence -aconfigure:5184: gcc -E conftest.c -aconfigure:5190: $? = 0 -aconfigure:5204: result: yes -aconfigure:5232: checking for assert.h -aconfigure:5239: result: yes -aconfigure:5261: checking ctype.h usability -aconfigure:5278: gcc -c -O2 conftest.c >&5 -aconfigure:5284: $? = 0 -aconfigure:5298: result: yes -aconfigure:5302: checking ctype.h presence -aconfigure:5317: gcc -E conftest.c -aconfigure:5323: $? = 0 -aconfigure:5337: result: yes -aconfigure:5365: checking for ctype.h -aconfigure:5372: result: yes -aconfigure:5403: checking errno.h usability -aconfigure:5420: gcc -c -O2 conftest.c >&5 -aconfigure:5426: $? = 0 -aconfigure:5440: result: yes -aconfigure:5444: checking errno.h presence -aconfigure:5459: gcc -E conftest.c -aconfigure:5465: $? = 0 -aconfigure:5479: result: yes -aconfigure:5507: checking for errno.h -aconfigure:5514: result: yes -aconfigure:5539: checking fcntl.h usability -aconfigure:5556: gcc -c -O2 conftest.c >&5 -aconfigure:5562: $? = 0 -aconfigure:5576: result: yes -aconfigure:5580: checking fcntl.h presence -aconfigure:5595: gcc -E conftest.c -aconfigure:5601: $? = 0 -aconfigure:5615: result: yes -aconfigure:5643: checking for fcntl.h -aconfigure:5650: result: yes -aconfigure:5672: checking linux/socket.h usability -aconfigure:5689: gcc -c -O2 conftest.c >&5 -aconfigure:5695: $? = 0 -aconfigure:5709: result: yes -aconfigure:5713: checking linux/socket.h presence -aconfigure:5728: gcc -E conftest.c -aconfigure:5734: $? = 0 -aconfigure:5748: result: yes -aconfigure:5776: checking for linux/socket.h -aconfigure:5783: result: yes -aconfigure:5805: checking malloc.h usability -aconfigure:5822: gcc -c -O2 conftest.c >&5 -aconfigure:5828: $? = 0 -aconfigure:5842: result: yes -aconfigure:5846: checking malloc.h presence -aconfigure:5861: gcc -E conftest.c -aconfigure:5867: $? = 0 -aconfigure:5881: result: yes -aconfigure:5909: checking for malloc.h -aconfigure:5916: result: yes -aconfigure:5938: checking netdb.h usability -aconfigure:5955: gcc -c -O2 conftest.c >&5 -aconfigure:5961: $? = 0 -aconfigure:5975: result: yes -aconfigure:5979: checking netdb.h presence -aconfigure:5994: gcc -E conftest.c -aconfigure:6000: $? = 0 -aconfigure:6014: result: yes -aconfigure:6042: checking for netdb.h -aconfigure:6049: result: yes -aconfigure:6071: checking netinet/in_systm.h usability -aconfigure:6088: gcc -c -O2 conftest.c >&5 -aconfigure:6094: $? = 0 -aconfigure:6108: result: yes -aconfigure:6112: checking netinet/in_systm.h presence -aconfigure:6127: gcc -E conftest.c -aconfigure:6133: $? = 0 -aconfigure:6147: result: yes -aconfigure:6175: checking for netinet/in_systm.h -aconfigure:6182: result: yes -aconfigure:6204: checking netinet/in.h usability -aconfigure:6221: gcc -c -O2 conftest.c >&5 -aconfigure:6227: $? = 0 -aconfigure:6241: result: yes -aconfigure:6245: checking netinet/in.h presence -aconfigure:6260: gcc -E conftest.c -aconfigure:6266: $? = 0 -aconfigure:6280: result: yes -aconfigure:6308: checking for netinet/in.h -aconfigure:6315: result: yes -aconfigure:6327: checking for netinet/ip.h -aconfigure:6351: gcc -c -O2 conftest.c >&5 -aconfigure:6357: $? = 0 -aconfigure:6372: result: yes -aconfigure:6392: checking ifaddrs.h usability -aconfigure:6409: gcc -c -O2 conftest.c >&5 -aconfigure:6415: $? = 0 -aconfigure:6429: result: yes -aconfigure:6433: checking ifaddrs.h presence -aconfigure:6448: gcc -E conftest.c -aconfigure:6454: $? = 0 -aconfigure:6468: result: yes -aconfigure:6496: checking for ifaddrs.h -aconfigure:6503: result: yes -aconfigure:6525: checking semaphore.h usability -aconfigure:6542: gcc -c -O2 conftest.c >&5 -aconfigure:6548: $? = 0 -aconfigure:6562: result: yes -aconfigure:6566: checking semaphore.h presence -aconfigure:6581: gcc -E conftest.c -aconfigure:6587: $? = 0 -aconfigure:6601: result: yes -aconfigure:6629: checking for semaphore.h -aconfigure:6636: result: yes -aconfigure:6658: checking setjmp.h usability -aconfigure:6675: gcc -c -O2 conftest.c >&5 -aconfigure:6681: $? = 0 -aconfigure:6695: result: yes -aconfigure:6699: checking setjmp.h presence -aconfigure:6714: gcc -E conftest.c -aconfigure:6720: $? = 0 -aconfigure:6734: result: yes -aconfigure:6762: checking for setjmp.h -aconfigure:6769: result: yes -aconfigure:6791: checking stdarg.h usability -aconfigure:6808: gcc -c -O2 conftest.c >&5 -aconfigure:6814: $? = 0 -aconfigure:6828: result: yes -aconfigure:6832: checking stdarg.h presence -aconfigure:6847: gcc -E conftest.c -aconfigure:6853: $? = 0 -aconfigure:6867: result: yes -aconfigure:6895: checking for stdarg.h -aconfigure:6902: result: yes -aconfigure:6924: checking stddef.h usability -aconfigure:6941: gcc -c -O2 conftest.c >&5 -aconfigure:6947: $? = 0 -aconfigure:6961: result: yes -aconfigure:6965: checking stddef.h presence -aconfigure:6980: gcc -E conftest.c -aconfigure:6986: $? = 0 -aconfigure:7000: result: yes -aconfigure:7028: checking for stddef.h -aconfigure:7035: result: yes -aconfigure:7057: checking stdio.h usability -aconfigure:7074: gcc -c -O2 conftest.c >&5 -aconfigure:7080: $? = 0 -aconfigure:7094: result: yes -aconfigure:7098: checking stdio.h presence -aconfigure:7113: gcc -E conftest.c -aconfigure:7119: $? = 0 -aconfigure:7133: result: yes -aconfigure:7161: checking for stdio.h -aconfigure:7168: result: yes -aconfigure:7181: checking for stdint.h -aconfigure:7186: result: yes -aconfigure:7314: checking for stdlib.h -aconfigure:7319: result: yes -aconfigure:7447: checking for string.h -aconfigure:7452: result: yes -aconfigure:7589: checking sys/ioctl.h usability -aconfigure:7606: gcc -c -O2 conftest.c >&5 -aconfigure:7612: $? = 0 -aconfigure:7626: result: yes -aconfigure:7630: checking sys/ioctl.h presence -aconfigure:7645: gcc -E conftest.c -aconfigure:7651: $? = 0 -aconfigure:7665: result: yes -aconfigure:7693: checking for sys/ioctl.h -aconfigure:7700: result: yes -aconfigure:7722: checking sys/select.h usability -aconfigure:7739: gcc -c -O2 conftest.c >&5 -aconfigure:7745: $? = 0 -aconfigure:7759: result: yes -aconfigure:7763: checking sys/select.h presence -aconfigure:7778: gcc -E conftest.c -aconfigure:7784: $? = 0 -aconfigure:7798: result: yes -aconfigure:7826: checking for sys/select.h -aconfigure:7833: result: yes -aconfigure:7855: checking sys/socket.h usability -aconfigure:7872: gcc -c -O2 conftest.c >&5 -aconfigure:7878: $? = 0 -aconfigure:7892: result: yes -aconfigure:7896: checking sys/socket.h presence -aconfigure:7911: gcc -E conftest.c -aconfigure:7917: $? = 0 -aconfigure:7931: result: yes -aconfigure:7959: checking for sys/socket.h -aconfigure:7966: result: yes -aconfigure:7988: checking sys/time.h usability -aconfigure:8005: gcc -c -O2 conftest.c >&5 -aconfigure:8011: $? = 0 -aconfigure:8025: result: yes -aconfigure:8029: checking sys/time.h presence -aconfigure:8044: gcc -E conftest.c -aconfigure:8050: $? = 0 -aconfigure:8064: result: yes -aconfigure:8092: checking for sys/time.h -aconfigure:8099: result: yes -aconfigure:8121: checking sys/timeb.h usability -aconfigure:8138: gcc -c -O2 conftest.c >&5 -aconfigure:8144: $? = 0 -aconfigure:8158: result: yes -aconfigure:8162: checking sys/timeb.h presence -aconfigure:8177: gcc -E conftest.c -aconfigure:8183: $? = 0 -aconfigure:8197: result: yes -aconfigure:8225: checking for sys/timeb.h -aconfigure:8232: result: yes -aconfigure:8245: checking for sys/types.h -aconfigure:8250: result: yes -aconfigure:8387: checking time.h usability -aconfigure:8404: gcc -c -O2 conftest.c >&5 -aconfigure:8410: $? = 0 -aconfigure:8424: result: yes -aconfigure:8428: checking time.h presence -aconfigure:8443: gcc -E conftest.c -aconfigure:8449: $? = 0 -aconfigure:8463: result: yes -aconfigure:8491: checking for time.h -aconfigure:8498: result: yes -aconfigure:8511: checking for unistd.h -aconfigure:8516: result: yes -aconfigure:8653: checking winsock.h usability -aconfigure:8670: gcc -c -O2 conftest.c >&5 -conftest.c:88:21: error: winsock.h: No such file or directory -aconfigure:8676: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <winsock.h> -aconfigure:8690: result: no -aconfigure:8694: checking winsock.h presence -aconfigure:8709: gcc -E conftest.c -conftest.c:55:21: error: winsock.h: No such file or directory -aconfigure:8715: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <winsock.h> -aconfigure:8729: result: no -aconfigure:8757: checking for winsock.h -aconfigure:8764: result: no -aconfigure:8786: checking winsock2.h usability -aconfigure:8803: gcc -c -O2 conftest.c >&5 -conftest.c:88:22: error: winsock2.h: No such file or directory -aconfigure:8809: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <winsock2.h> -aconfigure:8823: result: no -aconfigure:8827: checking winsock2.h presence -aconfigure:8842: gcc -E conftest.c -conftest.c:55:22: error: winsock2.h: No such file or directory -aconfigure:8848: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <winsock2.h> -aconfigure:8862: result: no -aconfigure:8890: checking for winsock2.h -aconfigure:8897: result: no -aconfigure:8909: checking for mswsock.h -aconfigure:8935: gcc -c -O2 conftest.c >&5 -conftest.c:62:21: error: mswsock.h: No such file or directory -aconfigure:8941: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #if PJ_HAS_WINSOCK2_H -| # include <winsock2.h> -| #elif PJ_HAS_WINSOCK_H -| # include <winsock.h> -| #endif -| -| -| #include <mswsock.h> -aconfigure:8956: result: no -aconfigure:8976: checking ws2tcpip.h usability -aconfigure:8993: gcc -c -O2 conftest.c >&5 -conftest.c:88:22: error: ws2tcpip.h: No such file or directory -aconfigure:8999: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <ws2tcpip.h> -aconfigure:9013: result: no -aconfigure:9017: checking ws2tcpip.h presence -aconfigure:9032: gcc -E conftest.c -conftest.c:55:22: error: ws2tcpip.h: No such file or directory -aconfigure:9038: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <ws2tcpip.h> -aconfigure:9052: result: no -aconfigure:9080: checking for ws2tcpip.h -aconfigure:9087: result: no -aconfigure:9109: checking uuid/uuid.h usability -aconfigure:9126: gcc -c -O2 conftest.c >&5 -aconfigure:9132: $? = 0 -aconfigure:9146: result: yes -aconfigure:9150: checking uuid/uuid.h presence -aconfigure:9165: gcc -E conftest.c -aconfigure:9171: $? = 0 -aconfigure:9185: result: yes -aconfigure:9213: checking for uuid/uuid.h -aconfigure:9220: result: yes -aconfigure:9229: checking for net/if.h -aconfigure:9253: gcc -c -O2 conftest.c >&5 -aconfigure:9259: $? = 0 -aconfigure:9274: result: yes -aconfigure:9285: result: Setting PJ_OS_NAME to i686-pc-linux-gnu -aconfigure:9292: result: Setting PJ_HAS_ERRNO_VAR to 1 -aconfigure:9299: result: Setting PJ_HAS_HIGH_RES_TIMER to 1 -aconfigure:9306: result: Setting PJ_HAS_MALLOC to 1 -aconfigure:9313: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0 -aconfigure:9320: result: Setting PJ_ATOMIC_VALUE_TYPE to long -aconfigure:9327: checking if inet_aton() is available -aconfigure:9352: gcc -c -O2 conftest.c >&5 -aconfigure:9358: $? = 0 -aconfigure:9367: result: yes -aconfigure:9379: checking if inet_pton() is available -aconfigure:9404: gcc -c -O2 conftest.c >&5 -aconfigure:9410: $? = 0 -aconfigure:9419: result: yes -aconfigure:9431: checking if inet_ntop() is available -aconfigure:9456: gcc -c -O2 conftest.c >&5 -aconfigure:9462: $? = 0 -aconfigure:9471: result: yes -aconfigure:9483: checking if getaddrinfo() is available -aconfigure:9508: gcc -c -O2 conftest.c >&5 -aconfigure:9514: $? = 0 -aconfigure:9523: result: yes -aconfigure:9535: checking if sockaddr_in has sin_len member -aconfigure:9561: gcc -c -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:73: error: 'struct sockaddr_in' has no member named 'sin_len' -aconfigure:9567: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| #define PJ_HAS_NET_IF_H 1 -| #define PJ_OS_NAME "i686-pc-linux-gnu" -| #define PJ_HAS_ERRNO_VAR 1 -| #define PJ_HAS_HIGH_RES_TIMER 1 -| #define PJ_HAS_MALLOC 1 -| #define PJ_NATIVE_STRING_IS_UNICODE 0 -| #define PJ_ATOMIC_VALUE_TYPE long -| #define PJ_SOCK_HAS_INET_ATON 1 -| #define PJ_SOCK_HAS_INET_PTON 1 -| #define PJ_SOCK_HAS_INET_NTOP 1 -| #define PJ_SOCK_HAS_GETADDRINFO 1 -| /* end confdefs.h. */ -| #include <sys/types.h> -| #include <sys/socket.h> -| #include <netinet/in.h> -| #include <arpa/inet.h> -| int -| main () -| { -| struct sockaddr_in a; a.sin_len=0; -| ; -| return 0; -| } -aconfigure:9582: result: no -aconfigure:9588: checking if socklen_t is available -aconfigure:9611: gcc -c -O2 conftest.c >&5 -aconfigure:9617: $? = 0 -aconfigure:9626: result: yes -aconfigure:9638: checking if SO_ERROR is available -aconfigure:9674: gcc -c -O2 conftest.c >&5 -aconfigure:9680: $? = 0 -aconfigure:9689: result: yes -aconfigure:9704: checking if pthread_rwlock_t is available -aconfigure:9727: gcc -c -O2 conftest.c >&5 -aconfigure:9733: $? = 0 -aconfigure:9743: result: yes -aconfigure:9818: checking if pthread_mutexattr_settype() is available -aconfigure:9841: gcc -c -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:73: error: 'PTHREAD_MUTEX_FAST_NP' undeclared (first use in this function) -conftest.c:73: error: (Each undeclared identifier is reported only once -conftest.c:73: error: for each function it appears in.) -aconfigure:9847: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| #define PJ_HAS_NET_IF_H 1 -| #define PJ_OS_NAME "i686-pc-linux-gnu" -| #define PJ_HAS_ERRNO_VAR 1 -| #define PJ_HAS_HIGH_RES_TIMER 1 -| #define PJ_HAS_MALLOC 1 -| #define PJ_NATIVE_STRING_IS_UNICODE 0 -| #define PJ_ATOMIC_VALUE_TYPE long -| #define PJ_SOCK_HAS_INET_ATON 1 -| #define PJ_SOCK_HAS_INET_PTON 1 -| #define PJ_SOCK_HAS_INET_NTOP 1 -| #define PJ_SOCK_HAS_GETADDRINFO 1 -| #define PJ_HAS_SOCKLEN_T 1 -| #define PJ_HAS_SO_ERROR 1 -| #define PJ_EMULATE_RWMUTEX 0 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP); -| ; -| return 0; -| } -aconfigure:9862: result: no -aconfigure:9868: checking if pthread_mutexattr_t has recursive member -aconfigure:9892: gcc -c -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:74: error: 'pthread_mutexattr_t' has no member named 'recursive' -aconfigure:9898: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| #define PJ_HAS_NET_IF_H 1 -| #define PJ_OS_NAME "i686-pc-linux-gnu" -| #define PJ_HAS_ERRNO_VAR 1 -| #define PJ_HAS_HIGH_RES_TIMER 1 -| #define PJ_HAS_MALLOC 1 -| #define PJ_NATIVE_STRING_IS_UNICODE 0 -| #define PJ_ATOMIC_VALUE_TYPE long -| #define PJ_SOCK_HAS_INET_ATON 1 -| #define PJ_SOCK_HAS_INET_PTON 1 -| #define PJ_SOCK_HAS_INET_NTOP 1 -| #define PJ_SOCK_HAS_GETADDRINFO 1 -| #define PJ_HAS_SOCKLEN_T 1 -| #define PJ_HAS_SO_ERROR 1 -| #define PJ_EMULATE_RWMUTEX 0 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_mutexattr_t attr; -| attr.recursive=1; -| ; -| return 0; -| } -aconfigure:9913: result: no -aconfigure:9920: checking ioqueue backend -aconfigure:9932: result: select() -aconfigure:9980: checking sys/soundcard.h usability -aconfigure:9997: gcc -c -O2 conftest.c >&5 -aconfigure:10003: $? = 0 -aconfigure:10017: result: yes -aconfigure:10021: checking sys/soundcard.h presence -aconfigure:10036: gcc -E conftest.c -aconfigure:10042: $? = 0 -aconfigure:10056: result: yes -aconfigure:10084: checking for sys/soundcard.h -aconfigure:10091: result: yes -aconfigure:10110: checking linux/soundcard.h usability -aconfigure:10127: gcc -c -O2 conftest.c >&5 -aconfigure:10133: $? = 0 -aconfigure:10147: result: yes -aconfigure:10151: checking linux/soundcard.h presence -aconfigure:10166: gcc -E conftest.c -aconfigure:10172: $? = 0 -aconfigure:10186: result: yes -aconfigure:10214: checking for linux/soundcard.h -aconfigure:10221: result: yes -aconfigure:10240: checking machine/soundcard.h usability -aconfigure:10257: gcc -c -O2 conftest.c >&5 -conftest.c:102:31: error: machine/soundcard.h: No such file or directory -aconfigure:10263: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| #define PJ_HAS_NET_IF_H 1 -| #define PJ_OS_NAME "i686-pc-linux-gnu" -| #define PJ_HAS_ERRNO_VAR 1 -| #define PJ_HAS_HIGH_RES_TIMER 1 -| #define PJ_HAS_MALLOC 1 -| #define PJ_NATIVE_STRING_IS_UNICODE 0 -| #define PJ_ATOMIC_VALUE_TYPE long -| #define PJ_SOCK_HAS_INET_ATON 1 -| #define PJ_SOCK_HAS_INET_PTON 1 -| #define PJ_SOCK_HAS_INET_NTOP 1 -| #define PJ_SOCK_HAS_GETADDRINFO 1 -| #define PJ_HAS_SOCKLEN_T 1 -| #define PJ_HAS_SO_ERROR 1 -| #define PJ_EMULATE_RWMUTEX 0 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <machine/soundcard.h> -aconfigure:10277: result: no -aconfigure:10281: checking machine/soundcard.h presence -aconfigure:10296: gcc -E conftest.c -conftest.c:69:31: error: machine/soundcard.h: No such file or directory -aconfigure:10302: $? = 1 -aconfigure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "pjproject" -| #define PACKAGE_TARNAME "pjproject" -| #define PACKAGE_VERSION "1.0" -| #define PACKAGE_STRING "pjproject 1.0" -| #define PACKAGE_BUGREPORT "" -| #define HAVE_LIBPTHREAD 1 -| #define HAVE_LIBRT 1 -| #define HAVE_LIBNSL 1 -| #define HAVE_LIBUUID 1 -| #define PJ_M_NAME "i686" -| #define PJ_POOL_ALIGNMENT 4 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define PJ_LINUX 1 -| #define PJ_HAS_FLOATING_POINT 1 -| #define HAVE_LIBM 1 -| #define PJ_HAS_ARPA_INET_H 1 -| #define PJ_HAS_ASSERT_H 1 -| #define PJ_HAS_CTYPE_H 1 -| #define PJ_HAS_ERRNO_H 1 -| #define PJ_HAS_FCNTL_H 1 -| #define PJ_HAS_LINUX_SOCKET_H 1 -| #define PJ_HAS_MALLOC_H 1 -| #define PJ_HAS_NETDB_H 1 -| #define PJ_HAS_NETINET_IN_SYSTM_H 1 -| #define PJ_HAS_NETINET_IN_H 1 -| #define PJ_HAS_NETINET_IP_H 1 -| #define PJ_HAS_IFADDRS_H 1 -| #define PJ_HAS_SEMAPHORE_H 1 -| #define PJ_HAS_SETJMP_H 1 -| #define PJ_HAS_STDARG_H 1 -| #define PJ_HAS_STDDEF_H 1 -| #define PJ_HAS_STDIO_H 1 -| #define PJ_HAS_STDINT_H 1 -| #define PJ_HAS_STDLIB_H 1 -| #define PJ_HAS_STRING_H 1 -| #define PJ_HAS_SYS_IOCTL_H 1 -| #define PJ_HAS_SYS_SELECT_H 1 -| #define PJ_HAS_SYS_SOCKET_H 1 -| #define PJ_HAS_SYS_TIME_H 1 -| #define PJ_HAS_SYS_TIMEB_H 1 -| #define PJ_HAS_SYS_TYPES_H 1 -| #define PJ_HAS_TIME_H 1 -| #define PJ_HAS_UNISTD_H 1 -| #define PJ_HAS_NET_IF_H 1 -| #define PJ_OS_NAME "i686-pc-linux-gnu" -| #define PJ_HAS_ERRNO_VAR 1 -| #define PJ_HAS_HIGH_RES_TIMER 1 -| #define PJ_HAS_MALLOC 1 -| #define PJ_NATIVE_STRING_IS_UNICODE 0 -| #define PJ_ATOMIC_VALUE_TYPE long -| #define PJ_SOCK_HAS_INET_ATON 1 -| #define PJ_SOCK_HAS_INET_PTON 1 -| #define PJ_SOCK_HAS_INET_NTOP 1 -| #define PJ_SOCK_HAS_GETADDRINFO 1 -| #define PJ_HAS_SOCKLEN_T 1 -| #define PJ_HAS_SO_ERROR 1 -| #define PJ_EMULATE_RWMUTEX 0 -| /* end confdefs.h. */ -| #include <machine/soundcard.h> -aconfigure:10316: result: no -aconfigure:10344: checking for machine/soundcard.h -aconfigure:10351: result: no -aconfigure:10407: checking alsa/version.h usability -aconfigure:10424: gcc -c -O2 conftest.c >&5 -aconfigure:10430: $? = 0 -aconfigure:10444: result: yes -aconfigure:10448: checking alsa/version.h presence -aconfigure:10463: gcc -E conftest.c -aconfigure:10469: $? = 0 -aconfigure:10483: result: yes -aconfigure:10511: checking for alsa/version.h -aconfigure:10518: result: yes -aconfigure:10533: result: Checking sound device backend... unix -aconfigure:10573: result: Checking if small filter is disabled... no -aconfigure:10587: result: Checking if large filter is disabled... no -aconfigure:10601: result: Checking if Speex AEC is disabled...no -aconfigure:10619: result: Checking if G.711 codec is disabled...no -aconfigure:10638: result: Checking if L16 codec is disabled...no -aconfigure:10657: result: Checking if GSM codec is disabled...no -aconfigure:10675: result: Checking if G.722 codec is disabled...no -aconfigure:10693: result: Checking if G.722.1 codec is disabled...no -aconfigure:10711: result: Checking if Speex codec is disabled...no -aconfigure:10729: result: Checking if iLBC codec is disabled...no -aconfigure:10808: result: Skipping libsamplerate detection -aconfigure:11080: result: Skipping Intel IPP settings (not wanted) -aconfigure:11098: result: checking for OpenSSL installations.. -aconfigure:11113: checking openssl/ssl.h usability -aconfigure:11130: gcc -c -O2 conftest.c >&5 -aconfigure:11136: $? = 0 -aconfigure:11150: result: yes -aconfigure:11154: checking openssl/ssl.h presence -aconfigure:11169: gcc -E conftest.c -aconfigure:11175: $? = 0 -aconfigure:11189: result: yes -aconfigure:11217: checking for openssl/ssl.h -aconfigure:11224: result: yes -aconfigure:11233: checking for SSL_library_init in -lssl -aconfigure:11268: gcc -o conftest -O2 conftest.c -lssl -lm -luuid -lnsl -lrt -lpthread -lasound >&5 -aconfigure:11274: $? = 0 -aconfigure:11292: result: yes -aconfigure:11298: checking for ERR_load_BIO_strings in -lcrypto -aconfigure:11333: gcc -o conftest -O2 conftest.c -lcrypto -lm -luuid -lnsl -lrt -lpthread -lasound -lssl >&5 -aconfigure:11339: $? = 0 -aconfigure:11357: result: yes -aconfigure:11364: result: OpenSSL library found, SSL support enabled -aconfigure:11381: checking if select() needs correct nfds -aconfigure:11395: result: no (default) -aconfigure:11397: result: ** Decided that select() doesn't need correct nfds (please check) -aconfigure:11402: checking if pj_thread_create() should enforce stack size -aconfigure:11416: result: no (default) -aconfigure:11421: checking if pj_thread_create() should allocate stack -aconfigure:11435: result: no (default) -aconfigure:11451: result: ** Setting non-blocking recv() retval to EAGAIN (please check) -aconfigure:11467: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check) -aconfigure:11596: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by pjproject config.status 1.0, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on alexandresavard-desktop - -config.status:642: creating build.mak -config.status:642: creating build/os-auto.mak -config.status:642: creating pjlib/build/os-auto.mak -config.status:642: creating pjlib-util/build/os-auto.mak -config.status:642: creating pjmedia/build/os-auto.mak -config.status:642: creating pjsip/build/os-auto.mak -config.status:642: creating third_party/build/portaudio/os-auto.mak -config.status:642: creating third_party/build/os-auto.mak -config.status:642: creating pjlib/include/pj/compat/os_auto.h -config.status:642: creating pjlib/include/pj/compat/m_auto.h -config.status:642: creating pjmedia/include/pjmedia/config_auto.h -config.status:920: pjmedia/include/pjmedia/config_auto.h is unchanged -config.status:642: creating pjmedia/include/pjmedia-codec/config_auto.h -config.status:920: pjmedia/include/pjmedia-codec/config_auto.h is unchanged -config.status:642: creating pjsip/include/pjsip/sip_autoconf.h -config.status:920: pjsip/include/pjsip/sip_autoconf.h is unchanged -aconfigure:12648: result: - -Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h. - -Further customizations can be put in: - - 'user.mak' - - 'pjlib/include/pj/config_site.h' - -The next step now is to run 'make dep' and 'make'. - - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=i686-pc-linux-gnu -ac_cv_c_bigendian=no -ac_cv_c_compiler_gnu=yes -ac_cv_cxx_compiler_gnu=yes -ac_cv_env_CCC_set= -ac_cv_env_CCC_value= -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_CXXFLAGS_set= -ac_cv_env_CXXFLAGS_value= -ac_cv_env_CXX_set= -ac_cv_env_CXX_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_header_alsa_version_h=yes -ac_cv_header_arpa_inet_h=yes -ac_cv_header_assert_h=yes -ac_cv_header_ctype_h=yes -ac_cv_header_errno_h=yes -ac_cv_header_fcntl_h=yes -ac_cv_header_ifaddrs_h=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_linux_socket_h=yes -ac_cv_header_linux_soundcard_h=yes -ac_cv_header_machine_soundcard_h=no -ac_cv_header_malloc_h=yes -ac_cv_header_memory_h=yes -ac_cv_header_mswsock_h=no -ac_cv_header_net_if_h=yes -ac_cv_header_netdb_h=yes -ac_cv_header_netinet_in_h=yes -ac_cv_header_netinet_in_systm_h=yes -ac_cv_header_netinet_ip_h=yes -ac_cv_header_openssl_ssl_h=yes -ac_cv_header_semaphore_h=yes -ac_cv_header_setjmp_h=yes -ac_cv_header_stdarg_h=yes -ac_cv_header_stdc=yes -ac_cv_header_stddef_h=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdio_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_ioctl_h=yes -ac_cv_header_sys_select_h=yes -ac_cv_header_sys_socket_h=yes -ac_cv_header_sys_soundcard_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_time_h=yes -ac_cv_header_sys_timeb_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_time_h=yes -ac_cv_header_unistd_h=yes -ac_cv_header_uuid_uuid_h=yes -ac_cv_header_winsock2_h=no -ac_cv_header_winsock_h=no -ac_cv_header_ws2tcpip_h=no -ac_cv_host=i686-pc-linux-gnu -ac_cv_lib_crypto_ERR_load_BIO_strings=yes -ac_cv_lib_m_fmod=yes -ac_cv_lib_nsl_puts=yes -ac_cv_lib_ole32_puts=no -ac_cv_lib_pthread_pthread_create=yes -ac_cv_lib_rt_puts=yes -ac_cv_lib_socket_puts=no -ac_cv_lib_ssl_SSL_library_init=yes -ac_cv_lib_uuid_uuid_generate=yes -ac_cv_lib_winmm_puts=no -ac_cv_lib_ws2_32_puts=no -ac_cv_lib_wsock32_puts=no -ac_cv_objext=o -ac_cv_path_EGREP='/bin/grep -E' -ac_cv_path_GREP=/bin/grep -ac_cv_prog_CPP='gcc -E' -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_ac_ct_CXX=g++ -ac_cv_prog_cc_c89= -ac_cv_prog_cc_g=yes -ac_cv_prog_cxx_g=yes -ac_cv_target=i686-pc-linux-gnu - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -CC='gcc' -CFLAGS='-O2' -CPP='gcc -E' -CPPFLAGS='' -CXX='g++' -CXXFLAGS='-O2 ' -DEFS='-DHAVE_CONFIG_H' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/bin/grep -E' -EXEEXT='' -GREP='/bin/grep' -LDFLAGS='' -LIBOBJS='' -LIBS='-lm -luuid -lnsl -lrt -lpthread -lasound -lssl -lcrypto' -LTLIBOBJS='' -OBJEXT='o' -PACKAGE_BUGREPORT='' -PACKAGE_NAME='pjproject' -PACKAGE_STRING='pjproject 1.0' -PACKAGE_TARNAME='pjproject' -PACKAGE_VERSION='1.0' -PATH_SEPARATOR=':' -SHELL='/bin/bash' -ac_build_mak_vars='' -ac_cross_compile='' -ac_ct_CC='gcc' -ac_ct_CXX='g++' -ac_host='unix' -ac_linux_poll='select' -ac_main_obj='main.o' -ac_no_g711_codec='' -ac_no_g7221_codec='' -ac_no_g722_codec='' -ac_no_gsm_codec='' -ac_no_ilbc_codec='' -ac_no_l16_codec='' -ac_no_large_filter='' -ac_no_small_filter='' -ac_no_speex_aec='' -ac_no_speex_codec='' -ac_no_ssl='' -ac_os_objs='ioqueue_select.o file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_uuid.o' -ac_pa_cflags=' -DHAVE_SYS_SOUNDCARD_H -DHAVE_LINUX_SOUNDCARD_H -DPA_LITTLE_ENDIAN' -ac_pa_use_alsa='1' -ac_pa_use_oss='1' -ac_pjdir='/home/alexandresavard/Development/sflphone/sflphone-common/libs/pjproject' -ac_pjmedia_snd='pa_unix' -bindir='${exec_prefix}/bin' -build='i686-pc-linux-gnu' -build_alias='' -build_cpu='i686' -build_os='linux-gnu' -build_vendor='pc' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host='i686-pc-linux-gnu' -host_alias='' -host_cpu='i686' -host_os='linux-gnu' -host_vendor='pc' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -libcrypto_present='1' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -libssl_present='1' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -oldincludedir='/usr/include' -openssl_h_present='1' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target='i686-pc-linux-gnu' -target_alias='' -target_cpu='i686' -target_os='linux-gnu' -target_vendor='pc' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -#define PACKAGE_NAME "pjproject" -#define PACKAGE_TARNAME "pjproject" -#define PACKAGE_VERSION "1.0" -#define PACKAGE_STRING "pjproject 1.0" -#define PACKAGE_BUGREPORT "" -#define HAVE_LIBPTHREAD 1 -#define HAVE_LIBRT 1 -#define HAVE_LIBNSL 1 -#define HAVE_LIBUUID 1 -#define PJ_M_NAME "i686" -#define PJ_POOL_ALIGNMENT 4 -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define PJ_LINUX 1 -#define PJ_HAS_FLOATING_POINT 1 -#define HAVE_LIBM 1 -#define PJ_HAS_ARPA_INET_H 1 -#define PJ_HAS_ASSERT_H 1 -#define PJ_HAS_CTYPE_H 1 -#define PJ_HAS_ERRNO_H 1 -#define PJ_HAS_FCNTL_H 1 -#define PJ_HAS_LINUX_SOCKET_H 1 -#define PJ_HAS_MALLOC_H 1 -#define PJ_HAS_NETDB_H 1 -#define PJ_HAS_NETINET_IN_SYSTM_H 1 -#define PJ_HAS_NETINET_IN_H 1 -#define PJ_HAS_NETINET_IP_H 1 -#define PJ_HAS_IFADDRS_H 1 -#define PJ_HAS_SEMAPHORE_H 1 -#define PJ_HAS_SETJMP_H 1 -#define PJ_HAS_STDARG_H 1 -#define PJ_HAS_STDDEF_H 1 -#define PJ_HAS_STDIO_H 1 -#define PJ_HAS_STDINT_H 1 -#define PJ_HAS_STDLIB_H 1 -#define PJ_HAS_STRING_H 1 -#define PJ_HAS_SYS_IOCTL_H 1 -#define PJ_HAS_SYS_SELECT_H 1 -#define PJ_HAS_SYS_SOCKET_H 1 -#define PJ_HAS_SYS_TIME_H 1 -#define PJ_HAS_SYS_TIMEB_H 1 -#define PJ_HAS_SYS_TYPES_H 1 -#define PJ_HAS_TIME_H 1 -#define PJ_HAS_UNISTD_H 1 -#define PJ_HAS_NET_IF_H 1 -#define PJ_OS_NAME "i686-pc-linux-gnu" -#define PJ_HAS_ERRNO_VAR 1 -#define PJ_HAS_HIGH_RES_TIMER 1 -#define PJ_HAS_MALLOC 1 -#define PJ_NATIVE_STRING_IS_UNICODE 0 -#define PJ_ATOMIC_VALUE_TYPE long -#define PJ_SOCK_HAS_INET_ATON 1 -#define PJ_SOCK_HAS_INET_PTON 1 -#define PJ_SOCK_HAS_INET_NTOP 1 -#define PJ_SOCK_HAS_GETADDRINFO 1 -#define PJ_HAS_SOCKLEN_T 1 -#define PJ_HAS_SO_ERROR 1 -#define PJ_EMULATE_RWMUTEX 0 -#define PJSIP_HAS_TLS_TRANSPORT 1 -#define PJ_SELECT_NEEDS_NFDS 0 -#define PJ_THREAD_SET_STACK_SIZE 0 -#define PJ_THREAD_ALLOCATE_STACK 0 -#define PJ_BLOCKING_ERROR_VAL EAGAIN -#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS - -aconfigure: exit 0 diff --git a/sflphone-common/libs/pjproject/config.status b/sflphone-common/libs/pjproject/config.status deleted file mode 100755 index ef4e31bd2d421f0bf73109faa0cf7a588e85ca25..0000000000000000000000000000000000000000 --- a/sflphone-common/libs/pjproject/config.status +++ /dev/null @@ -1,939 +0,0 @@ -#! /bin/bash -# Generated by aconfigure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=${CONFIG_SHELL-/bin/bash} -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by pjproject $as_me 1.0, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/portaudio/os-auto.mak third_party/build/os-auto.mak" -config_headers=" pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h" - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to <bug-autoconf@gnu.org>." - -ac_cs_version="\ -pjproject config.status 1.0 -configured by ./aconfigure, generated by GNU Autoconf 2.61, - with options \"\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/alexandresavard/Development/sflphone/sflphone-common/libs/pjproject' -srcdir='.' -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - echo "running CONFIG_SHELL=/bin/bash /bin/bash ./aconfigure " $ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=/bin/bash - export CONFIG_SHELL - exec /bin/bash "./aconfigure" $ac_configure_extra_args --no-create --no-recursion -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "pjlib/include/pj/compat/os_auto.h") CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;; - "pjlib/include/pj/compat/m_auto.h") CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;; - "pjmedia/include/pjmedia/config_auto.h") CONFIG_HEADERS="$CONFIG_HEADERS pjmedia/include/pjmedia/config_auto.h" ;; - "pjmedia/include/pjmedia-codec/config_auto.h") CONFIG_HEADERS="$CONFIG_HEADERS pjmedia/include/pjmedia-codec/config_auto.h" ;; - "pjsip/include/pjsip/sip_autoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS pjsip/include/pjsip/sip_autoconf.h" ;; - "build.mak") CONFIG_FILES="$CONFIG_FILES build.mak" ;; - "build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES build/os-auto.mak" ;; - "pjlib/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib/build/os-auto.mak" ;; - "pjlib-util/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;; - "pjmedia/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;; - "pjsip/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjsip/build/os-auto.mak" ;; - "third_party/build/portaudio/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/portaudio/os-auto.mak" ;; - "third_party/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/os-auto.mak" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -cat >"$tmp/subs-1.sed" <<\CEOF -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -s,@SHELL@,|#_!!_#|/bin/bash,g -s,@PATH_SEPARATOR@,|#_!!_#|:,g -s,@PACKAGE_NAME@,|#_!!_#|pjproject,g -s,@PACKAGE_TARNAME@,|#_!!_#|pjproject,g -s,@PACKAGE_VERSION@,|#_!!_#|1.0,g -s,@PACKAGE_STRING@,|#_!!_#|pjproject 1.0,g -s,@PACKAGE_BUGREPORT@,|#_!!_#|,g -s,@exec_prefix@,|#_!!_#|${prefix},g -s,@prefix@,|#_!!_#|/usr/local,g -s,@program_transform_name@,|#_!!_#|s\,x\,x\,,g -s,@bindir@,|#_!!_#|${exec_prefix}/bin,g -s,@sbindir@,|#_!!_#|${exec_prefix}/sbin,g -s,@libexecdir@,|#_!!_#|${exec_prefix}/libexec,g -s,@datarootdir@,|#_!!_#|${prefix}/share,g -s,@datadir@,|#_!!_#|${datarootdir},g -s,@sysconfdir@,|#_!!_#|${prefix}/etc,g -s,@sharedstatedir@,|#_!!_#|${prefix}/com,g -s,@localstatedir@,|#_!!_#|${prefix}/var,g -s,@includedir@,|#_!!_#|${prefix}/include,g -s,@oldincludedir@,|#_!!_#|/usr/include,g -s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g -s,@infodir@,|#_!!_#|${datarootdir}/info,g -s,@htmldir@,|#_!!_#|${docdir},g -s,@dvidir@,|#_!!_#|${docdir},g -s,@pdfdir@,|#_!!_#|${docdir},g -s,@psdir@,|#_!!_#|${docdir},g -s,@libdir@,|#_!!_#|${exec_prefix}/lib,g -s,@localedir@,|#_!!_#|${datarootdir}/locale,g -s,@mandir@,|#_!!_#|${datarootdir}/man,g -s,@DEFS@,|#_!!_#|-DHAVE_CONFIG_H,g -s,@ECHO_C@,|#_!!_#|,g -s,@ECHO_N@,|#_!!_#|-n,g -s,@ECHO_T@,|#_!!_#|,g -s,@LIBS@,|#_!!_#|-lm -luuid -lnsl -lrt -lpthread -lasound -lssl -lcrypto,g -s,@build_alias@,|#_!!_#|,g -s,@host_alias@,|#_!!_#|,g -s,@target_alias@,|#_!!_#|,g -s,@build@,|#_!!_#|i686-pc-linux-gnu,g -s,@build_cpu@,|#_!!_#|i686,g -s,@build_vendor@,|#_!!_#|pc,g -s,@build_os@,|#_!!_#|linux-gnu,g -s,@host@,|#_!!_#|i686-pc-linux-gnu,g -s,@host_cpu@,|#_!!_#|i686,g -s,@host_vendor@,|#_!!_#|pc,g -s,@host_os@,|#_!!_#|linux-gnu,g -s,@target@,|#_!!_#|i686-pc-linux-gnu,g -s,@target_cpu@,|#_!!_#|i686,g -s,@target_vendor@,|#_!!_#|pc,g -s,@target_os@,|#_!!_#|linux-gnu,g -s,@CC@,|#_!!_#|gcc,g -s,@CFLAGS@,|#_!!_#|-O2,g -s,@LDFLAGS@,|#_!!_#|,g -s,@CPPFLAGS@,|#_!!_#|,g -s,@ac_ct_CC@,|#_!!_#|gcc,g -s,@EXEEXT@,|#_!!_#|,g -s,@OBJEXT@,|#_!!_#|o,g -s,@CXX@,|#_!!_#|g++,g -s,@CXXFLAGS@,|#_!!_#|-O2 ,g -s,@ac_ct_CXX@,|#_!!_#|g++,g -s,@ac_pjdir@,|#_!!_#|/home/alexandresavard/Development/sflphone/sflphone-common/libs/pjproject,g -s,@ac_build_mak_vars@,|#_!!_#|,g -s,@CPP@,|#_!!_#|gcc -E,g -s,@GREP@,|#_!!_#|/bin/grep,g -s,@EGREP@,|#_!!_#|/bin/grep -E,g -s,@ac_os_objs@,|#_!!_#|ioqueue_select.o file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_uuid.o,g -s,@ac_pjmedia_snd@,|#_!!_#|pa_unix,g -s,@ac_pa_cflags@,|#_!!_#| -DHAVE_SYS_SOUNDCARD_H -DHAVE_LINUX_SOUNDCARD_H -DPA_LITTLE_ENDIAN,g -s,@ac_pa_use_alsa@,|#_!!_#|1,g -s,@ac_pa_use_oss@,|#_!!_#|1,g -s,@ac_no_small_filter@,|#_!!_#|,g -s,@ac_no_large_filter@,|#_!!_#|,g -s,@ac_no_speex_aec@,|#_!!_#|,g -s,@ac_no_g711_codec@,|#_!!_#|,g -s,@ac_no_l16_codec@,|#_!!_#|,g -s,@ac_no_gsm_codec@,|#_!!_#|,g -s,@ac_no_g722_codec@,|#_!!_#|,g -s,@ac_no_g7221_codec@,|#_!!_#|,g -s,@ac_no_speex_codec@,|#_!!_#|,g -s,@ac_no_ilbc_codec@,|#_!!_#|,g -s,@ac_no_ssl@,|#_!!_#|,g -s,@openssl_h_present@,|#_!!_#|1,g -s,@libssl_present@,|#_!!_#|1,g -s,@libcrypto_present@,|#_!!_#|1,g -s,@ac_cross_compile@,|#_!!_#|,g -s,@ac_linux_poll@,|#_!!_#|select,g -s,@ac_host@,|#_!!_#|unix,g -s,@ac_main_obj@,|#_!!_#|main.o,g -s,@LIBOBJS@,|#_!!_#|,g -s,@LTLIBOBJS@,|#_!!_#|,g -:end -s/|#_!!_#|//g -CEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac - sed "/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # - # First, check the format of the line: - cat >"$tmp/defines.sed" <<\CEOF -/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def -/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def -b -:def -s/$/ / -s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_NAME\)[ (].*,\1define\2 "pjproject" , -s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_TARNAME\)[ (].*,\1define\2 "pjproject" , -s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_VERSION\)[ (].*,\1define\2 "1.0" , -s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_STRING\)[ (].*,\1define\2 "pjproject 1.0" , -s,^\([ #]*\)[^ ]*\([ ]*PACKAGE_BUGREPORT\)[ (].*,\1define\2 "" , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBPTHREAD\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBRT\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBNSL\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBUUID\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_M_NAME\)[ (].*,\1define\2 "i686" , -s,^\([ #]*\)[^ ]*\([ ]*PJ_POOL_ALIGNMENT\)[ (].*,\1define\2 4 , -s,^\([ #]*\)[^ ]*\([ ]*STDC_HEADERS\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_TYPES_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_SYS_STAT_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDLIB_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRING_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_MEMORY_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_STRINGS_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_INTTYPES_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_STDINT_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_UNISTD_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_LINUX\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_FLOATING_POINT\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*HAVE_LIBM\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_ARPA_INET_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_ASSERT_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_CTYPE_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_ERRNO_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_FCNTL_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_LINUX_SOCKET_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_MALLOC_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_NETDB_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_NETINET_IN_SYSTM_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_NETINET_IN_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_NETINET_IP_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_IFADDRS_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SEMAPHORE_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SETJMP_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STDARG_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STDDEF_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STDIO_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STDINT_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STDLIB_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_STRING_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_IOCTL_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_SELECT_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_SOCKET_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_TIME_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_TIMEB_H\)[ (].*,\1define\2 1 , -CEOF - sed -f "$tmp/defines.sed" $ac_file_inputs >"$tmp/out1" - # First, check the format of the line: - cat >"$tmp/defines.sed" <<\CEOF -/^[ ]*#[ ]*undef[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[ ]*$/b def -/^[ ]*#[ ]*define[ ][ ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[( ]/b def -b -:def -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SYS_TYPES_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_TIME_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_UNISTD_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_NET_IF_H\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_OS_NAME\)[ (].*,\1define\2 "i686-pc-linux-gnu" , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_ERRNO_VAR\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_HIGH_RES_TIMER\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_MALLOC\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_NATIVE_STRING_IS_UNICODE\)[ (].*,\1define\2 0 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_ATOMIC_VALUE_TYPE\)[ (].*,\1define\2 long , -s,^\([ #]*\)[^ ]*\([ ]*PJ_SOCK_HAS_INET_ATON\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_SOCK_HAS_INET_PTON\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_SOCK_HAS_INET_NTOP\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_SOCK_HAS_GETADDRINFO\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SOCKLEN_T\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_HAS_SO_ERROR\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_EMULATE_RWMUTEX\)[ (].*,\1define\2 0 , -s,^\([ #]*\)[^ ]*\([ ]*PJSIP_HAS_TLS_TRANSPORT\)[ (].*,\1define\2 1 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_SELECT_NEEDS_NFDS\)[ (].*,\1define\2 0 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_THREAD_SET_STACK_SIZE\)[ (].*,\1define\2 0 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_THREAD_ALLOCATE_STACK\)[ (].*,\1define\2 0 , -s,^\([ #]*\)[^ ]*\([ ]*PJ_BLOCKING_ERROR_VAL\)[ (].*,\1define\2 EAGAIN , -s,^\([ #]*\)[^ ]*\([ ]*PJ_BLOCKING_CONNECT_ERROR_VAL\)[ (].*,\1define\2 EINPROGRESS , -s/ $// -s,^[ #]*u.*,/* & */, -CEOF - sed -f "$tmp/defines.sed" "$tmp/out1" >"$tmp/out2" -ac_result="$tmp/out2" - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" - ;; - - - esac - -done # for ac_tag - - -{ (exit 0); exit 0; } diff --git a/sflphone-common/libs/pjproject/pjlib/include/pj/compat/m_auto.h b/sflphone-common/libs/pjproject/pjlib/include/pj/compat/m_auto.h deleted file mode 100644 index 4d4dce96418ea4b80512a1d4a3be7101373d0e78..0000000000000000000000000000000000000000 --- a/sflphone-common/libs/pjproject/pjlib/include/pj/compat/m_auto.h +++ /dev/null @@ -1,61 +0,0 @@ -/* pjlib/include/pj/compat/m_auto.h. Generated from m_auto.h.in by configure. */ -/* $Id: m_auto.h.in 2510 2009-03-13 12:15:43Z bennylp $ */ -/* - * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) - * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __PJ_COMPAT_M_AUTO_H__ -#define __PJ_COMPAT_M_AUTO_H__ - -/** - * @file m_auto.h - * @brief Automatically generated process definition file. - */ - -/* Machine name, filled in by autoconf script */ -#define PJ_M_NAME "i686" - -/* Endianness. It's reported on pjsip list on 09/02/13 that autoconf - * endianness detection failed for universal build, so special case - * for it here. Thanks Ruud Klaver for the fix. - */ -#ifdef PJ_DARWINOS -# ifdef __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else - /* Endianness, as detected by autoconf */ -/* # undef WORDS_BIGENDIAN */ -#endif - -#ifdef WORDS_BIGENDIAN -# define PJ_IS_LITTLE_ENDIAN 0 -# define PJ_IS_BIG_ENDIAN 1 -#else -# define PJ_IS_LITTLE_ENDIAN 1 -# define PJ_IS_BIG_ENDIAN 0 -#endif - - -/* Specify if floating point is present/desired */ -#define PJ_HAS_FLOATING_POINT 1 - -/* Deprecated */ -#define PJ_HAS_PENTIUM 0 - -#endif /* __PJ_COMPAT_M_AUTO_H__ */ - diff --git a/sflphone-common/libs/pjproject/pjlib/include/pj/compat/os_auto.h b/sflphone-common/libs/pjproject/pjlib/include/pj/compat/os_auto.h deleted file mode 100644 index cf51c14d8e224b3958dfbea9f8d58ba754a43770..0000000000000000000000000000000000000000 --- a/sflphone-common/libs/pjproject/pjlib/include/pj/compat/os_auto.h +++ /dev/null @@ -1,185 +0,0 @@ -/* pjlib/include/pj/compat/os_auto.h. Generated from os_auto.h.in by configure. */ -/* $Id: os_auto.h.in 2394 2008-12-23 17:27:53Z bennylp $ */ -/* - * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com) - * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __PJ_COMPAT_OS_AUTO_H__ -#define __PJ_COMPAT_OS_AUTO_H__ - -/** - * @file os_auto.h - * @brief Describes operating system specifics (automatically detected by - * autoconf) - */ - -/* Canonical OS name */ -#define PJ_OS_NAME "i686-pc-linux-gnu" - -/* Legacy macros */ -/* #undef PJ_WIN32 */ -/* #undef PJ_WIN32_WINNT */ -/* #undef WIN32_LEAN_AND_MEAN */ -/* #undef PJ_DARWINOS */ -#define PJ_LINUX 1 -/* #undef PJ_RTEMS */ -/* #undef PJ_SUNOS */ - -#if defined(PJ_WIN32_WINNT) && !defined(_WIN32_WINNT) -# define _WIN32_WINNT PJ_WIN32_WINNT -#endif - -/* Headers availability */ -#define PJ_HAS_ARPA_INET_H 1 -#define PJ_HAS_ASSERT_H 1 -#define PJ_HAS_CTYPE_H 1 -#define PJ_HAS_ERRNO_H 1 -#define PJ_HAS_FCNTL_H 1 -#define PJ_HAS_LINUX_SOCKET_H 1 -#define PJ_HAS_MALLOC_H 1 -#define PJ_HAS_NETDB_H 1 -#define PJ_HAS_NETINET_IN_SYSTM_H 1 -#define PJ_HAS_NETINET_IN_H 1 -#define PJ_HAS_NETINET_IP_H 1 -#define PJ_HAS_NET_IF_H 1 -#define PJ_HAS_IFADDRS_H 1 -#define PJ_HAS_SEMAPHORE_H 1 -#define PJ_HAS_SETJMP_H 1 -#define PJ_HAS_STDARG_H 1 -#define PJ_HAS_STDDEF_H 1 -#define PJ_HAS_STDIO_H 1 -#define PJ_HAS_STDINT_H 1 -#define PJ_HAS_STDLIB_H 1 -#define PJ_HAS_STRING_H 1 -#define PJ_HAS_SYS_IOCTL_H 1 -#define PJ_HAS_SYS_SELECT_H 1 -#define PJ_HAS_SYS_SOCKET_H 1 -#define PJ_HAS_SYS_TIME_H 1 -#define PJ_HAS_SYS_TIMEB_H 1 -#define PJ_HAS_SYS_TYPES_H 1 -#define PJ_HAS_TIME_H 1 -#define PJ_HAS_UNISTD_H 1 - -/* #undef PJ_HAS_MSWSOCK_H */ -/* #undef PJ_HAS_WINSOCK_H */ -/* #undef PJ_HAS_WINSOCK2_H */ -/* #undef PJ_HAS_WS2TCPIP_H */ - -#define PJ_SOCK_HAS_INET_ATON 1 -#define PJ_SOCK_HAS_INET_PTON 1 -#define PJ_SOCK_HAS_INET_NTOP 1 -#define PJ_SOCK_HAS_GETADDRINFO 1 - -/* On these OSes, semaphore feature depends on semaphore.h */ -#if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0 -# define PJ_HAS_SEMAPHORE 1 -#elif defined(PJ_WIN32) && PJ_WIN32!=0 -# define PJ_HAS_SEMAPHORE 1 -#else -# define PJ_HAS_SEMAPHORE 0 -#endif - -/* Do we have pthread_mutexattr_settype()? */ -/* #undef PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE */ - -/* Does pthread_mutexattr_t has "recursive" member? */ -/* #undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE */ - -/* Set 1 if native sockaddr_in has sin_len member. - * Default: 0 - */ -/* #undef PJ_SOCKADDR_HAS_LEN */ - -/* Does the OS have socklen_t? */ -#define PJ_HAS_SOCKLEN_T 1 - -#if !defined(socklen_t) && (!defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0) -# define PJ_HAS_SOCKLEN_T 1 - typedef int socklen_t; -#endif - -/** - * If this macro is set, it tells select I/O Queue that select() needs to - * be given correct value of nfds (i.e. largest fd + 1). This requires - * select ioqueue to re-scan the descriptors on each registration and - * unregistration. - * If this macro is not set, then ioqueue will always give FD_SETSIZE for - * nfds argument when calling select(). - * - * Default: 0 - */ -#define PJ_SELECT_NEEDS_NFDS 0 - -/* Is errno a good way to retrieve OS errors? - */ -#define PJ_HAS_ERRNO_VAR 1 - -/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return - * the status of non-blocking connect() operation. - */ -#define PJ_HAS_SO_ERROR 1 - -/* This value specifies the value set in errno by the OS when a non-blocking - * socket recv() can not return immediate daata. - */ -#define PJ_BLOCKING_ERROR_VAL EAGAIN - -/* This value specifies the value set in errno by the OS when a non-blocking - * socket connect() can not get connected immediately. - */ -#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS - -/* Default threading is enabled, unless it's overridden. */ -#ifndef PJ_HAS_THREADS -# define PJ_HAS_THREADS (1) -#endif - -/* Do we need high resolution timer? */ -#define PJ_HAS_HIGH_RES_TIMER 1 - -/* Is malloc() available? */ -#define PJ_HAS_MALLOC 1 - -#ifndef PJ_OS_HAS_CHECK_STACK -# define PJ_OS_HAS_CHECK_STACK 0 -#endif - -/* Unicode? */ -#define PJ_NATIVE_STRING_IS_UNICODE 0 - -/* Pool alignment in bytes */ -#define PJ_POOL_ALIGNMENT 4 - -/* The type of atomic variable value: */ -#define PJ_ATOMIC_VALUE_TYPE long - -/* If 1, use Read/Write mutex emulation for platforms that don't support it */ -#define PJ_EMULATE_RWMUTEX 0 - -/* If 1, pj_thread_create() should enforce the stack size when creating - * threads. - * Default: 0 (let OS decide the thread's stack size). - */ -#define PJ_THREAD_SET_STACK_SIZE 0 - -/* If 1, pj_thread_create() should allocate stack from the pool supplied. - * Default: 0 (let OS allocate memory for thread's stack). - */ -#define PJ_THREAD_ALLOCATE_STACK 0 - -#endif /* __PJ_COMPAT_OS_AUTO_H__ */ - diff --git a/sflphone-common/libs/pjproject/pjmedia/bin/pjmedia-test-x86_64-unknown-linux-gnu b/sflphone-common/libs/pjproject/pjmedia/bin/pjmedia-test-x86_64-unknown-linux-gnu index 867e855ceb5cda2a382d9f8351d117f87f0a0fac..8d52e7a1352ac0a2038df830bd52f4e3bdf78725 100755 Binary files a/sflphone-common/libs/pjproject/pjmedia/bin/pjmedia-test-x86_64-unknown-linux-gnu and b/sflphone-common/libs/pjproject/pjmedia/bin/pjmedia-test-x86_64-unknown-linux-gnu differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu b/sflphone-common/libs/pjproject/pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu index 87e725cfc4299d138697617d25cf97d53d29b0f1..8644d3266cbf695c11e7231dfc3c525c5600ce4e 100755 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu and b/sflphone-common/libs/pjproject/pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/auddemo b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/auddemo deleted file mode 100755 index df0c0716b7c0b96d81ae7b2d4b8890b0a63499e4..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/auddemo and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/confsample b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/confsample deleted file mode 100755 index 241d17b6014e78017fbc5356ca3f363b56a2e405..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/confsample and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/encdec b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/encdec deleted file mode 100755 index a459eb53c06e9dddf4bfe8f3a1b40549a86dc1cc..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/encdec and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/icedemo b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/icedemo deleted file mode 100755 index b2fde3eb0a1ee1d3f3c09bd70b4590bf916eae92..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/icedemo and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/jbsim b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/jbsim deleted file mode 100755 index c59a41e77b02720e76982452da56d8e14f85abe8..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/jbsim and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/latency b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/latency deleted file mode 100755 index 98878a757b8aa3f6ac8898c83bdcf18acfa00c66..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/latency and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/level b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/level deleted file mode 100755 index f1696e6bd838e219a56549906856a735b0cc62e5..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/level and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/mix b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/mix deleted file mode 100755 index b97cd6347675b7ac3a4abbafe984ed8d656a6648..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/mix and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pcaputil b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pcaputil deleted file mode 100755 index 2c3b95d38fdb4c18a303d826c127b2604c44cb54..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pcaputil and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pjsip-perf b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pjsip-perf deleted file mode 100755 index a1fe6016414b63439d4f7a0d24056e07f3de2a2e..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/pjsip-perf and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playfile b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playfile deleted file mode 100755 index 0cac592e896c4a2d0608d461f659099176f55d43..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playfile and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playsine b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playsine deleted file mode 100755 index 84712fa583892b6219dfe8d25f5fc89a923c7d33..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/playsine and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/recfile b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/recfile deleted file mode 100755 index 859b70f259ad7e113ad1bf95aac54a0fd298233c..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/recfile and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/resampleplay b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/resampleplay deleted file mode 100755 index 3ad17da993028b9c6443c4cb416a8fca8c0b46cb..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/resampleplay and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simple_pjsua b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simple_pjsua deleted file mode 100755 index cbc5efd4a074b1ffb69d4bdd45480e70385ddf2c..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simple_pjsua and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simpleua b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simpleua deleted file mode 100755 index e91d5c98603a833402ffa013cbad6528400b507d..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/simpleua and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/siprtp b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/siprtp deleted file mode 100755 index 706f3da0a1abde5ed81d46a8de3aec09e768c360..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/siprtp and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/sipstateless b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/sipstateless deleted file mode 100755 index 80c1ceb0f3e81293b68b7e54bfb0177f9772c190..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/sipstateless and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateful_proxy b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateful_proxy deleted file mode 100755 index d81b74c5a388e0b1f8248f4b2f1079729438c32f..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateful_proxy and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateless_proxy b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateless_proxy deleted file mode 100755 index c4818d49a6e4f7f9a6148b3bafe6e49c66278f05..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stateless_proxy and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stereotest b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stereotest deleted file mode 100755 index 48d2cb9d29d85e3fe06d3160478351c1de5cc2ce..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/stereotest and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/streamutil b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/streamutil deleted file mode 100755 index d75839500e29e409ece938dd2cf92c5801168fa2..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/streamutil and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/strerror b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/strerror deleted file mode 100755 index 9ae95e6a81673b759e1243210bb48319e1d55515..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/strerror and /dev/null differ diff --git a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/tonegen b/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/tonegen deleted file mode 100755 index 8b1b0b29ad70d1d356102fb46ec8a8055f77200b..0000000000000000000000000000000000000000 Binary files a/sflphone-common/libs/pjproject/pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/tonegen and /dev/null differ diff --git a/sflphone-common/src/audio/alsa/alsalayer.cpp b/sflphone-common/src/audio/alsa/alsalayer.cpp index 16ebe977e065258e8ffa4a2b3d840535b4b4ac70..940616d96ff3ba2c364c5a342ce3dfdeb6c66ba0 100644 --- a/sflphone-common/src/audio/alsa/alsalayer.cpp +++ b/sflphone-common/src/audio/alsa/alsalayer.cpp @@ -38,6 +38,7 @@ AlsaLayer::AlsaLayer (ManagerImpl* manager) , _is_open_playback (false) , _is_open_capture (false) , _trigger_request (false) + , _converterSamplingRate(0) { _debug (" Constructor of AlsaLayer called\n"); @@ -52,6 +53,10 @@ AlsaLayer::~AlsaLayer (void) { _debug ("Destructor of AlsaLayer called\n"); closeLayer(); + + if(_converter) { + delete _converter; _converter = NULL; + } } bool @@ -99,7 +104,7 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize, _indexOut = indexOut; - _sampleRate = sampleRate; + _audioSampleRate = sampleRate; _frameSize = frameSize; @@ -111,7 +116,7 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize, _debugAlsa (" : nb channel in=%2d, out=%2d\n", _inChannel, _outChannel); - _debugAlsa (" : sample rate=%5d, format=%s\n", _sampleRate, SFLDataFormatString); + _debugAlsa (" : sample rate=%5d, format=%s\n", _audioSampleRate, SFLDataFormatString); ost::MutexLock lock (_mutex); @@ -119,6 +124,8 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize, std::string pcmc = buildDeviceTopo (PCM_PLUGHW , indexIn , 0); + _converter = new SamplerateConverter (_audioSampleRate, _frameSize); + return open_device (pcmp , pcmc , stream); } @@ -715,28 +722,33 @@ AlsaLayer::soundCardGetIndex (std::string description) void AlsaLayer::audioCallback (void) { - int toGet, urgentAvail, normalAvail, maxBytes; + int toGet, urgentAvailBytes, normalAvailBytes, maxBytes; unsigned short spkrVolume, micVolume; AudioLoop *tone; SFLDataFormat *out; + SFLDataFormat *rsmpl_out; spkrVolume = _manager->getSpkrVolume(); micVolume = _manager->getMicVolume(); + // AvailForGet tell the number of chars inside the buffer // framePerBuffer are the number of data for one channel (left) - urgentAvail = _urgentRingBuffer.AvailForGet(); - if (urgentAvail > 0) { + urgentAvailBytes = _urgentRingBuffer.AvailForGet(); + if (urgentAvailBytes > 0) { // Urgent data (dtmf, incoming call signal) come first. - toGet = (urgentAvail < (int) (framesPerBufferAlsa * sizeof (SFLDataFormat))) ? urgentAvail : framesPerBufferAlsa * sizeof (SFLDataFormat); + toGet = (urgentAvailBytes < (int) (framesPerBufferAlsa * sizeof (SFLDataFormat))) ? urgentAvailBytes : framesPerBufferAlsa * sizeof (SFLDataFormat); out = (SFLDataFormat*) malloc (toGet * sizeof (SFLDataFormat)); _urgentRingBuffer.Get (out, toGet, spkrVolume); + /* Play the sound */ write (out, toGet); + free (out); out=0; + // Consume the regular one as well (same amount of bytes) _mainBuffer.discard (toGet); @@ -752,39 +764,92 @@ void AlsaLayer::audioCallback (void) tone->getNext (out, toGet, spkrVolume); write (out , maxBytes); + free(out); + out = 0; + } else if ( (tone=_manager->getTelephoneFile()) != 0) { out = (SFLDataFormat*) malloc (maxBytes * sizeof (SFLDataFormat)); tone->getNext (out, toGet, spkrVolume); write (out , maxBytes); + free(out); + out = 0; + } else { - // If nothing urgent, play the regular sound samples - normalAvail = _mainBuffer.availForGet(); - toGet = (normalAvail < (int) (framesPerBufferAlsa * sizeof (SFLDataFormat))) ? normalAvail : framesPerBufferAlsa * sizeof (SFLDataFormat); - out = (SFLDataFormat*) malloc (framesPerBufferAlsa * sizeof (SFLDataFormat)); - if (toGet) { + // If nothing urgent, play the regular sound samples + + int _mainBufferSampleRate = getMainBuffer()->getInternalSamplingRate(); + int maxNbSamplesToGet = 0; + int maxNbBytesToGet = 0; + + // Compute maximal value to get into the ring buffer + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + double upsampleFactor = (double) _audioSampleRate / _mainBufferSampleRate; + + maxNbSamplesToGet = (int) ((double) framesPerBufferAlsa / upsampleFactor); + + + } else { + + maxNbSamplesToGet = framesPerBufferAlsa; + + } + + maxNbBytesToGet = maxNbSamplesToGet * sizeof(SFLDataFormat); + + normalAvailBytes = _mainBuffer.availForGet(); + toGet = (normalAvailBytes < (int)maxNbBytesToGet) ? normalAvailBytes : maxNbBytesToGet; + + out = (SFLDataFormat*) malloc (maxNbBytesToGet); + + if (normalAvailBytes) { _mainBuffer.getData(out, toGet, spkrVolume); - write (out, toGet); + + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + + rsmpl_out = (SFLDataFormat*) malloc (framesPerBufferAlsa * sizeof (SFLDataFormat)); + + // Do sample rate conversion + int nb_sample_down = toGet / sizeof(SFLDataFormat); + + + int nbSample = _converter->upsampleData((SFLDataFormat*)out, rsmpl_out, _mainBufferSampleRate, _audioSampleRate, nb_sample_down); + + + + write (rsmpl_out, nbSample*sizeof(SFLDataFormat)); + + free(rsmpl_out); + rsmpl_out = 0; + + } else { + + write (out, toGet); + + } } else { - bzero (out, framesPerBufferAlsa * sizeof (SFLDataFormat)); + bzero (out, maxNbBytesToGet); } _urgentRingBuffer.Discard (toGet); - } - free (out); + free (out); + out = 0; + + } - out=0; } // Additionally handle the mic's audio stream - int micAvailAlsa; + int micAvailBytes; int micAvailPut; int toPut; SFLDataFormat* in; @@ -794,19 +859,46 @@ void AlsaLayer::audioCallback (void) in = 0; if(is_capture_running()) { - micAvailAlsa = snd_pcm_avail_update(_CaptureHandle); - if(micAvailAlsa > 0) + + micAvailBytes = snd_pcm_avail_update(_CaptureHandle); + + if(micAvailBytes > 0) { micAvailPut = _mainBuffer.availForPut(); - toPut = (micAvailAlsa <= micAvailPut) ? micAvailAlsa : micAvailPut; + toPut = (micAvailBytes <= micAvailPut) ? micAvailBytes : micAvailPut; in = (SFLDataFormat*)malloc(toPut * sizeof(SFLDataFormat)); toPut = read (in, toPut* sizeof(SFLDataFormat)); if (in != 0) { - _mainBuffer.putData(in, toPut, 100); + int _mainBufferSampleRate = getMainBuffer()->getInternalSamplingRate(); + + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + SFLDataFormat* rsmpl_out = (SFLDataFormat*) malloc (framesPerBufferAlsa * sizeof (SFLDataFormat)); + + int nbSample = toPut / sizeof(SFLDataFormat); + int nb_sample_up = nbSample; + + nbSample = _converter->downsampleData ((SFLDataFormat*)in, rsmpl_out, _mainBufferSampleRate, _audioSampleRate, nb_sample_up); + + _mainBuffer.putData(rsmpl_out, nbSample * sizeof (SFLDataFormat), 100); + + free(rsmpl_out); + rsmpl_out = 0; + + } else { + + _mainBuffer.putData(in, toPut, 100); + } } free(in); in=0; } + /* + else if(micAvailAlsa < 0) + { + _debug("AlsaLayer::audioCallback (mic): error: %s\n", snd_strerror(micAvailAlsa)); + } + */ } } diff --git a/sflphone-common/src/audio/alsa/alsalayer.h b/sflphone-common/src/audio/alsa/alsalayer.h index 4203228aaf79aef0c349db9e086a99157d54a7ef..aa827afe262a108ef2d2d8b76360d80a731a0d31 100644 --- a/sflphone-common/src/audio/alsa/alsalayer.h +++ b/sflphone-common/src/audio/alsa/alsalayer.h @@ -21,6 +21,7 @@ #define _ALSA_LAYER_H #include "audio/audiolayer.h" +#include "audio/samplerateconverter.h" #include "eventthread.h" #include <alsa/asoundlib.h> @@ -265,6 +266,11 @@ class AlsaLayer : public AudioLayer { AudioThread *_audioThread; + /** Sample rate converter object */ + SamplerateConverter * _converter; + + int _converterSamplingRate; + }; #endif // _ALSA_LAYER_H_ diff --git a/sflphone-common/src/audio/audiolayer.h b/sflphone-common/src/audio/audiolayer.h index 816306221e0909d1c2dacee9e7dc7bdad16d0c02..44fc3036f2fe9930f0c5fb3100295b5bbb795b57 100644 --- a/sflphone-common/src/audio/audiolayer.h +++ b/sflphone-common/src/audio/audiolayer.h @@ -63,7 +63,7 @@ class AudioLayer { , _urgentRingBuffer( SIZEBUF, default_id ) , _indexIn ( 0 ) , _indexOut ( 0 ) - , _sampleRate ( 0 ) + , _audioSampleRate ( 0 ) , _frameSize ( 0 ) , _inChannel( 1 ) , _outChannel ( 1 ) @@ -184,7 +184,7 @@ class AudioLayer { * @return unsigned int The sample rate * default: 44100 HZ */ - unsigned int getSampleRate() { return _sampleRate; } + unsigned int getSampleRate() { return _audioSampleRate; } /** * Get the frame size of the audio layer @@ -277,7 +277,7 @@ class AudioLayer { * Sample Rate SFLphone should send sound data to the sound card * The value can be set in the user config file- now: 44100HZ */ - unsigned int _sampleRate; + unsigned int _audioSampleRate; /** * Length of the sound frame we capture or read in ms diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.h b/sflphone-common/src/audio/audiortp/AudioRtpSession.h index 6fb54b53ca91b66f03de2cee764f54ecef6a391b..221ce297d4c37996abdecde9d4a03252487140b8 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.h @@ -81,8 +81,8 @@ namespace sfl { inline float computeCodecFrameSize (int codecSamplePerFrame, int codecClockRate) { return ( (float) codecSamplePerFrame * 1000.0) / (float) codecClockRate; } - inline int computeNbByteAudioLayer (float codecFrameSize) { - return (int) ( (float) _layerSampleRate * codecFrameSize * (float) sizeof (SFLDataFormat) / 1000.0); + int computeNbByteAudioLayer (float codecFrameSize) { + return (int) ( ((float) converterSamplingRate * codecFrameSize * sizeof(SFLDataFormat))/ 1000.0); } void sendMicData(int timestamp); @@ -147,6 +147,8 @@ namespace sfl { * Manager instance. */ ManagerImpl * _manager; + + int converterSamplingRate; protected: SIPCall * _ca; @@ -199,7 +201,7 @@ namespace sfl { throw; } - _debug("Unbind audio RTP stream for call id %i\n", _ca->getCallId().c_str()); + _debug("Unbind audio RTP stream for call id %s\n", _ca->getCallId().c_str()); _audiolayer->getMainBuffer()->unBindAll(_ca->getCallId()); delete [] _micData; @@ -215,8 +217,17 @@ namespace sfl { template <typename D> void AudioRtpSession<D>::initBuffers() { - _converter = new SamplerateConverter (_layerSampleRate , _layerFrameSize); - int nbSamplesMax = (int) (_layerSampleRate * _layerFrameSize /1000); + // Set sampling rate, main buffer choose the highest one + _audiolayer->getMainBuffer()->setInternalSamplingRate(_codecSampleRate); + + // may be different than one already setted + converterSamplingRate = _audiolayer->getMainBuffer()->getInternalSamplingRate(); + + // initialize SampleRate converter using AudioLayer's sampling rate + // (internal buffers initialized with maximal sampling rate and frame size) + _converter = new SamplerateConverter(_layerSampleRate, _layerFrameSize); + + int nbSamplesMax = (int)(_codecSampleRate * _layerFrameSize /1000)*2; _micData = new SFLDataFormat[nbSamplesMax]; _micDataConverted = new SFLDataFormat[nbSamplesMax]; _micDataEncoded = new unsigned char[nbSamplesMax]; @@ -298,7 +309,9 @@ namespace sfl { { assert(_audiocodec); assert(_audiolayer); - + + int _mainBufferSampleRate = _audiolayer->getMainBuffer()->getInternalSamplingRate(); + // compute codec framesize in ms float fixed_codec_framesize = computeCodecFrameSize (_audiocodec->getFrameSize(), _audiocodec->getClockRate()); @@ -321,11 +334,13 @@ namespace sfl { int compSize = 0; // test if resampling is required - if (_audiocodec->getClockRate() != _layerSampleRate) { + if (_audiocodec->getClockRate() != _mainBufferSampleRate) { int nb_sample_up = nbSample; _nSamplesMic = nbSample; - nbSample = _converter->downsampleData (_micData , _micDataConverted , _audiocodec->getClockRate(), _layerSampleRate , nb_sample_up); + nbSample = _converter->downsampleData (_micData , _micDataConverted , _audiocodec->getClockRate(), _mainBufferSampleRate, nb_sample_up); + compSize = _audiocodec->codecEncode (_micDataEncoded, _micDataConverted, nbSample*sizeof (int16)); + } else { // no resampling required compSize = _audiocodec->codecEncode (_micDataEncoded, _micData, nbSample*sizeof (int16)); @@ -337,7 +352,12 @@ namespace sfl { template <typename D> void AudioRtpSession<D>::processDataDecode(unsigned char * spkrData, unsigned int size, int& countTime) { + if (_audiocodec != NULL) { + + + int _mainBufferSampleRate = _audiolayer->getMainBuffer()->getInternalSamplingRate(); + // Return the size of data in bytes int expandedSize = _audiocodec->codecDecode (_spkrDataDecoded , spkrData , size); @@ -345,23 +365,27 @@ namespace sfl { int nbSample = expandedSize / sizeof (SFLDataFormat); // test if resampling is required - if (_audiocodec->getClockRate() != _layerSampleRate) { + if (_audiocodec->getClockRate() != _mainBufferSampleRate) { // Do sample rate conversion int nb_sample_down = nbSample; - nbSample = _converter->upsampleData (_spkrDataDecoded, _spkrDataConverted, _codecSampleRate, _layerSampleRate , nb_sample_down); + + nbSample = _converter->upsampleData (_spkrDataDecoded, _spkrDataConverted, _codecSampleRate, _mainBufferSampleRate, nb_sample_down); + // Store the number of samples for recording _nSamplesSpkr = nbSample; // put data in audio layer, size in byte _audiolayer->getMainBuffer()->putData (_spkrDataConverted, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId()); + } else { // Store the number of samples for recording _nSamplesSpkr = nbSample; + // put data in audio layer, size in byte - _audiolayer->getMainBuffer()->putData (_spkrDataConverted, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId()); + _audiolayer->getMainBuffer()->putData (_spkrDataDecoded, expandedSize, 100, _ca->getCallId()); } // Notify (with a beep) an incoming call when there is already a call @@ -447,12 +471,13 @@ namespace sfl { template <typename D> void AudioRtpSession<D>::run () { - initBuffers(); setSessionTimeouts(); setDestinationIpAddress(); setSessionMedia(); + initBuffers(); + int sessionWaiting; int timestep = _codecFrameSize; int timestamp = static_cast<D*>(this)->getCurrentTimestamp(); // for mic @@ -478,6 +503,9 @@ namespace sfl { _debug ("Entering RTP mainloop for callid %s\n",_ca->getCallId().c_str()); while (!testCancel()) { + + converterSamplingRate = _audiolayer->getMainBuffer()->getInternalSamplingRate(); + // Send session sessionWaiting = static_cast<D*>(this)->isWaiting(); diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp index 5961b170e279708a472f6f3509f060f70088aa25..adfcd25531289ec2275eaf875dcc8e32cf655380 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp @@ -48,7 +48,21 @@ void AudioZrtpSession::initializeZid (void) throw ZrtpZidException(); } - std::string zidCompleteFilename = std::string (HOMEDIR) + DIR_SEPARATOR_STR + "." + PROGDIR + "/" + _zidFilename; + std::string zidCompleteFilename; + + // xdg_config = std::string (HOMEDIR) + DIR_SEPARATOR_STR + ".cache/sflphone"; + + std::string xdg_config = std::string (HOMEDIR) + DIR_SEPARATOR_STR + ".cache" + DIR_SEPARATOR_STR + PROGDIR + "/" + _zidFilename; + + _debug(" xdg_config %s\n", xdg_config.c_str()); + + if (XDG_CACHE_HOME != NULL) { + std::string xdg_env = std::string (XDG_CACHE_HOME) + _zidFilename; + _debug(" xdg_env %s\n", xdg_env.c_str()); + (xdg_env.length() > 0) ? zidCompleteFilename = xdg_env : zidCompleteFilename = xdg_config; + } else + zidCompleteFilename = xdg_config; + if (initialize (zidCompleteFilename.c_str()) >= 0) { _debug ("Register callbacks\n"); diff --git a/sflphone-common/src/audio/codecs/speexcodec_nb.cpp b/sflphone-common/src/audio/codecs/speexcodec_nb.cpp index 2481a8be5b7fb17a3d1d4f72aae2775035ba7d6f..4acae5723118ca6e9b4c54335cab02e3f32442a0 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_nb.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_nb.cpp @@ -66,6 +66,8 @@ class Speex : public AudioCodec speex_decoder_ctl (_speex_dec_state, SPEEX_GET_FRAME_SIZE, &_speex_frame_size); + + #ifdef HAVE_SPEEXDSP_LIB int enable = 1; @@ -113,7 +115,8 @@ class Speex : public AudioCodec speex_bits_read_from (&_speex_dec_bits, (char*) src, size); speex_decode_int (_speex_dec_state, &_speex_dec_bits, dst); - return _speex_frame_size * ratio; + // return size in bytes + return _frameSize * 2; } virtual int codecEncode (unsigned char *dst, short *src, unsigned int size) { diff --git a/sflphone-common/src/audio/codecs/speexcodec_ub.cpp b/sflphone-common/src/audio/codecs/speexcodec_ub.cpp index 50f33a1824cb43b8385a0697192449d96de365e5..4a9fec31c88b8ac3197a148b368eeb3e460d7dcc 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_ub.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_ub.cpp @@ -37,7 +37,7 @@ class Speex : public AudioCodec _speex_frame_size(), _preprocess_state() { _clockRate = 32000; - _frameSize = 320; // 10 ms at 32 kHz + _frameSize = 640; // 20 ms at 32 kHz _channel = 1; _bitrate = 0; _bandwidth = 0; @@ -80,10 +80,10 @@ class Speex : public AudioCodec speex_encoder_ctl (_speex_enc_state, SPEEX_SET_COMPLEXITY, &complex); // Init the decoder struct - speex_decoder_ctl (_speex_dec_state, SPEEX_GET_FRAME_SIZE, &_speex_frame_size); + speex_decoder_ctl (_speex_dec_state, SPEEX_GET_FRAME_SIZE, &_frameSize); // Init the preprocess struct - _preprocess_state = speex_preprocess_state_init (_speex_frame_size,_clockRate); + _preprocess_state = speex_preprocess_state_init (_frameSize,_clockRate); speex_preprocess_ctl (_preprocess_state, SPEEX_PREPROCESS_SET_DENOISE, &enable); speex_preprocess_ctl (_preprocess_state, SPEEX_PREPROCESS_SET_NOISE_SUPPRESS, &attenuation); speex_preprocess_ctl (_preprocess_state, SPEEX_PREPROCESS_SET_VAD, &enable); @@ -115,7 +115,7 @@ class Speex : public AudioCodec speex_decode_int (_speex_dec_state, &_speex_dec_bits, dst); // return the nuber of byte, not the number of sample - return _speex_frame_size * 2; + return _frameSize * 2; } virtual int codecEncode (unsigned char *dst, short *src, unsigned int size) { diff --git a/sflphone-common/src/audio/codecs/speexcodec_wb.cpp b/sflphone-common/src/audio/codecs/speexcodec_wb.cpp index 7d8fcd679fef28d694c95b4a449b270cb0433c17..3b008a4ca07c841e1feb002f9af9cea64a9b0129 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_wb.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_wb.cpp @@ -114,7 +114,8 @@ class Speex : public AudioCodec speex_bits_read_from (&_speex_dec_bits, (char*) src, size); speex_decode_int (_speex_dec_state, &_speex_dec_bits, dst); - return 2 * _speex_frame_size * ratio; + // return size in bytes + return _frameSize * 2; } virtual int codecEncode (unsigned char *dst, short *src, unsigned int size) { diff --git a/sflphone-common/src/audio/mainbuffer.cpp b/sflphone-common/src/audio/mainbuffer.cpp index fb88bc5a6f2d41f220eb52708a35a72edcd0333d..485698bdba23f4d482cf24e58f8b5b988daad929 100644 --- a/sflphone-common/src/audio/mainbuffer.cpp +++ b/sflphone-common/src/audio/mainbuffer.cpp @@ -20,7 +20,7 @@ #include "mainbuffer.h" -MainBuffer::MainBuffer() +MainBuffer::MainBuffer() : _internalSamplingRate(0) { mixBuffer = new SFLDataFormat[STATIC_BUFSIZE]; } @@ -29,23 +29,35 @@ MainBuffer::MainBuffer() MainBuffer::~MainBuffer() { - delete mixBuffer; + delete [] mixBuffer; mixBuffer = NULL; } -CallIDSet* MainBuffer::getCallIDSet(CallID call_id) + +void MainBuffer::setInternalSamplingRate(int sr) { + ost::MutexLock guard (_mutex); + + if (sr != _internalSamplingRate) + { + // flushAllBuffers(); + _internalSamplingRate = sr; - // _debug("MainBuffer::getCallIDSet\n"); + flushAllBuffers(); - CallIDMap::iterator iter = _callIDMap.find(call_id); - if (iter == _callIDMap.end()) - { - // _debug("CallIDSet with ID: \"%s\" doesn't exist! \n", call_id.c_str()); - return NULL; } - else + + // flushAllBuffers(); +} + +CallIDSet* MainBuffer::getCallIDSet(CallID call_id) +{ + + CallIDMap::iterator iter = _callIDMap.find(call_id); + if (iter != _callIDMap.end()) return iter->second; + else + return NULL; } @@ -287,7 +299,6 @@ int MainBuffer::putData(void *buffer, int toCopy, unsigned short volume, CallID if (ring_buffer == NULL) { - // _debug("Input RingBuffer ID: \"%s\" does not exist!\n", call_id.c_str()); return 0; } @@ -297,14 +308,14 @@ int MainBuffer::putData(void *buffer, int toCopy, unsigned short volume, CallID a = ring_buffer->AvailForPut(); if (a >= toCopy) { + return ring_buffer->Put (buffer, toCopy, volume); + } else { - // _debug ("Chopping sound, Ouch! RingBuffer full ?\n"); + return ring_buffer->Put (buffer, a, volume); } - return 0; - } int MainBuffer::availForPut(CallID call_id) @@ -326,8 +337,6 @@ int MainBuffer::getData(void *buffer, int toCopy, unsigned short volume, CallID { ost::MutexLock guard (_mutex); - // _debug("MainBuffer::getData by \"%s\", toCopy %i\n",call_id.c_str(), toCopy); - CallIDSet* callid_set = getCallIDSet(call_id); int nbSmplToCopy = toCopy / sizeof(SFLDataFormat); @@ -337,18 +346,16 @@ int MainBuffer::getData(void *buffer, int toCopy, unsigned short volume, CallID if(callid_set->empty()) { - // _debug("CallIDSet with ID: \"%s\" is empty!\n", call_id.c_str()); return 0; } if (callid_set->size() == 1) { - // _debug("callid_set->size() == %i\n", callid_set->size()); + CallIDSet::iterator iter_id = callid_set->begin(); if (iter_id != callid_set->end()) { - // _debug("MainBuffer::getData in buffer %s by %s \n", (*iter_id).c_str(), call_id.c_str()); return getDataByID(buffer, toCopy, volume, *iter_id, call_id); } else @@ -357,22 +364,18 @@ int MainBuffer::getData(void *buffer, int toCopy, unsigned short volume, CallID else { - // _debug("callid_set->size() == %i\n", callid_set->size()); - for (int k = 0; k < nbSmplToCopy; k++) { ((SFLDataFormat*)(buffer))[k] = 0; } - int size; - // _debug("CallIDSet with ID: \"%s\" is a conference!\n", call_id.c_str()); - CallIDSet::iterator iter_id; - for(iter_id = callid_set->begin(); iter_id != callid_set->end(); iter_id++) + int size = 0; + + CallIDSet::iterator iter_id = callid_set->begin(); + while(iter_id != callid_set->end()) { - // _debug("MainBuffer::getData in buffer %s by %s \n", (*iter_id).c_str(), call_id.c_str()); size = getDataByID(mixBuffer, toCopy, volume, (CallID)(*iter_id), call_id); - // _debug("MainBuffer::getData: tocopy %i, size: %i \n", toCopy, size); if (size > 0) { @@ -381,9 +384,9 @@ int MainBuffer::getData(void *buffer, int toCopy, unsigned short volume, CallID ((SFLDataFormat*)(buffer))[k] += mixBuffer[k]; } } + + iter_id++; } - - // _debug("MainBuffer::getData data mixed successfully\n"); return size; } @@ -432,8 +435,6 @@ int MainBuffer::availForGet(CallID call_id) // _debug("MainBuffer::availForGet availForGetByID(%s,%s)\n", (*iter_id).c_str(), call_id.c_str()); if((call_id != default_id) && (*iter_id == call_id)) { - _debug("**********************************************************************\n"); - _debug("Error an RTP session ring buffer is not supposed to have a readpointer on tiself\n"); _debug("This problem should not occur since we have %i element\n", callid_set->size()); } // else @@ -448,10 +449,10 @@ int MainBuffer::availForGet(CallID call_id) for(iter_id = callid_set->begin(); iter_id != callid_set->end(); iter_id++) { nb_bytes = availForGetByID(*iter_id, call_id); - if (nb_bytes < avail_bytes) + if ((nb_bytes != 0) && (nb_bytes < avail_bytes)) avail_bytes = nb_bytes; } - return avail_bytes; + return avail_bytes != 99999 ? avail_bytes : 0; } } @@ -581,3 +582,49 @@ void MainBuffer::flushByID(CallID call_id, CallID reader_id) if(ringbuffer != NULL) ringbuffer->flush(reader_id); } + + +void MainBuffer::flushAllBuffers() +{ + RingBufferMap::iterator iter_buffer = _ringBufferMap.begin(); + + while(iter_buffer != _ringBufferMap.end()) + { + iter_buffer->second->flushAll(); + + iter_buffer++; + } +} + + +void MainBuffer::stateInfo() +{ + _debug("MainBuffer state info\n"); + + CallIDMap::iterator iter_map = _callIDMap.begin(); + + while(iter_map != _callIDMap.end()) + { + CallIDSet* id_set = getCallIDSet(iter_map->first); + + std::string dbg_str(" Buffer: "); + + dbg_str.append(string(iter_map->first.c_str())); + dbg_str.append(string(" bound to ")); + + if(id_set != NULL) + { + CallIDSet::iterator iter_set = id_set->begin(); + + while(iter_set != id_set->end()) + { + dbg_str.append(string(iter_set->c_str())); + dbg_str.append(string(", ")); + } + } + + _debug("%s\n", dbg_str.c_str()); + + iter_map++; + } +} diff --git a/sflphone-common/src/audio/mainbuffer.h b/sflphone-common/src/audio/mainbuffer.h index ed122e207461183a114a59920c0281791e94f5d0..f8759ab534abec779f13381d0dc2b129a76ca567 100644 --- a/sflphone-common/src/audio/mainbuffer.h +++ b/sflphone-common/src/audio/mainbuffer.h @@ -24,6 +24,7 @@ #include <map> #include <set> #include <cc++/thread.h> // for ost::Mutex +#include <string> #include "../global.h" #include "../call.h" @@ -45,6 +46,10 @@ public: ~MainBuffer(); + void setInternalSamplingRate(int sr); + + int getInternalSamplingRate() {return _internalSamplingRate;} + CallIDSet* getCallIDSet(CallID call_id); bool createCallIDSet(CallID set_id); @@ -77,8 +82,12 @@ public: void flush(CallID call_id = default_id); + void flushAllBuffers(); + void flushDefault(); + void stateInfo(); + private: RingBuffer* getRingBuffer(CallID call_id); @@ -99,6 +108,8 @@ public: ost::Mutex _mutex; + int _internalSamplingRate; + public: friend class MainBufferTest; diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp index bc83dcc6261d7fe3e9eb306a15f93c6c13483ba9..47e0090d637d509d04da10f6c9ab0ece979d111e 100644 --- a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp +++ b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp @@ -47,6 +47,10 @@ PulseLayer::PulseLayer (ManagerImpl* manager) PulseLayer::~PulseLayer (void) { closeLayer (); + + if (_converter) { + delete _converter; _converter = NULL; + } } bool @@ -210,7 +214,7 @@ bool PulseLayer::openDevice (int indexIn UNUSED, int indexOut UNUSED, int sample { _debug ("PulseLayer::openDevice \n"); - _sampleRate = sampleRate; + _audioSampleRate = sampleRate; _frameSize = frameSize; m = pa_threaded_mainloop_new(); @@ -230,6 +234,8 @@ bool PulseLayer::openDevice (int indexIn UNUSED, int indexOut UNUSED, int sample // startStream(); + _converter = new SamplerateConverter (_audioSampleRate, _frameSize); + _debug ("Connection Done!! \n"); return true; @@ -345,20 +351,20 @@ void PulseLayer::processData (void) void PulseLayer::writeToSpeaker (void) { /** Bytes available in the urgent ringbuffer ( reserved for DTMF ) */ - int urgentAvail; + int urgentAvailBytes; /** Bytes available in the regular ringbuffer ( reserved for voice ) */ - int normalAvail; + int normalAvailBytes; int toGet; int toPlay; SFLDataFormat* out;// = (SFLDataFormat*)pa_xmalloc(framesPerBuffer); - urgentAvail = _urgentRingBuffer.AvailForGet(); + urgentAvailBytes = _urgentRingBuffer.AvailForGet(); - if (urgentAvail > 0) { + if (urgentAvailBytes > 0) { // Urgent data (dtmf, incoming call signal) come first. //_debug("Play urgent!: %i\e" , urgentAvail); - toGet = (urgentAvail < (int) (framesPerBuffer * sizeof (SFLDataFormat))) ? urgentAvail : framesPerBuffer * sizeof (SFLDataFormat); + toGet = (urgentAvailBytes < (int) (framesPerBuffer * sizeof (SFLDataFormat))) ? urgentAvailBytes : framesPerBuffer * sizeof (SFLDataFormat); out = (SFLDataFormat*) pa_xmalloc (toGet * sizeof (SFLDataFormat)); _urgentRingBuffer.Get (out, toGet, 100); pa_stream_write (playback->pulseStream(), out, toGet, NULL, 0, PA_SEEK_RELATIVE); @@ -393,24 +399,64 @@ void PulseLayer::writeToSpeaker (void) } else { - out = (SFLDataFormat*) pa_xmalloc (framesPerBuffer * sizeof (SFLDataFormat)); - normalAvail = _mainBuffer.availForGet(); - toGet = (normalAvail < (int) (framesPerBuffer * sizeof (SFLDataFormat))) ? normalAvail : framesPerBuffer * sizeof (SFLDataFormat); + int _mainBufferSampleRate = getMainBuffer()->getInternalSamplingRate(); + int maxNbSamplesToGet = 0; + int maxNbBytesToGet = 0; + + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + double upsampleFactor = (double) _mainBufferSampleRate / _audioSampleRate; + + maxNbSamplesToGet = (int) ((double) framesPerBuffer * upsampleFactor); + + } else { + + maxNbSamplesToGet = framesPerBuffer; + + } + + maxNbBytesToGet = maxNbSamplesToGet * sizeof(SFLDataFormat); + + out = (SFLDataFormat*) pa_xmalloc (maxNbBytesToGet); + normalAvailBytes = _mainBuffer.availForGet(); + + toGet = (normalAvailBytes < (int)(maxNbBytesToGet)) ? normalAvailBytes : maxNbBytesToGet; if (toGet) { _mainBuffer.getData (out, toGet, 100); - pa_stream_write (playback->pulseStream(), out, toGet, NULL, 0, PA_SEEK_RELATIVE); + + // test if resampling is required + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + SFLDataFormat* rsmpl_out = (SFLDataFormat*) pa_xmalloc (framesPerBuffer * sizeof (SFLDataFormat)); + + // Do sample rate conversion + int nb_sample_down = toGet / sizeof(SFLDataFormat); + + + int nbSample = _converter->upsampleData((SFLDataFormat*)out, rsmpl_out, _mainBufferSampleRate, _audioSampleRate, nb_sample_down); + + pa_stream_write (playback->pulseStream(), rsmpl_out, nbSample*sizeof(SFLDataFormat), NULL, 0, PA_SEEK_RELATIVE); + + pa_xfree (rsmpl_out); + + } else { + + pa_stream_write (playback->pulseStream(), out, toGet, NULL, 0, PA_SEEK_RELATIVE); + + } } else { - bzero (out, framesPerBuffer * sizeof (SFLDataFormat)); + bzero (out, maxNbBytesToGet); } + _urgentRingBuffer.Discard(toGet); + pa_xfree (out); } - _urgentRingBuffer.Discard(toGet); } } @@ -425,7 +471,34 @@ void PulseLayer::readFromMic (void) } if (data != 0) { - _mainBuffer.putData ( (void*) data ,r, 100); + + int _mainBufferSampleRate = getMainBuffer()->getInternalSamplingRate(); + + // test if resampling is required + if (_mainBufferSampleRate && ((int)_audioSampleRate != _mainBufferSampleRate)) { + + + SFLDataFormat* rsmpl_out = (SFLDataFormat*) pa_xmalloc (framesPerBuffer * sizeof (SFLDataFormat)); + + int nbSample = r / sizeof(SFLDataFormat); + int nb_sample_up = nbSample; + + + nbSample = _converter->downsampleData ((SFLDataFormat*)data, rsmpl_out, _mainBufferSampleRate, _audioSampleRate, nb_sample_up); + + + _mainBuffer.putData ( (void*) rsmpl_out, nbSample*sizeof(SFLDataFormat), 100); + + pa_xfree (rsmpl_out); + + } else { + + // no resampling required + _mainBuffer.putData ( (void*) data, r, 100); + } + + + } if (pa_stream_drop (record->pulseStream()) < 0) { diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.h b/sflphone-common/src/audio/pulseaudio/pulselayer.h index dd21b66c0b19a29a0b08610123d679b4802c1bd9..3fd54cec7d2719a5a714f3d8512c2fe5355807cf 100644 --- a/sflphone-common/src/audio/pulseaudio/pulselayer.h +++ b/sflphone-common/src/audio/pulseaudio/pulselayer.h @@ -21,6 +21,7 @@ #define _PULSE_LAYER_H #include "audio/audiolayer.h" +#include "audio/samplerateconverter.h" #include "audiostream.h" #include <pulse/pulseaudio.h> @@ -189,6 +190,9 @@ class PulseLayer : public AudioLayer { */ AudioStream* record; + /** Sample rate converter object */ + SamplerateConverter * _converter; + bool isCorked; int spkrVolume; diff --git a/sflphone-common/src/audio/ringbuffer.cpp b/sflphone-common/src/audio/ringbuffer.cpp index d93a4ed25de8ea85f1ba7f4a68b114dbdc13ea19..38392b6f26924713671fed0c0cb45e56d5aa9c6f 100644 --- a/sflphone-common/src/audio/ringbuffer.cpp +++ b/sflphone-common/src/audio/ringbuffer.cpp @@ -41,28 +41,7 @@ RingBuffer::RingBuffer (int size, CallID call_id) : mEnd (0) mBuffer = new unsigned char[mBufferSize]; assert (mBuffer != NULL); - count_rb++; - - // open files - std::string s_input; - std::string s_output; - - // convert count into string - std::stringstream out; - out << count_rb; - - s_input = "/home/alexandresavard/Desktop/buffer_record/buffer_input_"; - s_input.append(out.str()); - - s_output = "/home/alexandresavard/Desktop/buffer_record/buffer_output_"; - s_output.append(out.str()); - - buffer_input_rec = new std::fstream(); - buffer_output_rec = new std::fstream(); - - buffer_input_rec->open(s_input.c_str(), std::fstream::out); - buffer_output_rec->open(s_output.c_str(), std::fstream::out); - + count_rb++; } // Free memory on object deletion @@ -70,12 +49,6 @@ RingBuffer::~RingBuffer() { delete[] mBuffer; mBuffer = NULL; - - buffer_input_rec->close(); - delete buffer_input_rec; buffer_input_rec = NULL; - - buffer_output_rec->close(); - delete buffer_output_rec; buffer_output_rec = NULL; } void @@ -84,6 +57,20 @@ RingBuffer::flush (CallID call_id) storeReadPointer(mEnd, call_id); } + +void +RingBuffer::flushAll () +{ + + ReadPointer::iterator iter_pointer = _readpointer.begin(); + while(iter_pointer != _readpointer.end()) + { + iter_pointer->second = mEnd; + + iter_pointer++; + } +} + int RingBuffer::putLen() { @@ -292,7 +279,6 @@ RingBuffer::Put (void* buffer, int toCopy, unsigned short volume) // bcopy(src, dest, len) //fprintf(stderr, "has %d put %d\t", len, block); - buffer_input_rec->write((char*)src, block); bcopy (src, mBuffer + pos, block); src += block; @@ -368,7 +354,6 @@ RingBuffer::Get (void *buffer, int toCopy, unsigned short volume, CallID call_id // bcopy(src, dest, len) bcopy (mBuffer + mStart, dest, block); - buffer_output_rec->write((char*)dest, block); dest += block; diff --git a/sflphone-common/src/audio/ringbuffer.h b/sflphone-common/src/audio/ringbuffer.h index 0dcfbf27e40a811928dbf8aa3ce35c6f01d4413e..1d40a759b538027c2d9ce976d7b78dc0e40bcae5 100644 --- a/sflphone-common/src/audio/ringbuffer.h +++ b/sflphone-common/src/audio/ringbuffer.h @@ -52,6 +52,8 @@ class RingBuffer { */ void flush (CallID call_id = default_id); + void flushAll(); + int getReadPointer(CallID call_id = default_id); diff --git a/sflphone-common/src/audio/samplerateconverter.cpp b/sflphone-common/src/audio/samplerateconverter.cpp index 727c96b9b2fa3e65439cd588515366b7d978adc0..29a3cc286bb27a2da04c38b1087309fd00495fc1 100644 --- a/sflphone-common/src/audio/samplerateconverter.cpp +++ b/sflphone-common/src/audio/samplerateconverter.cpp @@ -73,10 +73,12 @@ void SamplerateConverter::init (void) // interpolator SRC_SINC_BEST_QUALITY // interpolator SRC_SINC_FASTEST // interpolator SRC_LINEAR - _src_state_mic = src_new (SRC_SINC_FASTEST, 1, &_src_err); - _src_state_spkr = src_new (SRC_SINC_FASTEST, 1, &_src_err); + _src_state_mic = src_new (SRC_LINEAR, 1, &_src_err); + _src_state_spkr = src_new (SRC_LINEAR, 1, &_src_err); int nbSamplesMax = (int) (getFrequence() * getFramesize() / 1000); + // TODO: fix this hack that make sure we have enought place in buffers to upsample + nbSamplesMax = nbSamplesMax*4; _floatBufferDownMic = new float32[nbSamplesMax]; _floatBufferUpMic = new float32[nbSamplesMax]; _floatBufferDownSpkr = new float32[nbSamplesMax]; @@ -104,6 +106,7 @@ int SamplerateConverter::upsampleData (SFLDataFormat* dataIn , SFLDataFormat* da double upsampleFactor = (double) samplerate2 / samplerate1 ; //_debug("factor = %f\n" , upsampleFactor); int nbSamplesMax = (int) (samplerate2 * getFramesize() / 1000); + nbSamplesMax = nbSamplesMax*4; if (upsampleFactor != 1 && dataIn != NULL) { SRC_DATA src_data; @@ -113,13 +116,13 @@ int SamplerateConverter::upsampleData (SFLDataFormat* dataIn , SFLDataFormat* da src_data.output_frames = (int) floor (upsampleFactor * nbSamples); src_data.src_ratio = upsampleFactor; src_data.end_of_input = 0; // More data will come - //_debug("upsample %d %d %f %d\n" , src_data.input_frames , src_data.output_frames, src_data.src_ratio , nbSamples); + // _debug(" upsample %d %d %f %d\n" , src_data.input_frames , src_data.output_frames, src_data.src_ratio , nbSamples); // Override libsamplerate conversion function Short2FloatArray (dataIn , _floatBufferDownSpkr, nbSamples); //src_short_to_float_array (dataIn , _floatBufferDownSpkr, nbSamples); //_debug("upsample %d %f %d\n" , src_data.output_frames, src_data.src_ratio , nbSamples); src_process (_src_state_spkr, &src_data); - //_debug("upsample %d %d %d\n" , samplerate1, samplerate2 , nbSamples); + // _debug(" upsample %d %d %d\n" , samplerate1, samplerate2 , nbSamples); nbSamples = (src_data.output_frames_gen > nbSamplesMax) ? nbSamplesMax : src_data.output_frames_gen; src_float_to_short_array (_floatBufferUpSpkr, dataOut, nbSamples); //_debug("upsample %d %d %d\n" , samplerate1, samplerate2 , nbSamples); @@ -136,6 +139,8 @@ int SamplerateConverter::downsampleData (SFLDataFormat* dataIn , SFLDataFormat* //_debug("factor = %f\n" , downsampleFactor); int nbSamplesMax = (int) (samplerate1 * getFramesize() / 1000); + nbSamplesMax = nbSamplesMax*4; + if (downsampleFactor != 1) { SRC_DATA src_data; src_data.data_in = _floatBufferUpMic; diff --git a/sflphone-common/src/audio/samplerateconverter.h b/sflphone-common/src/audio/samplerateconverter.h index 5a33a90b05bdedd1ccc777a3019ddb33e5c25fae..b018fd862acccc79c9e1e4b6dda49405950df743 100644 --- a/sflphone-common/src/audio/samplerateconverter.h +++ b/sflphone-common/src/audio/samplerateconverter.h @@ -92,6 +92,8 @@ class SamplerateConverter { SRC_STATE* _src_state_spkr; /** libSamplerateConverter error */ int _src_err; + + }; #endif //_SAMPLE_RATE_H diff --git a/sflphone-common/src/iax/iaxvoiplink.cpp b/sflphone-common/src/iax/iaxvoiplink.cpp index 3faabe566a7fff8cc51445408da73ad4ebe51053..32a46a24774b441f9bba0d519029e909d84a3e74 100644 --- a/sflphone-common/src/iax/iaxvoiplink.cpp +++ b/sflphone-common/src/iax/iaxvoiplink.cpp @@ -127,6 +127,10 @@ IAXVoIPLink::init() _evThread->start(); audiolayer = Manager::instance().getAudioDriver(); + + // may be different than one already setted + converterSamplingRate = audiolayer->getMainBuffer()->getInternalSamplingRate(); + break; } @@ -313,16 +317,16 @@ IAXVoIPLink::sendAudioFromMic (void) return; } - + audiolayer->getMainBuffer()->setInternalSamplingRate(ac->getClockRate()); // Send sound here if (audiolayer) { - + int _mainBufferSampleRate = audiolayer->getMainBuffer()->getInternalSamplingRate(); // we have to get 20ms of data from the mic *20/1000 = /50 // rate/50 shall be lower than IAX__20S_48KHZ_MAX - maxBytesToGet = audiolayer->getSampleRate() * audiolayer->getFrameSize() / 1000 * sizeof (SFLDataFormat); + maxBytesToGet = _mainBufferSampleRate * audiolayer->getFrameSize() / 1000 * sizeof (SFLDataFormat); // available bytes inside ringbuffer availBytesFromMic = audiolayer->getMainBuffer()->availForGet(currentCall->getCallId()); @@ -335,26 +339,32 @@ IAXVoIPLink::sendAudioFromMic (void) // take the lowest bytesAvail = (availBytesFromMic < maxBytesToGet) ? availBytesFromMic : maxBytesToGet; - //_debug("available = %d, maxBytesToGet = %d\n", availBytesFromMic, maxBytesToGet); // Get bytes from micRingBuffer to data_from_mic nbSample_ = audiolayer->getMainBuffer()->getData (micData, bytesAvail, 100, currentCall->getCallId()) / sizeof (SFLDataFormat); - // Store the number of samples for recording nbSampleForRec_ = nbSample_; - // _debug("IAXVoIPLink::sendAudioFromMic : %i \n",nbSampleForRec_); - // resample - nbSample_ = converter->downsampleData (micData , micDataConverted , (int) ac ->getClockRate() , (int) audiolayer->getSampleRate() , nbSample_); + if (ac->getClockRate() && (ac->getClockRate() != _mainBufferSampleRate)) { - // for the mono: range = 0 to IAX_FRAME2SEND * sizeof(int16) - compSize = ac->codecEncode (micDataEncoded, micDataConverted , nbSample_*sizeof (int16)); + // resample + nbSample_ = converter->downsampleData (micData , micDataConverted , (int) ac->getClockRate(), _mainBufferSampleRate, nbSample_); + + // for the mono: range = 0 to IAX_FRAME2SEND * sizeof(int16) + compSize = ac->codecEncode (micDataEncoded, micDataConverted , nbSample_*sizeof (int16)); - // Send it out! - _mutexIAX.enterMutex(); + } else { + + // for the mono: range = 0 to IAX_FRAME2SEND * sizeof(int16) + compSize = ac->codecEncode (micDataEncoded, micData, nbSample_*sizeof (int16)); + + } + + // Send it out! + _mutexIAX.enterMutex(); // Make sure the session and the call still exists. if (currentCall->getSession() && micDataEncoded != NULL) { @@ -872,7 +882,9 @@ IAXVoIPLink::iaxHandleVoiceEvent (iax_event* event, IAXCall* call) int expandedSize, nbSample_; AudioCodec *ac; + ac = call->getCodecMap().getCodec (call -> getAudioCodec()); + audiolayer->getMainBuffer()->setInternalSamplingRate(ac->getClockRate()); // If we receive datalen == 0, some things of the jitter buffer in libiax2/iax.c // were triggered @@ -883,7 +895,9 @@ IAXVoIPLink::iaxHandleVoiceEvent (iax_event* event, IAXCall* call) return; } - if (audiolayer) { + if (audiolayer) { + + int _mainBufferSampleRate = audiolayer->getMainBuffer()->getInternalSamplingRate(); // On-the-fly codec changing (normally, when we receive a full packet) // as per http://tools.ietf.org/id/draft-guy-iax-03.txt @@ -893,7 +907,7 @@ IAXVoIPLink::iaxHandleVoiceEvent (iax_event* event, IAXCall* call) } //_debug("Receive: len=%d, format=%d, _receiveDataDecoded=%p\n", event->datalen, call->getFormat(), _receiveDataDecoded); - ac = call->getCodecMap().getCodec (call -> getAudioCodec()); + // ac = call->getCodecMap().getCodec (call -> getAudioCodec()); data = (unsigned char*) event->data; @@ -918,11 +932,21 @@ IAXVoIPLink::iaxHandleVoiceEvent (iax_event* event, IAXCall* call) nbSample_ = nbInt16; - // resample - nbInt16 = converter->upsampleData (spkrDataDecoded , spkrDataConverted , ac->getClockRate() , audiolayer->getSampleRate() , nbSample_); + // test if resampling is required + if (ac->getClockRate() && (ac->getClockRate() != _mainBufferSampleRate)) { + + // resample + nbInt16 = converter->upsampleData (spkrDataDecoded, spkrDataConverted, ac->getClockRate(), _mainBufferSampleRate, nbSample_); + + /* Write the data to the mic ring buffer */ + audiolayer->getMainBuffer()->putData (spkrDataConverted, nbInt16 * sizeof (SFLDataFormat), 100, call->getCallId()); + + } else { - /* Write the data to the mic ring buffer */ - audiolayer->getMainBuffer()->putData (spkrDataConverted , nbInt16 * sizeof (SFLDataFormat), 100, call->getCallId()); + /* Write the data to the mic ring buffer */ + audiolayer->getMainBuffer()->putData (spkrDataDecoded, nbInt16 * sizeof (SFLDataFormat), 100, call->getCallId()); + + } } else { _debug ("IAX: incoming audio, but no sound card open"); diff --git a/sflphone-common/src/iax/iaxvoiplink.h b/sflphone-common/src/iax/iaxvoiplink.h index 747cc0509ea08af5d2303041a6fc73d34a97d595..a7771c782d901bdf52664fd4b2d2836caee08734 100644 --- a/sflphone-common/src/iax/iaxvoiplink.h +++ b/sflphone-common/src/iax/iaxvoiplink.h @@ -287,6 +287,8 @@ class IAXVoIPLink : public VoIPLink /** Sample rate converter object */ SamplerateConverter* converter; + + int converterSamplingRate; /** number of sample */ int nbSample_; diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 46163a25d5ea5ad6fea3e74fe223dced0350a9ad..1f98b69241b93e5d1781dd7ad334a5113db795d4 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -344,19 +344,19 @@ ManagerImpl::answerCall (const CallID& call_id) AccountID account_id = getAccountFromCall (call_id); if(account_id == AccountNULL) { - _debug(" answerCall : AccountId is null\n"); + _debug(" answerCall: AccountId is null\n"); } Call* call = NULL; call = getAccountLink (account_id)->getCall (call_id); if (call == NULL) { - _debug(" answerCall: currentCall is null\n"); + _debug(" answerCall: Call is null\n"); } // in any cases we have to detach from current communication if (hasCurrentCall()) { - _debug (" answerCall: Has current call or conference (%s)\n", current_call_id.c_str()); + _debug (" answerCall: Currently conversing with %s\n", current_call_id.c_str()); // if it is not a conference and is not a conference participant if (!isConference(current_call_id) && !participToConference(current_call_id)) { @@ -366,9 +366,10 @@ ManagerImpl::answerCall (const CallID& call_id) // if we are talking to a conference and we are answering an incoming call else if (isConference(current_call_id) && !participToConference(call_id)) { - _debug (" answerCall: detach main participant from conference\n"); + _debug (" answerCall: Detach main participant from conference\n"); detachParticipant(default_id, current_call_id); } + } if (!getAccountLink (account_id)->answer (call_id)) { @@ -385,7 +386,21 @@ ManagerImpl::answerCall (const CallID& call_id) removeWaitingCall (call_id); - switchCall (call_id); + // if we dragged this call into a conference already + if ( participToConference(call_id) ) { + + // AccountID currentAccountId; + // Call* call = NULL; + + // currentAccountId = getAccountFromCall (call_id); + // call = getAccountLink (currentAccountId)->getCall (call_id); + + switchCall(call->getConfId()); + } + else + { + switchCall(call_id); + } return true; } @@ -480,6 +495,7 @@ ManagerImpl::hangupConference (const ConfID& id) AccountID currentAccountId; // Call* call = NULL; + if(iter_conf != _conferencemap.end()) { @@ -553,30 +569,35 @@ ManagerImpl::onHoldCall (const CallID& call_id) _debug("ManagerImpl::onHoldCall(%s)\n", call_id.c_str()); stopTone (true); + + CallID current_call_id = getCurrentCallId(); - // switchCall (id); + _debug(" onHoldCall: try to put call %s on hold\n", call_id.c_str()); /* Direct IP to IP call */ - if (getConfigFromCall (call_id) == Call::IPtoIP) { - returnValue = SIPVoIPLink::instance (AccountNULL)-> onhold (call_id); + returnValue = SIPVoIPLink::instance (AccountNULL)-> onhold (call_id); } /* Classic call, attached to an account */ else { - account_id = getAccountFromCall (call_id); - - if (account_id == AccountNULL) { - _debug (" onHoldCall: Account ID %s or callid %s doesn't exists\n", account_id.c_str(), call_id.c_str()); - return false; - } + account_id = getAccountFromCall (call_id); + + if (account_id == AccountNULL) { + _debug (" onHoldCall: Account ID %s or callid %s doesn't exists\n", account_id.c_str(), call_id.c_str()); + return false; + } - returnValue = getAccountLink (account_id)->onhold (call_id); + returnValue = getAccountLink (account_id)->onhold (call_id); } - + removeWaitingCall (call_id); - // switchCall (""); + // keeps current call id if the action is not holding this call or a new outgoing call + if(current_call_id == call_id) { + + switchCall (""); + } if (_dbus) _dbus->getCallManager()->callStateChanged (call_id, "HOLD"); @@ -592,6 +613,7 @@ ManagerImpl::offHoldCall (const CallID& call_id) bool returnValue, is_rec; std::string codecName; + is_rec = false; _debug ("ManagerImpl::offHoldCall(%s)\n", call_id.c_str()); @@ -657,10 +679,12 @@ ManagerImpl::offHoldCall (const CallID& call_id) call = getAccountLink (currentAccountId)->getCall (call_id); switchCall(call->getConfId()); + } else { switchCall(call_id); + _audiodriver->getMainBuffer()->flush(default_id); } codecName = getCurrentCodecName (call_id); @@ -668,43 +692,65 @@ ManagerImpl::offHoldCall (const CallID& call_id) if (_dbus) _dbus->getCallManager()->currentSelectedCodec (call_id,codecName.c_str()); + + return returnValue; } //THREAD=Main bool -ManagerImpl::transferCall (const CallID& id, const std::string& to) +ManagerImpl::transferCall (const CallID& call_id, const std::string& to) { AccountID accountid; bool returnValue; stopTone (true); + CallID current_call_id = getCurrentCallId(); + /* Direct IP to IP call */ - if (getConfigFromCall (id) == Call::IPtoIP) { - returnValue = SIPVoIPLink::instance (AccountNULL)-> transfer (id, to); + if (getConfigFromCall (call_id) == Call::IPtoIP) { + returnValue = SIPVoIPLink::instance (AccountNULL)-> transfer (call_id, to); } /* Classic call, attached to an account */ else { - accountid = getAccountFromCall (id); + accountid = getAccountFromCall (call_id); if (accountid == AccountNULL) { _debug ("! Manager Transfer Call: Call doesn't exists\n"); return false; } - returnValue = getAccountLink (accountid)->transfer (id, to); + returnValue = getAccountLink (accountid)->transfer (call_id, to); - removeCallAccount (id); + removeCallAccount (call_id); } - removeWaitingCall (id); + removeWaitingCall (call_id); - switchCall (""); + if(participToConference(call_id)) + { - if (_dbus) _dbus->getCallManager()->callStateChanged (id, "HUNGUP"); + Conference *conf = getConferenceFromCallID(call_id); + + if(conf != NULL) + { + // remove this participant + removeParticipant(call_id); + + processRemainingParticipant(current_call_id, conf); + } + } + else + { + // we are not participating to a conference, current call switched to "" + if (!isConference(current_call_id)) + switchCall(""); + } + + if (_dbus) _dbus->getCallManager()->callStateChanged (call_id, "HUNGUP"); return returnValue; } @@ -989,18 +1035,39 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id) // store the current call id (it will change in offHoldCall or in answerCall) CallID current_call_id = getCurrentCallId(); + // detach from the conference and switch to this conference + if (current_call_id != call_id) + { + if (isConference(current_call_id)) { + detachParticipant(default_id, current_call_id); + } + else + onHoldCall(current_call_id); + } + + // TODO: remove this ugly hack => There should be different calls when double clicking + // a conference to add main participant to it, or (in this case) adding a participant + // toconference + switchCall(""); + addMainParticipant(conference_id); + _debug(" addParticipant: enter main process\n"); if(iter != _conferencemap.end()) { Conference* conf = iter->second; + switchCall(conf->getConfID()); + + AccountID currentAccountId; + Call* call = NULL; + + currentAccountId = getAccountFromCall (call_id); + call = getAccountLink (currentAccountId)->getCall (call_id); + call->setConfId (conf->getConfID()); conf->add(call_id); - iter_details = call_details.find("CALL_STATE"); - switchCall(""); - _debug(" addParticipant: call state: %s\n", iter_details->second.c_str()); if (iter_details->second == "HOLD") { @@ -1022,30 +1089,36 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id) conf->bindParticipant(call_id); } - // update this call conference id - AccountID currentAccountId; + // _dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr()); - Call* call = NULL; + ParticipantSet participants = conf->getParticipantList(); + // reset ring buffer for all conference participant + ParticipantSet::iterator iter_p = participants.begin(); + while(iter_p != participants.end()) { - currentAccountId = getAccountFromCall (call_id); - call = getAccountLink (currentAccountId)->getCall (call_id); - call->setConfId (conf->getConfID()); + // to avoid puting onhold the call + // switchCall(""); + _audiodriver->getMainBuffer()->flush(*iter_p); - _dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr()); + iter_p++; + } + + _audiodriver->getMainBuffer()->flush(default_id); } + else { _debug(" addParticipant: Error, conference %s conference_id not found!\n", conference_id.c_str()); } // bind main participant to conference after adding new participant - detachParticipant(default_id, current_call_id); + // detachParticipant(default_id, current_call_id); // to avoid puting onhold the added call - switchCall(""); - addMainParticipant(conference_id); + // switchCall(""); + // addMainParticipant(conference_id); - + // _dbus->getCallManager()->conferenceChanged(conference_id, conference_id); } @@ -1085,6 +1158,17 @@ ManagerImpl::addMainParticipant(const CallID& conference_id) iter_participant++; } + // Reset ringbuffer's readpointers + iter_participant = participants.begin(); + while(iter_participant != participants.end()) + { + _audiodriver->getMainBuffer()->flush(*iter_participant); + + iter_participant++; + } + + _audiodriver->getMainBuffer()->flush(default_id); + conf->setState(Conference::Active_Atached); _dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr()); @@ -1104,7 +1188,6 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2) std::map<std::string, std::string> call1_details = getCallDetails(call_id1); std::map<std::string, std::string> call2_details = getCallDetails(call_id2); - ConferenceMap::iterator iter = _conferencemap.find(default_conf); std::map<std::string, std::string>::iterator iter_details; AccountID currentAccountId; @@ -1123,82 +1206,63 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2) onHoldCall(current_call_id); } - if(iter == _conferencemap.end()){ - - _debug(" joinParticipant: create a conference\n"); - Conference *conf = createConference(call_id1, call_id2); - - // AccountID currentAccountId; - // Call* call = NULL; - - // unbind main participant from either call_id1 or call_id2 - // _audiodriver->getMainBuffer()->unBindAll(default_id); - - switchCall(""); - - iter_details = call1_details.find("CALL_STATE"); - _debug(" joinParticipant: call1 %s state: %s\n", call_id1.c_str(), iter_details->second.c_str()); - if (iter_details->second == "HOLD") - { - _debug(" OFFHOLD %s\n", call_id1.c_str()); - offHoldCall(call_id1); - } - else if(iter_details->second == "INCOMING") - { - _debug(" ANSWER %s\n", call_id1.c_str()); - answerCall(call_id1); - } - else if(iter_details->second == "CURRENT") - { - _debug(" CURRENT %s\n", call_id1.c_str()); - _audiodriver->getMainBuffer()->unBindAll(call_id1); - conf->bindParticipant(call_id1); - } - - currentAccountId = getAccountFromCall (call_id1); - call = getAccountLink (currentAccountId)->getCall (call_id1); - call->setConfId (conf->getConfID()); - - - switchCall(""); - - iter_details = call2_details.find("CALL_STATE"); - _debug(" joinParticipant: call2 %s state: %s\n", call_id2.c_str(), iter_details->second.c_str()); - if (iter_details->second == "HOLD") - { - _debug(" OFFHOLD %s\n", call_id2.c_str()); - offHoldCall (call_id2); - } - else if(iter_details->second == "INCOMING") - { - _debug(" ANSWER %s\n", call_id2.c_str()); - answerCall(call_id2); - } - else if(iter_details->second == "CURRENT") - { - _debug(" CURRENT %s\n", call_id2.c_str()); - _audiodriver->getMainBuffer()->unBindAll(call_id2); - conf->bindParticipant(call_id2); - } + _debug(" joinParticipant: create a conference\n"); - currentAccountId = getAccountFromCall (call_id2); - call = getAccountLink (currentAccountId)->getCall (call_id2); - call->setConfId (conf->getConfID()); - - - // finally bind main participant to conference - // addMainParticipant(default_conf); - - - switchCall(conf->getConfID()); + Conference *conf = createConference(call_id1, call_id2); + switchCall(conf->getConfID()); + currentAccountId = getAccountFromCall (call_id1); + call = getAccountLink (currentAccountId)->getCall (call_id1); + call->setConfId (conf->getConfID()); + + iter_details = call1_details.find("CALL_STATE"); + _debug(" joinParticipant: call1 %s state: %s\n", call_id1.c_str(), iter_details->second.c_str()); + if (iter_details->second == "HOLD") + { + _debug(" OFFHOLD %s\n", call_id1.c_str()); + offHoldCall(call_id1); + } + else if(iter_details->second == "INCOMING") + { + _debug(" ANSWER %s\n", call_id1.c_str()); + answerCall(call_id1); + } + else if(iter_details->second == "CURRENT") + { + _debug(" CURRENT %s\n", call_id1.c_str()); + _audiodriver->getMainBuffer()->unBindAll(call_id1); + conf->bindParticipant(call_id1); } - else { - _debug("ManagerImpl::joinParticipant already a conference created with this ID\n"); - + currentAccountId = getAccountFromCall (call_id2); + call = getAccountLink (currentAccountId)->getCall (call_id2); + call->setConfId (conf->getConfID()); + + iter_details = call2_details.find("CALL_STATE"); + _debug(" joinParticipant: call2 %s state: %s\n", call_id2.c_str(), iter_details->second.c_str()); + if (iter_details->second == "HOLD") + { + _debug(" OFFHOLD %s\n", call_id2.c_str()); + offHoldCall (call_id2); + } + else if(iter_details->second == "INCOMING") + { + _debug(" ANSWER %s\n", call_id2.c_str()); + answerCall(call_id2); + } + else if(iter_details->second == "CURRENT") + { + _debug(" CURRENT %s\n", call_id2.c_str()); + _audiodriver->getMainBuffer()->unBindAll(call_id2); + conf->bindParticipant(call_id2); } + // finally bind main participant to conference + // addMainParticipant(default_conf); + + + // switchCall(conf->getConfID()); + } @@ -1269,6 +1333,8 @@ ManagerImpl::detachParticipant(const CallID& call_id, const CallID& current_id) _dbus->getCallManager()->conferenceChanged(conf->getConfID(), conf->getStateStr()); } + + switchCall(""); } @@ -1318,6 +1384,20 @@ ManagerImpl::processRemainingParticipant(CallID current_call_id, Conference *con if(conf->getNbParticipants() > 1) { + ParticipantSet participants = conf->getParticipantList(); + ParticipantSet::iterator iter_participant = participants.begin(); + + // Reset ringbuffer's readpointers + iter_participant = participants.begin(); + while(iter_participant != participants.end()) + { + _audiodriver->getMainBuffer()->flush(*iter_participant); + + iter_participant++; + } + + _audiodriver->getMainBuffer()->flush(default_id); + } else if (conf->getNbParticipants() == 1) { @@ -1408,17 +1488,39 @@ ManagerImpl::addStream(const CallID& call_id) // bind to conference participant ConferenceMap::iterator iter = _conferencemap.find(call->getConfId()); + if (iter != _conferencemap.end()) { Conference* conf = iter->second; + _debug(" addStream: bind call %s to conference %s\n", call_id.c_str(), conf->getConfID().c_str()); + conf->bindParticipant(call_id); + + ParticipantSet participants = conf->getParticipantList(); + // reset ring buffer for all conference participant + ParticipantSet::iterator iter_p = participants.begin(); + while(iter_p != participants.end()) { + + // to avoid puting onhold the call + // switchCall(""); + _audiodriver->getMainBuffer()->flush(*iter_p); + + iter_p++; + } + + _audiodriver->getMainBuffer()->flush(default_id); } + } else { + _debug(" addStream: bind call %s to main\n", call_id.c_str()); + // bind to main getAudioDriver()->getMainBuffer()->bindCallID(call_id); + + _audiodriver->getMainBuffer()->flush(default_id); } } @@ -1732,6 +1834,8 @@ ManagerImpl::peerAnsweredCall (const CallID& id) // _debug("ManagerImpl::hangupCall(): broadcast codec name %s \n",codecName.c_str()); if (_dbus) _dbus->getCallManager()->currentSelectedCodec (id,codecName.c_str()); + + } //THREAD=VoIP Call=Outgoing @@ -2091,8 +2195,6 @@ ManagerImpl::createSettingsPath (void) xdg_config = std::string (HOMEDIR) + DIR_SEPARATOR_STR + ".config" + DIR_SEPARATOR_STR + PROGDIR; - //_path = std::string (HOMEDIR) + DIR_SEPARATOR_STR + "." + PROGDIR; - if (XDG_CONFIG_HOME != NULL) { xdg_env = std::string (XDG_CONFIG_HOME); (xdg_env.length() > 0) ? _path = xdg_env @@ -2399,10 +2501,16 @@ ManagerImpl::getCodecDetails (const int32_t& payload) std::string ManagerImpl::getCurrentCodecName (const CallID& id) { - // _debug("ManagerImpl::getCurrentCodecName method called \n"); - AccountID accountid = getAccountFromCall (id); - // _debug("ManagerImpl::getCurrentCodecName : %s \n",getAccountLink(accountid)->getCurrentCodecName().c_str()); - return getAccountLink (accountid)->getCurrentCodecName(); + + AccountID accountid = getAccountFromCall(id); + VoIPLink* link = getAccountLink (accountid); + Call* call = link->getCall(id); + + + if(call->getState() != Call::Active) + return ""; + else + return link->getCurrentCodecName(); } /** @@ -2669,33 +2777,6 @@ ManagerImpl::setDialpad (void) (getConfigString (PREFERENCES, CONFIG_DIALPAD) == TRUE_STR) ? setConfig (PREFERENCES, CONFIG_DIALPAD, FALSE_STR) : setConfig (PREFERENCES, CONFIG_DIALPAD, TRUE_STR); } -/* -std::string ManagerImpl::getStunServer (void) -{ - return getConfigString (SIGNALISATION , STUN_SERVER); -} - -void ManagerImpl::setStunServer (const std::string &server) -{ - setConfig (SIGNALISATION , STUN_SERVER, server); -} - -int ManagerImpl::isStunEnabled (void) -{ - return getConfigString (SIGNALISATION, STUN_ENABLE) == TRUE_STR ? 1:0; -} - - -void ManagerImpl::enableStun (void) -{ - // Update the config - (getConfigString (SIGNALISATION , STUN_ENABLE) == TRUE_STR) ? setConfig (SIGNALISATION , STUN_ENABLE , FALSE_STR) : setConfig (SIGNALISATION , STUN_ENABLE , TRUE_STR); - - // Restart PJSIP - this->restartPJSIP (); -} -*/ - int ManagerImpl::getVolumeControls (void) { diff --git a/sflphone-common/src/sip/Regex.cpp b/sflphone-common/src/sip/Regex.cpp deleted file mode 100644 index 65478b14d9b9f2baa662756e2f6c39bba8e0c3e0..0000000000000000000000000000000000000000 --- a/sflphone-common/src/sip/Regex.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (C) 2009 Savoir-Faire Linux inc. - * Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MEstatusHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "Regex.h" - -#include <sstream> - -namespace sfl -{ - -const int MAX_SUBSTRINGS = 30; - -Regex::Regex (const std::string& pattern) : - _pattern (pattern) - ,_pcreOutputVector (NULL) - ,_re (NULL) -{ - compile(); -} - -Regex::~Regex() -{ - pcre_free (_re); - delete[] _pcreOutputVector; -} - -void Regex::compile (void) -{ - // Compile the pattern - int offset; - const char * error; - - _reMutex.enterMutex(); - _re = pcre_compile (_pattern.c_str(), 0, &error, &offset, NULL); - - if (_re == NULL) { - std::string offsetStr; - std::stringstream ss; - ss << offset; - offsetStr = ss.str(); - - std::string msg ("PCRE compiling failed at offset "); - - throw compile_error (msg); - } - - // Allocate space for - // the output vector - if (_pcreOutputVector != NULL) { - delete[] _pcreOutputVector; - } - - _pcreOutputVector = new int[MAX_SUBSTRINGS]; - - _reMutex.leaveMutex(); -} - -const std::vector<std::string>& Regex::findall (const std::string& subject) -{ - // Execute the PCRE regex - int status; - - _reMutex.enterMutex(); - status = pcre_exec (_re, NULL, subject.c_str(), subject.length(), - 0, 0, _pcreOutputVector, MAX_SUBSTRINGS); - _reMutex.leaveMutex(); - - // Handle error cases - - if (status < 0) { - - // Free the regular expression - pcre_free (_re); - - // Throw and exception - - switch (status) { - - case PCRE_ERROR_NOMATCH: - throw match_error ("No match"); - break; - - default: - std::string statusStr; - std::stringstream ss; - ss << status - 1; - statusStr = ss.str(); - - throw match_error (std::string ("Matching error number ") + - statusStr + std::string (" occured")); - break; - } - - } - - // Output_vector isn't big enough - if (status == 0) { - - status = MAX_SUBSTRINGS/3; - - std::string statusStr; - std::stringstream ss; - ss << status - 1; - statusStr = ss.str(); - - throw std::length_error (std::string ("Output vector is not big enough. Has room for") - + statusStr + std::string ("captured substrings\n")); - } - - // Copy the contents to the std::vector that will be - // handed to the user - int count = status; - - const char **stringlist; - - _reMutex.enterMutex(); - - status = pcre_get_substring_list (subject.c_str(), _pcreOutputVector, count, &stringlist); - - if (status < 0) { - fprintf (stderr, "Get substring list failed"); - } else { - _outputVector.clear(); - - int i; - - for (i = 0; i < count; i++) { - _outputVector.push_back (stringlist[i]); - } - - pcre_free_substring_list (stringlist); - - } - - _reMutex.leaveMutex(); - - return _outputVector; -} - -range Regex::finditer (const std::string& subject) -{ - findall (subject); - std::vector<std::string>::iterator iterBegin = _outputVector.begin(); - std::vector<std::string>::iterator iterEnd = _outputVector.end(); - return range (iterBegin, iterEnd); -} - -std::string Regex::group (const std::string& groupName) -{ - _reMutex.enterMutex(); - - // Executes the regex - findall (_subject); - - // Access the named substring - const char * substring; - std::string substringReturned; - - int rc = pcre_get_named_substring (_re, _subject.c_str(), _pcreOutputVector, - _outputVector.size(), groupName.c_str(), &substring); - - // Handle errors - - if (rc < 0) { - - switch (rc) { - - case PCRE_ERROR_NOMEMORY: - throw match_error ("Couln't get memory"); - break; - - case PCRE_ERROR_NOSUBSTRING: - throw match_error ("No such captured substring"); - break; - - default: - throw match_error ("Error copying substring"); - } - - } else { - substringReturned = substring; - pcre_free_substring (substring); - } - - _reMutex.leaveMutex(); - - return substringReturned; -} -} - diff --git a/sflphone-common/src/sip/Regex.h b/sflphone-common/src/sip/Regex.h deleted file mode 100644 index 613f707a9a48d1f882e551e2d0d9cf5be3d27fa0..0000000000000000000000000000000000000000 --- a/sflphone-common/src/sip/Regex.h +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (C) 2009 Savoir-Faire Linux inc. - * Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef __SFL_REGEX_H__ -#define __SFL_REGEX_H__ - -#include <stdexcept> -#include <ostream> -#include <vector> - -#include <pcre.h> -#include <cc++/thread.h> - -namespace sfl { - - /** - * While waiting for C++0x to come out - * Let's say that we have something like - * std::range - * - * Defines a pair of iterator over a vector of - * strings. The fist element corresponds to the - * begining of the vector, while the second is - * set to the end. - */ - typedef std::pair<std::vector<std::string>::iterator, std::vector<std::string>::iterator> range; - - /** - * Exception object that is thrown when - * an error occured while compiling the - * regular expression. - */ - class compile_error : public std::invalid_argument - { - public: - explicit compile_error(const std::string& error) : - std::invalid_argument(error) {} - }; - - /** - * Exception object that is thrown when - * an error occured while mathing a - * pattern to an expression. - */ - class match_error : public std::invalid_argument - { - public: - match_error(const std::string& error) : - std::invalid_argument(error) {} - }; - - /** - * This class implements in its way - * some of the libpcre library. - */ - - class Regex { - - public: - - /** - * Constructor for a regular expression - * pattern evaluator/matcher. - * - * @param pattern - * The regular expression to - * be used for this instance. - */ - - Regex(const std::string& pattern = ""); - - ~Regex(); - - /** - * Set the regular expression - * to be used on subject strings - * - * @param pattern The new pattern - */ - - void setPattern(const std::string& pattern) { - _reMutex.enterMutex(); - _pattern = pattern; - _reMutex.leaveMutex(); - } - - /** - * Assignment operator overloading. - * Set the regular expression - * to be used on subject strings - * and compile the regular expression - * from that string. - * - * You should use the setPattern() method to - * only set the variable itself, then manually - * compile the expression with the compile() - * method. - * - * @param pattern The new pattern - */ - - void operator=(const std::string& pattern) { - _reMutex.enterMutex(); - _pattern = pattern; - _reMutex.leaveMutex(); - compile(); - } - - void operator=(const char * pattern) { - _reMutex.enterMutex(); - _pattern = pattern; - _reMutex.leaveMutex(); - compile(); - } - - /** - * Compile the regular expression - * from the pattern that was set for - * this object. - */ - - void compile(void); - - /** - * Get the currently set regular expression - * that is used on subject strings - * - * @return The currently set pattern - */ - - inline std::string getPattern(void) { return _pattern; } - - /** - * Match the given expression against - * this pattern and returns a vector of - * the substrings that were matched. - * - * @param subject - * The expression to be evaluated - * by the pattern. - * - * @return a vector containing the substrings - * in the order that the parentheses were - * defined. Throws a match_error if the - * expression cannot be matched. - */ - - const std::vector<std::string>& findall(const std::string& subject); - - /** - * << operator overload. Sets the the subject - * for latter use on the >> operator. - * - * @param subject - * The expression to be evaluated - * by the pattern. - * - */ - - void operator<<(const std::string& subject) { - _reMutex.enterMutex(); - _subject = subject; - _reMutex.leaveMutex(); - } - - /** - * >> operator overload. Executes the - * findall method with the subject previously - * set with the << operator. - * - * @return a vector containing the substrings - * in the order that the parentheses were - * defined. Throws a match_error if the - * expression cannot be matched. - */ - - void operator>>(std::vector<std::string>& outputVector) { - _reMutex.enterMutex(); - outputVector = findall(_subject); - _reMutex.leaveMutex(); - } - - /** - * Match the given expression against - * this pattern and returns an iterator - * to the substrings. - * - * @param subject - * The expression to be evaluated - * by the pattern. - * - * @return an iterator to the output vector - * containing the substrings that - * were matched. - */ - - range finditer(const std::string& subject); - - /** - * Try to match the regular expression - * on the subject previously set in this - * object and return the substring matched - * by the given group name. - * - * @param groupName The name of the group - * @return the substring matched by the - * regular expression designated - * the group name. - */ - std::string group(const std::string& groupName); - - private: - - /** - * The regular expression that represents that pattern - */ - - std::string _pattern; - - /** - * The optional subject string that can be used - * by the << and >> operator. - */ - - std::string _subject; - - /** - * The pcre regular expression structure - */ - - pcre * _re; - - /** - * The output vector used to contain - * substrings that were matched by pcre. - */ - - int * _pcreOutputVector; - - /** - * The output std::vector used to contain - * substrings that were matched by pcre. - */ - - std::vector<std::string> _outputVector; - - /** - * Protects the above data from concurrent - * access. - */ - - ost::Mutex _reMutex; - }; - -} - -#endif diff --git a/sflphone-common/src/sip/SdesNegotiator.cpp b/sflphone-common/src/sip/SdesNegotiator.cpp index 76b9019baee766ff672e76a9d693c6349549d0ad..eaf0219cb042e6d1cf975c6e0346260ea16e7e3d 100644 --- a/sflphone-common/src/sip/SdesNegotiator.cpp +++ b/sflphone-common/src/sip/SdesNegotiator.cpp @@ -18,147 +18,173 @@ #include "SdesNegotiator.h" -#include "Regex.h" +#include "util/Pattern.h" #include <iostream> #include <sstream> #include <algorithm> -#include <stdexcept> +#include <stdexcept> -namespace sfl -{ +using namespace sfl::util; struct CryptoAttribute { - std::string tag; - std::string cryptoSuite; - std::string keyParams; - std::string sessionParams; + std::string tag; + std::string cryptoSuite; + std::string keyParams; + std::string sessionParams; }; -SdesNegotiator::SdesNegotiator (const std::vector<CryptoSuiteDefinition>& localCapabilites, - const std::vector<std::string>& remoteAttribute) : - _remoteAttribute (remoteAttribute), - _localCapabilities (localCapabilites) +SdesNegotiator::SdesNegotiator(const std::vector<CryptoSuiteDefinition>& localCapabilites, + const std::vector<std::string>& remoteAttribute) : +_remoteAttribute(remoteAttribute), +_localCapabilities(localCapabilites) { } -void SdesNegotiator::parse (void) -{ - // The patterns below try to follow - // the ABNF grammar rules described in - // RFC4568 section 9.2 with the general - // syntax : - //a=crypto:tag 1*WSP crypto-suite 1*WSP key-params *(1*WSP session-param) - - Regex tagPattern, cryptoSuitePattern, keyParamsPattern, sessionParamPattern; - - try { - tagPattern = "^a=crypto:(?P<tag>[0-9]{1,9})"; - - cryptoSuitePattern = "[\x20\x09]+(?P<cryptoSuite>AES_CM_128_HMAC_SHA1_80|" \ - "AES_CM_128_HMAC_SHA1_32|" \ - "F8_128_HMAC_SHA1_80|" \ - "[A-Za-z0-9_]+)"; // srtp-crypto-suite-ext - - keyParamsPattern = "[\x20\x09]+(?P<srtpKeyMethod>inline|[A-Za-z0-9_]+)\\:" \ - "(?P<srtpKeyInfo>[A-Za-z0-9\x2B\x2F\x3D]+)\\|" \ - "2\\^(?P<lifetime>[0-9]+)\\|" \ - "(?P<mkiValue>[0-9]+)\\:" \ - "(?P<mkiLength>[0-9]{1,3})\\;?"; - - sessionParamPattern = "[\x20\x09]+(?P<sessionParam>(kdr\\=[0-9]{1,2}|" \ - "UNENCRYPTED_SRTP|" \ - "UNENCRYPTED_SRTCP|" \ - "UNAUTHENTICATED_SRTP|" \ - "FEC_ORDER=(?P<fecOrder>FEC_SRTP|SRTP_FEC)|" \ - "FEC_KEY=(?P<fecKey>" + keyParamsPattern.getPattern() + ")|" \ - "WSH=(?P<wsh>[0-9]{1,2})|" \ - "(?<!\\-)[[:graph:]]+))*"; // srtp-session-extension - - } catch (compile_error& exception) { - throw parse_error ("A compile exception occured on a pattern."); - - } - - - // Take each line from the vector - // and parse its content - - std::vector<std::string>::iterator iter; - - for (iter = _remoteAttribute.begin(); iter != _remoteAttribute.end(); iter++) { - - std::cout << (*iter) << std::endl; - - // Check if the attribute - // starts with a=crypto - // and get the tag for this line - tagPattern << (*iter); - - try { - std::string tag = tagPattern.group ("tag"); - std::cout << "tag = " << tag << std::endl; - } catch (match_error& exception) { - throw parse_error ("Error while parsing the tag field"); - } - - // Check if the crypto - // suite is valid and retreive - // its value. - cryptoSuitePattern << (*iter); - - try { - std::string cryptoSuite = cryptoSuitePattern.group ("cryptoSuite"); - std::cout << "crypto-suite = " << cryptoSuite << std::endl; - } catch (match_error& exception) { - throw parse_error ("Error while parsing the crypto-suite field"); - } - - // Parse one or more key-params - // field. - keyParamsPattern << (*iter); - - try { - std::string srtpKeyMethod = keyParamsPattern.group ("srtpKeyMethod"); - std::cout << "srtp-key-method = " << srtpKeyMethod << std::endl; - - std::string srtpKeyInfo = keyParamsPattern.group ("srtpKeyInfo"); - std::cout << "srtp-key-info = " << srtpKeyInfo << std::endl; - - std::string lifetime = keyParamsPattern.group ("lifetime"); - std::cout << "lifetime = " << lifetime << std::endl; - - std::string mkiValue = keyParamsPattern.group ("mkiValue"); - std::cout << "mkiValue = " << mkiValue << std::endl; - - std::string mkiLength = keyParamsPattern.group ("mkiLength"); - std::cout << "mkiLength = " << mkiLength << std::endl; - - } catch (match_error& exception) { - throw parse_error ("Error while parsing the key-params field"); - } - - // Parse the optional session-param - // field - sessionParamPattern << (*iter); - - try { - std::string sessionParam = sessionParamPattern.group ("sessionParam"); - std::cout << "srtp-session-param = " << sessionParam << std::endl; - } catch (not_found& exception) { - // Thats totally find, do nothing - } catch (match_error& exception) { - throw parse_error ("Error while parsing the crypto-suite field"); - } - - } - +void SdesNegotiator::parse(void) +{ + // The patterns below try to follow + // the ABNF grammar rules described in + // RFC4568 section 9.2 with the general + // syntax : + //a=crypto:tag 1*WSP crypto-suite 1*WSP key-params *(1*WSP session-param) + + Pattern + * generalSyntaxPattern, + * tagPattern, + * cryptoSuitePattern, + * keyParamsPattern, + * sessionParamPattern; + + try { + generalSyntaxPattern = new Pattern("[\x20\x09]+", "g"); + + tagPattern = new Pattern("^a=crypto:(?P<tag>[0-9]{1,9})"); + + cryptoSuitePattern = new Pattern( + "(?P<cryptoSuite>AES_CM_128_HMAC_SHA1_80|" \ + "AES_CM_128_HMAC_SHA1_32|" \ + "F8_128_HMAC_SHA1_80|" \ + "[A-Za-z0-9_]+)"); // srtp-crypto-suite-ext + + keyParamsPattern = new Pattern( + "(?P<srtpKeyMethod>inline|[A-Za-z0-9_]+)\\:" \ + "(?P<srtpKeyInfo>[A-Za-z0-9\x2B\x2F\x3D]+)\\|" \ + "2\\^(?P<lifetime>[0-9]+)\\|" \ + "(?P<mkiValue>[0-9]+)\\:" \ + "(?P<mkiLength>[0-9]{1,3})\\;?", "g"); + + sessionParamPattern = new Pattern( + "(?P<sessionParam>(kdr\\=[0-9]{1,2}|" \ + "UNENCRYPTED_SRTP|" \ + "UNENCRYPTED_SRTCP|" \ + "UNAUTHENTICATED_SRTP|" \ + "FEC_ORDER=(?P<fecOrder>FEC_SRTP|SRTP_FEC)|" \ + "FEC_KEY=(?P<fecKey>" + keyParamsPattern.getPattern() + ")|" \ + "WSH=(?P<wsh>[0-9]{1,2})|" \ + "(?<!\\-)[[:graph:]]+))*", "g"); // srtp-session-extension + + } catch(compile_error& exception) { + throw parse_error("A compile exception occured on a pattern."); + + } + + // Take each line from the vector + // and parse its content + + std::vector<std::string>::iterator iter; + for (iter = _remoteAttribute.begin(); iter != _remoteAttribute.end(); iter++) { + + std::cout << (*iter) << std::endl; + + // Split the line into its component + // that we will analyze further down. + + generalSyntaxPattern << (*iter); + std::vector<std::string> sdesLine; + + try { + sdesLine = generalSyntaxPattern.split(); + if (sdesLine.size() < 3) { + throw parse_error("Missing components in SDES line"); + } + } catch (match_error& exception) { + throw parse_error("Error while analyzing the SDES line."); + } + + // Check if the attribute starts with a=crypto + // and get the tag for this line + tagPattern << sdesLine.at(0); + try { + std::string tag = tagPattern.group("tag"); + std::cout << "tag = " << tag << std::endl; + } catch (match_error& exception) { + throw parse_error("Error while parsing the tag field"); + } + + // Check if the crypto suite is valid and retreive + // its value. + cryptoSuitePattern << sdesLine.at(1); + try { + std::string cryptoSuite + cryptoSuite = cryptoSuitePattern.group("cryptoSuite"); + std::cout << "crypto-suite = " << cryptoSuite << std::endl; + } catch (match_error& exception) { + throw parse_error("Error while parsing the crypto-suite field"); + } + + // Parse one or more key-params field. + keyParamsPattern << sdesLine.at(2); + try { + while (keyParamsPattern.matches()) { + std::string srtpKeyMethod; + srtpKeyMethod = keyParamsMatched.group("srtpKeyMethod"); + std::cout << "srtp-key-method = " << srtpKeyMethod << std::endl; + + std::string srtpKeyInfo; + srtpKeyInfo = keyParamsPattern.group("srtpKeyInfo"); + std::cout << "srtp-key-info = " << srtpKeyInfo << std::endl; + + std::string lifetime; + lifetime = keyParamsPattern.group("lifetime"); + std::cout << "lifetime = " << lifetime << std::endl; + + std::string mkiValue + mkiValue = keyParamsPattern.group("mkiValue"); + std::cout << "mkiValue = " << mkiValue << std::endl; + + std::string mkiLength; + mkiLength = keyParamsPattern.group("mkiLength"); + std::cout << "mkiLength = " << mkiLength << std::endl; + } + } catch (match_error& exception) { + throw parse_error("Error while parsing the key-params field"); + } + + /** + * Parse the optional session-param fields + * @todo Implement this ! + */ + /* + if (sdesLine.size() == 3) continue; + + int i; + for (i = 3; i < sdesLine.size(); i++) { + sessionParamPattern << sdesLine.at(i); + while (sessionpParamPattern.matches()) { + + } catch (match_error& exception) { + throw parse_error("Error while parsing the crypto-suite field"); + } + } + } */ + } + } -bool SdesNegotiator::negotiate (void) +bool SdesNegotiator::negotiate(void) { - parse(); -} + parse(); } diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 53ae937f43edfea6bc71ca5dbdbc0ecfb7a2b14e..dae0f09b649292e0988b2e5ba838bb7417258216 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -773,9 +773,11 @@ SIPVoIPLink::answer (const CallID& id) // Terminate the call _debug ("SIPVoIPLink::answer: fail terminate call %s \n",call->getCallId().c_str()); + if(call->getAudioRtp()) + call->getAudioRtp()->stop (); + terminateOneCall (call->getCallId()); removeCall (call->getCallId()); - call->getAudioRtp()->stop (); return false; } } @@ -1342,7 +1344,8 @@ SIPVoIPLink::SIPCallServerFailure (SIPCall *call) Manager::instance().callFailure (id); terminateOneCall (id); removeCall (id); - call->getAudioRtp()->stop(); + if (call->getAudioRtp ()) + call->getAudioRtp()->stop(); } } @@ -2319,6 +2322,8 @@ pj_status_t SIPVoIPLink::createTlsTransport (AccountID id) (int) a_name.host.slen, a_name.host.ptr, (int) a_name.port, localAddress.c_str(), (int) localTlsPort); + + status = pjsip_tls_transport_start (_endpt, tls_setting, &local_addr, &a_name, 1, &tls); if (status != PJ_SUCCESS) { @@ -2973,10 +2978,15 @@ mod_on_rx_request (pjsip_rx_data *rdata) account = dynamic_cast<SIPAccount *> (Manager::instance().getAccount (account_id)); if (account != NULL) { - addrToUse = account->getSessionAddress (); + if (account_id == AccountNULL) + addrToUse = link->getLocalIPAddress(); + else + addrToUse = account->getSessionAddress (); } - else + else { addrToUse = link->getLocalIPAddress(); + } + // Have to do some stuff with the SDP // Set the codec map, IP, peer number and so on... for the SIPCall object diff --git a/sflphone-common/src/sip/testRegex.cpp b/sflphone-common/src/sip/testRegex.cpp deleted file mode 100644 index 45152627743263436cfc1fc4b215aa79026498dd..0000000000000000000000000000000000000000 --- a/sflphone-common/src/sip/testRegex.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "Regex.h" -#include <iostream> -#include <algorithm> - -std::string regularExpression = "^a=crypto:([0-9]{1,9})" \ - "[\x20\x09](AES_CM_128_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_32|F8_128_HMAC_SHA1_80|[A-Za-z0-9_]+)" \ - "[\x20\x09](inline|[A-Za-z0-9_]+)\\:([A-Za-z0-9\x2B\x2F\x3D]+)\\|2\\^([0-9]+)\\|([0-9]+)\\:([0-9]{1,3})\\;?" \ - "[\x20\x09]?(kdr\\=[0-9]{1,2}|UNENCRYPTED_SRTP|UNENCRYPTED_SRTCP|UNAUTHENTICATED_SRTP|(FEC_ORDER)=(FEC_SRTP|SRTP_FEC)" \ - "|(FEC_KEY)=|(WSH)=([0-9]{1,2})|(?<!\\-)[[:graph:]]+)*"; - -std::string subject = "a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32 kdr=12"; - -void printSubstring (const std::string& substring) -{ - std::cout << substring << std::endl; -} - -void testFindMethods (void) -{ - // Test the find methods - // - std::cout << "Testing pattern 1" << std::endl; - - sfl::Regex pattern (regularExpression); - - // Test the findall method - std::vector<std::string> substring = pattern.findall (subject); - -std: - for_each (substring.begin(), substring.end(), printSubstring); - - // Test the finditer method - sfl::range range = pattern.finditer (subject); - std::for_each (range.first, range.second, printSubstring); - - // Instanciate a new Regex object - // but set the pattern only after - // the constructor was called. - std::cout << std::endl << "Testing pattern 2" << std::endl; -} - -void testOperators (void) -{ - sfl::Regex pattern2; - - pattern2.setPattern (regularExpression); - pattern2.compile(); - - sfl::range range = pattern2.finditer (subject); - std::for_each (range.first, range.second, printSubstring); - - // Instanciate a new Regex object - // but set the pattern only after - // the constructor was called. - // Use the = operator to set the - // regular expression. - std::cout << std::endl << "Testing pattern 3" << std::endl; - - sfl::Regex pattern3; - - pattern3 = regularExpression; - - range = pattern3.finditer (subject); - std::for_each (range.first, range.second, printSubstring); - - // Test the << and >> operators - std::cout << std::endl << "Testing pattern 4" << std::endl; - sfl::Regex pattern4; - - pattern4 = regularExpression; - - pattern4 << subject; - - std::vector<std::string> outputVector; - pattern4 >> outputVector; - std::for_each (outputVector.begin(), outputVector.end(), printSubstring); -} - -void testGroup (void) -{ - std::cout << std::endl << "Testing group feature" << std::endl; - - sfl::Regex pattern; - - pattern = "^a=crypto:(?P<tag>[0-9]{1,9})"; - - pattern << subject; - - std::string substring = pattern.group ("tag"); - - std::cout << "Substring: " << substring << std::endl; -} - -int main (void) -{ - testFindMethods(); - testOperators(); - testGroup(); - - return 0; -} - diff --git a/sflphone-common/src/util/Pattern.cpp b/sflphone-common/src/util/Pattern.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b88c286bfd54c2bd21efb678519fe56fceb5d034 --- /dev/null +++ b/sflphone-common/src/util/Pattern.cpp @@ -0,0 +1,295 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "Pattern.h" +#include <sstream> +#include <cstdio> +namespace sfl { +namespace util { + Pattern::Pattern(const std::string& pattern, const std::string& options = ""): + _pattern(pattern), + _ovector(NULL), + _ovectorSize(0), + _re(NULL), + _count(0), + _options(0) + { + // Set offsets + _offset[0] = _offset[1] = 0; + + // Set options. + _optionsDescription = options; + + for(unsigned int i = 0; i < options.length(); i++) { + switch(options.at(i)) { + case 'i': + _options |= PCRE_CASELESS; + break; + case 'm': + _options |= PCRE_MULTILINE; + break; + case 's': + _options |= PCRE_DOTALL; + break; + case 'x': + _options |= PCRE_EXTENDED; + break; + } + } + + // Compile the pattern. + compile(); + } + + Pattern::~Pattern() + { + if (_re != NULL) { + pcre_free(_re); + } + + delete[] _ovector; + } + + void Pattern::compile(void) + { + // Compile the pattern + int offset; + const char * error; + + _re = pcre_compile(_pattern.c_str(), 0, &error, &offset, NULL); + + if (_re == NULL) { + std::string offsetStr; + std::stringstream ss; + ss << offset; + offsetStr = ss.str(); + + std::string msg("PCRE compiling failed at offset " + offsetStr); + + throw compile_error(msg); + } + + // Allocate an appropriate amount + // of memory for the output vector. + int captureCount; + pcre_fullinfo(_re, NULL, PCRE_INFO_CAPTURECOUNT, &captureCount); + + delete[] _ovector; + _ovector = new int[(captureCount + 1)*3]; + _ovectorSize = (captureCount + 1) * 3; + } + + unsigned int Pattern::getCaptureGroupCount(void) + { + int captureCount; + pcre_fullinfo(_re, NULL, PCRE_INFO_CAPTURECOUNT, &captureCount); + return captureCount; + } + + std::vector<std::string> Pattern::groups(void) + { + const char ** stringList; + + pcre_get_substring_list(_subject.c_str(), + _ovector, + _count, + &stringList); + + std::vector<std::string> matchedSubstrings; + int i = 1; + while(stringList[i] != NULL) { + matchedSubstrings.push_back(stringList[i]); + printf("Substr: <start>%s<end>\n", stringList[i]); + i++; + } + + pcre_free_substring_list(stringList); + + return matchedSubstrings; + } + + std::string Pattern::group(int groupNumber) + { + const char * stringPtr; + + int rc = pcre_get_substring( + _subject.substr(_offset[0]).c_str(), + _ovector, + _count, + groupNumber, + &stringPtr); + + if (rc < 0) { + switch (rc) { + case PCRE_ERROR_NOSUBSTRING: + throw std::out_of_range("Invalid group reference."); + case PCRE_ERROR_NOMEMORY: + throw match_error("Memory exhausted."); + default: + throw match_error("Failed to get named substring."); + } + } + + std::string matchedStr(stringPtr); + + pcre_free_substring(stringPtr); + + return matchedStr; + } + + std::string Pattern::group(const std::string& groupName) + { + const char * stringPtr = NULL; + + int rc = pcre_get_named_substring( + _re, + _subject.substr(_offset[0]).c_str(), + _ovector, + _count, + groupName.c_str(), + &stringPtr); + + if (rc < 0) { + switch (rc) { + case PCRE_ERROR_NOSUBSTRING: + throw std::out_of_range("Invalid group reference."); + case PCRE_ERROR_NOMEMORY: + throw match_error("Memory exhausted."); + default: + throw match_error("Failed to get named substring."); + } + } + + std::string matchedStr(stringPtr); + + pcre_free_substring(stringPtr); + + return matchedStr; + } + + size_t Pattern::start(const std::string& groupName) const + { + int index = pcre_get_stringnumber(_re, groupName.c_str()); + start(index); + } + + size_t Pattern::start(unsigned int groupNumber) const + { + if(groupNumber <= _count) { + return _ovector[(groupNumber + 1) * 2]; + } else { + throw std::out_of_range("Invalid group reference."); + } + } + + size_t Pattern::start(void) const + { + return _ovector[0] + _offset[0]; + } + + size_t Pattern::end(const std::string& groupName) const + { + int index = pcre_get_stringnumber(_re, groupName.c_str()); + end(index); + } + + size_t Pattern::end(unsigned int groupNumber) const + { + if(groupNumber <= _count) { + return _ovector[ ((groupNumber + 1) * 2) + 1 ] - 1; + } else { + throw std::out_of_range("Invalid group reference."); + } + } + + size_t Pattern::end(void) const + { + return (_ovector[1] - 1) + _offset[0]; + } + + bool Pattern::matches(void) throw(match_error) + { + matches(_subject); + } + + bool Pattern::matches(const std::string& subject) throw(match_error) + { + //printf("\n\n\nCurrent offset: %d, old offset: %d\n", _offset[1], _offset[0]); + //printf("Trying <start>%s<end>\n", subject.substr(_offset[1]).c_str()); + + // Try to find a match for this pattern + int rc = pcre_exec( + _re, + NULL, + subject.substr(_offset[1]).c_str(), + subject.length() - _offset[1], + 0, + _options, + _ovector, + _ovectorSize); + + // Matching failed. + if (rc < 0) { + _offset[0] = _offset[1] = 0; + //printf("Matching failed with %d\n", rc); + return false; + } + + // Handle the case if matching should be done globally + if (_optionsDescription.find("g") != std::string::npos) { + _offset[0] = _offset[1]; + // New offset is old offset + end of relative offset + _offset[1] = _ovector[1] + _offset[0]; + } + + //printf("Matching succeeded with %d to %d\n", (int) start(), (int) end()); + + // Matching succeded but not enough space. + if (rc == 0) { + throw match_error("No space to store all substrings."); + // @TODO figure out something more clever to do in that case. + } + + // Matching succeeded. Keep the number of substrings for + // subsequent calls to group(). + _count = rc; + + return true; + } + + std::vector<std::string> Pattern::split(void) + { + size_t tokenEnd = -1; + size_t tokenStart = 0; + + std::vector<std::string> substringSplitted; + + while(matches()) { + tokenStart = start(); + substringSplitted.push_back(_subject.substr(tokenEnd + 1, + tokenStart - tokenEnd - 1)); + tokenEnd = end(); + } + + substringSplitted.push_back(_subject.substr(tokenEnd + 1, + tokenStart - tokenEnd - 1)); + return substringSplitted; + } +} +} + diff --git a/sflphone-common/src/util/Pattern.h b/sflphone-common/src/util/Pattern.h new file mode 100644 index 0000000000000000000000000000000000000000..676ecbd85ef966cdff2456b45ad03b3102aca18b --- /dev/null +++ b/sflphone-common/src/util/Pattern.h @@ -0,0 +1,339 @@ +/* + * Copyright (C) 2009 Savoir-Faire Linux inc. + * Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef __SFL_PATTERN_H__ +#define __SFL_PATTERN_H__ + +#include <stdexcept> +#include <string> +#include <vector> +#include <pcre.h> + +namespace sfl { +namespace util { + /** + * Exception object that is thrown when + * an error occured while compiling the + * regular expression. + */ + class compile_error : public std::invalid_argument + { + public: + explicit compile_error(const std::string& error) : + std::invalid_argument(error) {} + }; + + /** + * Exception object that is thrown when + * an error occured while mathing a + * pattern to an expression. + */ + class match_error : public std::invalid_argument + { + public: + match_error(const std::string& error) : + std::invalid_argument(error) {} + }; + + /** + * This class implements in its way + * some of the libpcre library. + */ + + class Pattern { + + public: + + /** + * Constructor for a regular expression + * pattern evaluator/matcher. + * + * @param pattern + * The regular expression to + * be used for this instance. + */ + + Pattern(const std::string& pattern, + const std::string& options); + + /** + * Destructor. Pcre pattern gets freed + * here. + */ + ~Pattern(); + + /** + * Assignment operator overloading. + * Set the regular expression + * to be used on subject strings + * and compile the regular expression + * from that string. + * + * @param pattern The new pattern + */ + void operator=(const std::string& pattern) { + _pattern = pattern; + compile(); + } + + void operator=(const char * pattern) { + _pattern = pattern; + compile(); + } + + /** + * Compile the regular expression + * from the pattern that was set for + * this object. + */ + void compile(void); + + /** + * Get the currently set regular expression + * that is used on subject strings + * + * @return The currently set pattern + */ + inline std::string getPattern(void) { return _pattern; } + + /** + * << operator overload. Sets the the subject + * for latter use on the >> operator. + * + * @param subject + * The expression to be evaluated + * by the pattern. + * + */ + void operator<<(const std::string& subject) { + _subject = subject; + } + + /** + * Get the start position of the overall match. + * + * @return the start position of the overall match. + */ + size_t start(void) const; + + /** + * Get the start position of the specified match. + * + * @param groupNumber The capturing group number. + * + * @return the start position of the specified match. + */ + size_t start(unsigned int groupNumber) const; + + /** + * Get the start position of the specified match. + * + * @param groupName The capturing group name. + * + * @return the start position of the specified match. + */ + size_t start(const std::string& groupName) const; + + /** + * Get the end position of the overall match. + * + * @return the end position of the overall match. + */ + size_t end(void) const; + + /** + * Get the end position of the specified match. + * + * @param groupNumber The capturing group number. + * + * @return the end position of the specified match. + */ + size_t end(unsigned int groupNumber) const; + + /** + * Get the end position of the specified match. + * + * @param groupName The capturing group name. + * + * @return the end position of the specified match. + */ + size_t end(const std::string& groupName) const; + + /** + * Get the number of capturing groups in the + * compiled regex. + * + * @return The number of capture groups. + * + * @pre The regular expression should have been + * compiled prior to the execution of this method. + */ + unsigned int getCaptureGroupCount(void); + + /** + * Get the substring matched in a capturing + * group (named or unnamed). + * + * This methods only performs a basic lookup + * inside its internal substring table. Thus, + * matches() should have been called prior to + * this method in order to obtain the desired + * output. + * + * @param groupName The name of the group + * + * @return the substring matched by the + * regular expression designated + * the group name. + */ + std::string group(const std::string& groupName); + + /** + * Get the substring matched in a named group. + * + * This methods only performs a basic lookup + * inside its internal substring table. Thus, + * matches() should have been called prior to + * this method in order to obtain the desired + * output. + * + * @param groupNumber The number of the group. + * + * @return the substring matched by the + * regular expression designated + * the group number. + */ + std::string group(int groupNumber); + + /** + * Similar to python's MatchObject.groups. Get all + * the substrings matched by the capture groups defined + * in the pattern. The complete (implicit) capture group + * is not returned : ie only groups from 1 up to the number + * of groups in the pattern are returned. + * + * @return A vector of stings that were matched by some + * capturing group in the pattern. + * + * @pre The regular expression should have been + * compiled prior to the execution of this method. + */ + std::vector<std::string> groups(void); + + /** + * Try to match the compiled pattern with a + * subject. + * + * @param subject Subject to be matched + * by the pattern. + * + * @return true If the subject matches the pattern, + * false otherwise. + * + * @pre The regular expression should have been + * compiled prior to the execution of this method. + * + * @post The internal substring table will be updated + * with the new matches. Therefore, subsequent + * calls to group may return different results. + */ + bool matches(const std::string& subject) throw(match_error); + + /** + * Try to match the compiled pattern with the implicit + * subject. + * + * @return true If the subject matches the pattern, + * false otherwise. + * + * @pre The regular expression should have been + * compiled prior to the execution of this method. + * + * @post The internal substring table will be updated + * with the new matches. Therefore, subsequent + * calls to group may return different results. + */ + bool matches(void) throw(match_error); + + /** + * Split the subject into a list of substrings. + * + * @return A vector of substrings. + * + * @pre The regular expression should have been + * compiled prior to the execution of this method. + * + * @post The internal subject won't be affected by this + * by this operation. In other words: subject_before = + * subject_after. + */ + std::vector<std::string> split(void) throw(match_error); + + private: + /** + * The regular expression that represents that pattern. + */ + std::string _pattern; + + /** + * The optional subject string. + */ + std::string _subject; + + /** + * PCRE struct that + * contains the compiled regular + * expression + */ + pcre * _re; + + /** + * The internal output vector used by PCRE. + */ + int * _ovector; + + /** + * The size of the _ovector + */ + int _ovectorSize; + + /** + * Current offset in the _ovector; + */ + + int _offset[2]; + + /** + * The number of substrings matched after calling + * pcre_exec. + */ + int _count; + + /** + * PCRE options for this pattern. + */ + int _options; + + /** + * String representation of the options. + */ + std::string _optionsDescription; + }; +} +} + +#endif