diff --git a/configure.ac b/configure.ac index 8d6672d4885d5a9215cbe41f7fec2cafd4a2808d..e0108a27a838387af7d1b79794aa8896bd535517 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl SFLPhone - configure.ac for automake 1.9 and autoconf 2.59 dnl dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([SFLphone],[0.9.3],[sflphoneteam@savoirfairelinux.com],[sflphone]) +AC_INIT([SFLphone],[0.9.4],[sflphoneteam@savoirfairelinux.com],[sflphone]) AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2009]]) AC_REVISION([$Revision$]) @@ -39,7 +39,8 @@ AC_CONFIG_FILES([src/Makefile \ src/dbus/Makefile \ src/plug-in/audiorecorder/Makefile \ src/plug-in/Makefile \ - src/plug-in/test/Makefile]) + src/plug-in/test/Makefile \ + src/hooks/Makefile]) dnl Unitary test section AC_CONFIG_FILES([test/Makefile]) @@ -150,6 +151,12 @@ if test "x${have_libpj}" = "xfalse" ; then fi AC_SUBST(SIP_CFLAGS) +dnl Check for uuid development package - name: uuid-dev +UUID_MIN_VERSION=1.0 +PKG_CHECK_MODULES(UUID, uuid >= ${UUID_MIN_VERSION}) +AC_SUBST(UUID_CFLAGS) +AC_SUBST(UUID_LIBS) + dnl Check for alsa development package - name: libasound2-dev LIBASOUND2_MIN_VERSION=1.0 PKG_CHECK_MODULES(ALSA, alsa >= ${LIBASOUND2_MIN_VERSION}) @@ -188,18 +195,11 @@ PKG_CHECK_MODULES(DBUSCPP, dbus-c++-1 >= ${LIBDBUSCPP_MIN_VERSION}) AC_SUBST(DBUSCPP_LIBS) AC_SUBST(DBUSCPP_CFLAGS) -LIBOPENSSL_MIN_VERSION=0.9.8 -PKG_CHECK_MODULES(LIBOPENSSL, libssl >= ${LIBOPENSSL_MIN_VERSION}) -AC_SUBST(LIBOPENSSL_LIBS) -AC_SUBST(LIBOPENSSL_CFLAGS) - dnl Check for libcppunit-dev CPPUNIT_MIN_VERSION=1.12 PKG_CHECK_MODULES(CPPUNIT, cppunit >= ${CPPUNIT_MIN_VERSION}) AC_SUBST(CPPUNIT_LIBS) -LIBSSL_MIN_VERSION=0.9.8 - # check for libgsm1 (doesn't use pkg-config) dnl Check for libgsm AC_ARG_WITH([gsm], diff --git a/debian/changelog b/debian/changelog index a9a2d466e2f55973d8e2469f393913399fc2a141..82738fe39e45b91e3ac4d680a3d0c2706644fda3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +sflphone (0.9.4-0beta1) %system%; urgency=low + + [ Alexandre Savard ] + * Display codec used during conversation on the GUI + * Enable/disable STUN parameters at runtime + * Refactor search bar use + [ Emmanuel Milou ] + * Build system fixes + * Implement SIP re-invite + * Implement IP to IP call + [ Julien Bonjean ] + * Integrate GNOME address book based on evolution data server + + -- Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Fri, 20 Mar 2009 18:29:15 -0500 + + sflphone (0.9.3-0ubuntu3) %system%; urgency=low [ Alexandre Savard ] diff --git a/debian/control.intrepid b/debian/control.intrepid index efcff9811b55723f4e4cf5e7ea66d40fd9a1a374..737fc36b64c051d0cbee4f8b4dff548f014d2234 100644 --- a/debian/control.intrepid +++ b/debian/control.intrepid @@ -2,7 +2,7 @@ Source: sflphone Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional -Build-Depends: debhelper (>= 5), autoconf, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libgtk2.0-dev, libsexy-dev, libdbus-1-dev, libdbus-glib-1-dev, libnotify-dev, libasound2-dev, libspeexdsp-dev +Build-Depends: debhelper (>= 5), autoconf, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libgtk2.0-dev, libsexy-dev, libdbus-1-dev, libdbus-glib-1-dev, libnotify-dev, libasound2-dev, libspeexdsp-dev, uuid-dev Standards-Version: 3.8.0 Package: sflphone diff --git a/debian/control.jaunty b/debian/control.jaunty index e1d859266bfa82acbb19c706427ce25bd8f3680f..b88584932302734a1bd1de6494b94d9040584f73 100644 --- a/debian/control.jaunty +++ b/debian/control.jaunty @@ -2,7 +2,7 @@ Source: sflphone Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional -Build-Depends: debhelper (>= 5), autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libgtk2.0-dev, libsexy-dev, libdbus-1-dev, libdbus-glib-1-dev, libnotify-dev, libasound2-dev, libspeexdsp-dev +Build-Depends: debhelper (>= 5), autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libgtk2.0-dev, libsexy-dev, libdbus-1-dev, libdbus-glib-1-dev, libnotify-dev, libasound2-dev, libspeexdsp-dev, uuid-dev Standards-Version: 3.7.3 Package: sflphone diff --git a/debian/rules b/debian/rules index fd00d4698a8c5990de34d79b2a027973d7334c2f..c67463555b7fb6a22722ba263014dc2e120a600a 100755 --- a/debian/rules +++ b/debian/rules @@ -20,12 +20,12 @@ configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. + cd libs/dbus-c++; ./autogen.sh; ./configure + cd libs/libiax2; ./gen.sh; ./configure + cd libs/pjproject-1.0.1; ./configure ./autogen.sh --prefix=/usr --with-debug cd sflphone-gtk; ./autogen.sh --prefix=/usr - cd libs/pjproject-1.0.1; ./configure touch configure-stamp - cd libs/dbus-c++; ./configure - cd libs/libiax2; ./configure #Architecture diff --git a/libs/dbus-c++/INSTALL b/libs/dbus-c++/INSTALL index 23e5f25d0e5f85798dcfb368ecb2f04f59777f61..d3c5b40a94091285c27361905f591af64c1f7b21 100644 --- a/libs/dbus-c++/INSTALL +++ b/libs/dbus-c++/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -67,6 +67,9 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== @@ -78,7 +81,7 @@ details on some of the pertinent environment variables. by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,17 +90,15 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== @@ -190,12 +191,12 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== diff --git a/libs/dbus-c++/depcomp b/libs/dbus-c++/depcomp index 04701da536f33a7c39d7bb01b87a70ae3a776df5..e5f9736c7239301c765e2d7abefb9bb9b9237ac5 100755 --- a/libs/dbus-c++/depcomp +++ b/libs/dbus-c++/depcomp @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. # 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 @@ -91,7 +92,20 @@ gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -201,34 +215,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -276,6 +295,46 @@ icc) rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +347,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is diff --git a/libs/dbus-c++/install-sh b/libs/dbus-c++/install-sh index 4d4a9519eaf88b18fb157dfe5fae59c1c5d005c7..a5897de6ea7f74f83fd793474bb4738d32884719 100755 --- a/libs/dbus-c++/install-sh +++ b/libs/dbus-c++/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,38 +39,68 @@ scriptversion=2005-05-14.22 # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +posix_mkdir= + +# Desired mode of installed file. +mode=0755 -chmodcmd="$chmodprog 0755" -chowncmd= chgrpcmd= -stripcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac + shift done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,24 +199,47 @@ if test -z "$1"; then exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -190,71 +248,199 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - # Make sure that the destination directory exists. + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac - pathcomp= + eval "$initialize_posix_glob" - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +448,9 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -273,48 +458,59 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi done -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" diff --git a/libs/dbus-c++/missing b/libs/dbus-c++/missing index 894e786e16c1d0d94dfc08d6b475270fe1418d6a..1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8 100755 --- a/libs/dbus-c++/missing +++ b/libs/dbus-c++/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. @@ -33,6 +33,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 diff --git a/libs/libiax2/INSTALL b/libs/libiax2/INSTALL index 81fa6ffa451ee21fd1c60d4ba33acd5c36bc6865..5bb6e7b7e1a1d3ba4362b1467fabbf2acb70dcbd 120000 --- a/libs/libiax2/INSTALL +++ b/libs/libiax2/INSTALL @@ -1 +1 @@ -/usr/share/automake-1.9/INSTALL \ No newline at end of file +/usr/share/automake-1.10/INSTALL \ No newline at end of file diff --git a/po/fr.po b/po/fr.po index 95c7c9f0c8cc68fe42ac5ecc15363a152692c706..0d95e0cefa7ea67399ed6961240c2d8afd0e9365 100644 --- a/po/fr.po +++ b/po/fr.po @@ -45,7 +45,7 @@ msgstr "Réseau non trouvé" #: ../sflphone-gtk/src/accountlist.c:176 msgid "Host unreachable" -msgstr "_Serveur introuvable" +msgstr "Serveur introuvable" #: ../sflphone-gtk/src/accountlist.c:179 msgid "Stun configuration error" diff --git a/sflphone-gtk/.cproject b/sflphone-gtk/.cproject new file mode 100644 index 0000000000000000000000000000000000000000..0164b0a62c9d2857a79d40d75d440852bc0f37aa --- /dev/null +++ b/sflphone-gtk/.cproject @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?fileVersion 4.0.0?> + +<cproject> +<storageModule moduleId="org.eclipse.cdt.core.settings"> +<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.666814495"> +<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.666814495" moduleId="org.eclipse.cdt.core.settings" name="Linux GCC"> +<externalSettings/> +<extensions> +<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> +<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +</extensions> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<configuration artifactName="sflphone-gtk" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.666814495" name="Linux GCC" parent="org.eclipse.cdt.build.core.emptycfg"> +<folderInfo id="cdt.managedbuild.toolchain.gnu.base.666814495.1839755914" name="/" resourcePath=""> +<toolChain id="cdt.managedbuild.toolchain.gnu.base.1195789621" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base"> +<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1493285969" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/> +<builder id="cdt.managedbuild.target.gnu.builder.base.421214348" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> +<tool id="cdt.managedbuild.tool.gnu.archiver.base.1558364998" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> +<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.731757910" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/> +<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1299938473" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> +<option id="gnu.c.compiler.option.include.paths.1303328171" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> +<listOptionValue builtIn="false" value=""${workspace_loc:/sflphone-gtk}""/> +<listOptionValue builtIn="false" value=""${workspace_loc:/sflphone-gtk/src}""/> +<listOptionValue builtIn="false" value="/usr/include/gtk-2.0"/> +<listOptionValue builtIn="false" value="/usr/include/glib-2.0"/> +<listOptionValue builtIn="false" value="/usr/include/dbus-1.0"/> +</option> +<option id="gnu.c.compiler.option.preprocessor.def.symbols.1676995808" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> +<listOptionValue builtIn="false" value=""ICONS_DIR="/usr/share/sflphone\""/> +<listOptionValue builtIn="false" value=""CODECS_DIR="/usr/lib/sflphone/codecs\""/> +</option> +<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1938301835" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.linker.base.981882139" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"> +<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1274984809" superClass="cdt.managedbuild.tool.gnu.c.linker.input"> +<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> +<additionalInput kind="additionalinput" paths="$(LIBS)"/> +</inputType> +</tool> +<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.963771621" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/> +<tool id="cdt.managedbuild.tool.gnu.assembler.base.1924201184" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> +<option id="gnu.both.asm.option.include.paths.1513412733" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"/> +<inputType id="cdt.managedbuild.tool.gnu.assembler.input.938125330" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> +</tool> +</toolChain> +</folderInfo> +</configuration> +</storageModule> +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> + +<storageModule moduleId="scannerConfiguration"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.666814495;cdt.managedbuild.toolchain.gnu.base.666814495.1839755914;cdt.managedbuild.tool.gnu.c.compiler.base.1299938473;cdt.managedbuild.tool.gnu.c.compiler.input.1938301835"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +</storageModule> +</cconfiguration> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<project id="sflphone-gtk.null.1710073778" name="sflphone-gtk"/> +</storageModule> +</cproject> diff --git a/sflphone-gtk/.project b/sflphone-gtk/.project new file mode 100644 index 0000000000000000000000000000000000000000..8c74f4d116d9937d808985d8e6ff97bef8780536 --- /dev/null +++ b/sflphone-gtk/.project @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>sflphone-gtk</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <triggers>clean,full,incremental,</triggers> + <arguments> + <dictionary> + <key>?name?</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.append_environment</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.autoBuildTarget</key> + <value>all</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildArguments</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildCommand</key> + <value>make</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.cleanBuildTarget</key> + <value>clean</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.contents</key> + <value>org.eclipse.cdt.make.core.activeConfigSettings</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableAutoBuild</key> + <value>false</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableCleanBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableFullBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.fullBuildTarget</key> + <value>all</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.stopOnError</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.core.cnature</nature> + </natures> +</projectDescription> diff --git a/sflphone-gtk/.settings/org.eclipse.cdt.core.prefs b/sflphone-gtk/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..55576b0f05ecb8cbfcdc2ed0863a9d1cd4426ca5 --- /dev/null +++ b/sflphone-gtk/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,148 @@ +#Thu Feb 26 16:02:29 EST 2009 +eclipse.preferences.version=1 +org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80 +org.eclipse.cdt.core.formatter.alignment_for_compact_if=0 +org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16 +org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48 +org.eclipse.cdt.core.formatter.alignment_for_expression_list=0 +org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.cdt.core.formatter.compact_else_if=true +org.eclipse.cdt.core.formatter.continuation_indentation=2 +org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false +org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true +org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=false +org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false +org.eclipse.cdt.core.formatter.indent_empty_lines=false +org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.cdt.core.formatter.indentation.size=2 +org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.cdt.core.formatter.lineSplit=80 +org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.cdt.core.formatter.tabulation.char=space +org.eclipse.cdt.core.formatter.tabulation.size=2 +org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false diff --git a/sflphone-gtk/.settings/org.eclipse.cdt.ui.prefs b/sflphone-gtk/.settings/org.eclipse.cdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..6a9c16b18bbcb98a8dba89d549ec3ad4728cadbb --- /dev/null +++ b/sflphone-gtk/.settings/org.eclipse.cdt.ui.prefs @@ -0,0 +1,4 @@ +#Thu Feb 26 16:02:29 EST 2009 +eclipse.preferences.version=1 +formatter_profile=_SFLPhone +formatter_settings_version=1 diff --git a/sflphone-gtk/.settings/org.eclipse.ltk.core.refactoring.prefs b/sflphone-gtk/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000000000000000000000000000000000000..15e25eb7b9e6ef89ae7f77907ea166a4b094c17e --- /dev/null +++ b/sflphone-gtk/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,3 @@ +#Thu Feb 26 15:43:10 EST 2009 +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac index 2864ef4cf513198a24413a24614d56ede7110563..e6e25412930a5348f41dd659386bd3fe14909bb8 100644 --- a/sflphone-gtk/configure.ac +++ b/sflphone-gtk/configure.ac @@ -1,10 +1,10 @@ -AC_INIT([SFLphone],[0.9.3],[sflphoneteam@savoirfairelinux.com],[sflphone]) +AC_INIT([SFLphone],[0.9.4],[sflphoneteam@savoirfairelinux.com],[sflphone]) AM_CONFIG_HEADER(config.h) LT_INIT PACKAGE=SFLphone -VERSION=0.9.3 +VERSION=0.9.4 AM_INIT_AUTOMAKE($PACKAGE,$VERSION) AC_CONFIG_MACRO_DIR([m4]) @@ -26,17 +26,17 @@ fi AC_PROG_CC AC_PROG_INSTALL AC_STDC_HEADERS +AC_PROG_LIBTOOL PKG_CHECK_MODULES(DEPS, \ dbus-glib-1 >= 0.35 \ libnotify >= 0.4 \ gtk+-2.0 >= 2.2 \ glib-2.0 >= 2.2 \ - libsexy >= 0.1 \ + libsexy >= 0.1 \ libebook-1.2 >= 2.22 ) - AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) diff --git a/sflphone-gtk/pixmaps/Makefile.am b/sflphone-gtk/pixmaps/Makefile.am index ad647489534e07fd5adbab90ac802d96b0d8b52e..b6d11bf8b3f95c76b946a64ef4910fb5d18bec5f 100644 --- a/sflphone-gtk/pixmaps/Makefile.am +++ b/sflphone-gtk/pixmaps/Makefile.am @@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps icon_DATA = sflphone.png -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 history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg wait-on.gif wait-off.gif +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 history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg wait-on.gif buttonsdir = $(datadir)/sflphone EXTRA_DIST = $(buttons_DATA) $(icon_DATA) diff --git a/sflphone-gtk/pixmaps/wait-off.gif b/sflphone-gtk/pixmaps/wait-off.gif deleted file mode 100644 index 14d50e9fac6d8611ff87922a7af51a9065e5d710..0000000000000000000000000000000000000000 Binary files a/sflphone-gtk/pixmaps/wait-off.gif and /dev/null differ diff --git a/sflphone-gtk/pixmaps/wait-on.gif b/sflphone-gtk/pixmaps/wait-on.gif index 1c72ebb554be018511ae972c3f2361dff02dce02..1560b646cff2cc4fd292d7fdb6f7adc7eb484b4a 100644 Binary files a/sflphone-gtk/pixmaps/wait-on.gif and b/sflphone-gtk/pixmaps/wait-on.gif differ diff --git a/sflphone-gtk/src/Makefile.am b/sflphone-gtk/src/Makefile.am index 0f4ed7d1faa047df6257a0f79af7848732c7008f..5947dcd0830475723a046da865e58f49e7c15ce1 100644 --- a/sflphone-gtk/src/Makefile.am +++ b/sflphone-gtk/src/Makefile.am @@ -39,11 +39,12 @@ sflphone_gtk_SOURCES = \ codeclist.c \ timestamp.c \ reqaccount.c \ - addressbook-config.c + addressbook-config.c \ + hooks-config.c noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h audioconf.h codeclist.h assistant.h \ callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltab.h calltree.h configwindow.h \ - accountlist.h accountwindow.h marshaller.h sliders.h $(STATUSICON_HEADER) timestamp.h searchfilter.h reqaccount.h addressbook-config.h + accountlist.h accountwindow.h marshaller.h sliders.h $(STATUSICON_HEADER) timestamp.h searchfilter.h reqaccount.h addressbook-config.h hooks-config.h EXTRA_DIST = marshaller.list diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index f3275f017b2b899ed41b7730c57296f4f258cfbe..4e850958329d331bf6b2c030b496f1a8a426a722 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -230,10 +230,11 @@ gboolean sflphone_init() else { dbus_register(getpid(), "Gtk+ Client"); - current_calls = calltab_init(); - history = calltab_init(); - contacts = calltab_init(); - //if(SHOW_SEARCHBAR) histfilter = create_filter(GTK_TREE_MODEL(history->store)); + current_calls = calltab_init(NULL); + // history = calltab_init("history"); + contacts = calltab_init("contacts"); + history = calltab_init("history"); + histfilter = create_filter(GTK_TREE_MODEL(history->store)); init(); account_list_init (); codec_list_init(); @@ -295,6 +296,7 @@ sflphone_hang_up() void sflphone_pick_up() { + call_t * selectedCall = call_get_selected(active_calltree); if(selectedCall) { @@ -373,7 +375,6 @@ sflphone_off_hold () g_print("Currently recording! \n"); else g_print("Not recording currently \n"); - } @@ -529,7 +530,7 @@ process_dialing(call_t * c, guint keyval, gchar * key) call_t * sflphone_new_call() { - + call_t *c; gchar *from, *to; @@ -680,9 +681,10 @@ sflphone_keypad( guint keyval, gchar * key) sflphone_place_call ( call_t * c ) { + if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0) { - + //format_phone_number (&c->to); if( account_list_get_size() == 0 ) @@ -699,19 +701,23 @@ sflphone_place_call ( call_t * c ) else { + + account_t * current; - if(c->accountID != 0) + if(g_strcasecmp(c->accountID, "") != 0) { current = account_list_get_by_id(c->accountID); - else + } else { current = account_list_get_current(); - + } // printf("sflphone_place_call :: c->accountID : %i \n",c->accountID); // account_t * current = c->accountID; - + + if( current ) { + if(g_strcasecmp(g_hash_table_lookup( current->properties, "Status"),"REGISTERED")==0) { // OK, everything alright - the call is made with the current account @@ -734,6 +740,7 @@ sflphone_place_call ( call_t * c ) } else { + // No current accounts have been setup. // So we place a call with the first registered account // and we change the current account @@ -756,6 +763,7 @@ sflphone_place_call ( call_t * c ) void sflphone_display_selected_codec (const gchar* codecName) { + call_t * selectedCall = call_get_selected(current_calls); gchar* msg; account_t* acc; diff --git a/sflphone-gtk/src/addressbook-config.c b/sflphone-gtk/src/addressbook-config.c index 3edc93265b2fbf92995fb777f2c352995bd0a016..4b2ae63008389d0050604ffbefc2f4be633376ab 100644 --- a/sflphone-gtk/src/addressbook-config.c +++ b/sflphone-gtk/src/addressbook-config.c @@ -94,7 +94,7 @@ static void search_phone_mobile_cb (GtkWidget *widget) { GtkWidget* create_addressbook_settings () { - GtkWidget *ret, *result_frame, *box, *value, *label, *photo, *item; + GtkWidget *ret, *result_frame, *table, *value, *label, *photo, *item; // Load the user value addressbook_load_parameters (&addressbook_config); @@ -106,44 +106,46 @@ GtkWidget* create_addressbook_settings () { gtk_box_pack_start(GTK_BOX(ret), result_frame, FALSE, FALSE, 0); gtk_widget_show (result_frame); - box = gtk_vbox_new( FALSE , 1); - gtk_widget_show (box); - gtk_container_add (GTK_CONTAINER(result_frame) , box); + table = gtk_table_new ( 5, 3, FALSE/* homogeneous */); + gtk_table_set_row_spacings( GTK_TABLE(table), 10); + gtk_table_set_col_spacings( GTK_TABLE(table), 10); + gtk_widget_show(table); + gtk_container_add( GTK_CONTAINER (result_frame) , table ); // SCALE BUTTON - NUMBER OF RESULTS label = gtk_label_new (_("Maximum result number for a request: ")); - gtk_box_pack_start (GTK_BOX(box) , label , FALSE , FALSE , 1); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10); value = gtk_hscale_new_with_range (25.0 , 50.0 , 5.0); gtk_label_set_mnemonic_widget (GTK_LABEL (label), value); gtk_scale_set_digits (GTK_SCALE(value) , 0); gtk_scale_set_value_pos (GTK_SCALE(value) , GTK_POS_RIGHT); gtk_range_set_value (GTK_RANGE( value ) , addressbook_config->max_results); - gtk_box_pack_start (GTK_BOX(box) , value , TRUE , TRUE , 0); g_signal_connect (G_OBJECT (value) , "value-changed" , G_CALLBACK(max_results_cb), NULL ); + gtk_table_attach ( GTK_TABLE( table ), value, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); // PHOTO DISPLAY photo = gtk_check_button_new_with_mnemonic( _("_Display contact photo if available")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(photo), addressbook_config->display_contact_photo); g_signal_connect (G_OBJECT(photo) , "clicked" , G_CALLBACK (display_contact_photo_cb), NULL); - gtk_box_pack_start (GTK_BOX(box) , photo , TRUE , TRUE , 1); + gtk_table_attach ( GTK_TABLE( table ), photo, 0, 3, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); label = gtk_label_new (_("Search for and display: ")); - gtk_box_pack_start (GTK_BOX(box) , label , FALSE , FALSE , 1); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); item = gtk_check_button_new_with_mnemonic( _("_Business phone")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_business); g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_business_cb) , NULL); - gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1); + gtk_table_attach ( GTK_TABLE( table ), item, 1, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); item = gtk_check_button_new_with_mnemonic( _("_Home phone")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_home); g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_home_cb) , NULL); - gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1); + gtk_table_attach ( GTK_TABLE( table ), item, 1, 3, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); item = gtk_check_button_new_with_mnemonic( _("_Mobile phone")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->search_phone_mobile); g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (search_phone_mobile_cb) , NULL); - gtk_box_pack_start (GTK_BOX(box) , item , TRUE , TRUE , 1); + gtk_table_attach ( GTK_TABLE( table ), item, 1, 3, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10); gtk_widget_show_all(ret); diff --git a/sflphone-gtk/src/calllist.h b/sflphone-gtk/src/calllist.h index bfd773263bc7bf227f8341f15878723092b3ffd6..a4f63806eba764779f2b7646027b7e2b116d7cb3 100644 --- a/sflphone-gtk/src/calllist.h +++ b/sflphone-gtk/src/calllist.h @@ -119,6 +119,9 @@ typedef struct { GtkWidget* view; GtkWidget* tree; + GtkWidget* searchbar; + // GtkTreeModel* histfilter; + // Calllist vars GQueue* callQueue; call_t* selectedCall; diff --git a/sflphone-gtk/src/calltab.c b/sflphone-gtk/src/calltab.c index 1ec9a9a95d357d03fa90fc93a8729924d0a6b020..8ed40db848251de1bc8b5fc8a4a9c94c07685649 100644 --- a/sflphone-gtk/src/calltab.c +++ b/sflphone-gtk/src/calltab.c @@ -24,7 +24,7 @@ #include <calltab.h> calltab_t* -calltab_init() +calltab_init(gchar* searchbar_type) { calltab_t* ret; @@ -33,11 +33,14 @@ calltab_init() ret->store = NULL; ret->view = NULL; ret->tree = NULL; + ret->searchbar = NULL; ret->callQueue = NULL; ret->selectedCall = NULL; + // ret->histfilter = NULL; - create_call_tree(ret); + create_call_tree(ret, searchbar_type); call_list_init(ret); + return ret; } diff --git a/sflphone-gtk/src/calltab.h b/sflphone-gtk/src/calltab.h index d3b85ca977f85f159ae9e13dafb44d1a25f09d9b..4438d3d8fcb2810be0948c3a4f0144f0698edc71 100644 --- a/sflphone-gtk/src/calltab.h +++ b/sflphone-gtk/src/calltab.h @@ -23,8 +23,8 @@ #include <calllist.h> #include <gtk/gtk.h> -//GtkTreeModel* histfilter; +GtkTreeModel* histfilter; -calltab_t* calltab_init(); +calltab_t* calltab_init(gchar* searchbar_type); #endif diff --git a/sflphone-gtk/src/calltree.c b/sflphone-gtk/src/calltree.c index f0f1fdfdeca03d9fb872b338d7771a7d57edfc3a..ab6cbfa05cc68149bd19ebc4d2a737e61d6fe65c 100644 --- a/sflphone-gtk/src/calltree.c +++ b/sflphone-gtk/src/calltree.c @@ -25,6 +25,7 @@ #include <actions.h> #include <calltree.h> #include <calllist.h> +#include <calltab.h> #include <menus.h> #include <dbus.h> #include <contactlist/eds.h> @@ -95,6 +96,7 @@ button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUS static void call_button( GtkWidget *widget UNUSED, gpointer data UNUSED) { + g_print("------ call_button ----- \n"); call_t * selectedCall; call_t* new_call; gchar *to, *from; @@ -377,6 +379,7 @@ toolbar_update_buttons () static void selected(GtkTreeSelection *sel, void* data UNUSED ) { + g_print("---- selected --- \n"); GtkTreeIter iter; GValue val; GtkTreeModel *model = (GtkTreeModel*)active_calltree->store; @@ -604,7 +607,7 @@ reset_call_tree (calltab_t* tab) } void -create_call_tree (calltab_t* tab) + create_call_tree (calltab_t* tab, gchar* searchbar_type) { GtkWidget *sw; GtkCellRenderer *rend; @@ -665,13 +668,24 @@ create_call_tree (calltab_t* tab) NULL); gtk_box_pack_start(GTK_BOX(tab->tree), sw, TRUE, TRUE, 0); + + // no search bar if tab is either "history" or "addressbook" + if(searchbar_type){ + create_searchbar(tab,searchbar_type); + gtk_box_pack_start(GTK_BOX(tab->tree), tab->searchbar, FALSE, TRUE, 0); + } gtk_widget_show(tab->tree); + + // gtk_widget_show(tab->searchbar); + //toolbar_update_buttons(); } + + void update_call_tree_remove (calltab_t* tab, call_t * c) { @@ -826,6 +840,21 @@ update_call_tree (calltab_t* tab, call_t * c) toolbar_update_buttons(); } +void +create_searchbar(calltab_t* tab, gchar* searchbar_type) +{ + // g_strcmp0 returns 0 if str1 == str2 + if(g_strcmp0(searchbar_type,"history") == 0){ + + tab->searchbar = create_filter_entry_history(); + + } + + else if(g_strcmp0(searchbar_type,"contacts") == 0) + tab->searchbar = create_filter_entry_contact(); + +} + void update_call_tree_add (calltab_t* tab, call_t * c) { diff --git a/sflphone-gtk/src/calltree.h b/sflphone-gtk/src/calltree.h index f307116040084dc7f11aaca0681bf7feb7e41b9c..dd1de4d91a467c2f919f84376b53586e1e6462d6 100644 --- a/sflphone-gtk/src/calltree.h +++ b/sflphone-gtk/src/calltree.h @@ -31,7 +31,8 @@ * @brief The GtkTreeView that list calls in the main window. */ -GtkWidget * filter_entry; +GtkWidget * filter_entry_contact; +GtkWidget * filter_entry_history; calltab_t* active_calltree; @@ -41,7 +42,7 @@ void free_call_t (call_t *c); * Create a new widget calltree * @return GtkWidget* A new widget */ -void create_call_tree(calltab_t* tab); +void create_call_tree(calltab_t* tab, gchar* searchbar_type); /** * Update the toolbar's buttons state, according to the call state @@ -73,8 +74,14 @@ void reset_call_tree (calltab_t* tab); */ GtkWidget * create_toolbar(); +GtkWidget * create_filter_entry(); + +GtkTreeModel * create_filter (GtkTreeModel* child); + void display_calltree (calltab_t *tab); +void create_searchbar(calltab_t* tab, gchar* searchbar_type); + void create_new_entry_in_contactlist (gchar *contact_name, gchar *contact_phone, contact_type_t type, GdkPixbuf *photo); #endif diff --git a/sflphone-gtk/src/configurationmanager-glue.h b/sflphone-gtk/src/configurationmanager-glue.h index 194b6f27be4b6511492afa23c77d8b40d12f0ba0..7d29e92172ab1c6cba9e07cec330c23b5d26254c 100644 --- a/sflphone-gtk/src/configurationmanager-glue.h +++ b/sflphone-gtk/src/configurationmanager-glue.h @@ -2300,6 +2300,81 @@ org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings_async (DBusG stuff->userdata = userdata; return dbus_g_proxy_begin_call (proxy, "setAddressbookSettings", org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings_async_callback, stuff, g_free, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_INT), IN_settings, G_TYPE_INVALID); } +static +#ifdef G_HAVE_INLINE +inline +#endif +gboolean +org_sflphone_SFLphone_ConfigurationManager_get_hook_settings (DBusGProxy *proxy, GHashTable** OUT_settings, GError **error) + +{ + return dbus_g_proxy_call (proxy, "getHookSettings", error, G_TYPE_INVALID, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING), OUT_settings, G_TYPE_INVALID); +} + +typedef void (*org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_reply) (DBusGProxy *proxy, GHashTable *OUT_settings, GError *error, gpointer userdata); + +static void +org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) +{ + DBusGAsyncData *data = (DBusGAsyncData*) user_data; + GError *error = NULL; + GHashTable* OUT_settings; + dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING), &OUT_settings, G_TYPE_INVALID); + (*(org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_reply)data->cb) (proxy, OUT_settings, error, data->userdata); + return; +} + +static +#ifdef G_HAVE_INLINE +inline +#endif +DBusGProxyCall* +org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_async (DBusGProxy *proxy, org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_reply callback, gpointer userdata) + +{ + DBusGAsyncData *stuff; + stuff = g_new (DBusGAsyncData, 1); + stuff->cb = G_CALLBACK (callback); + stuff->userdata = userdata; + return dbus_g_proxy_begin_call (proxy, "getHookSettings", org_sflphone_SFLphone_ConfigurationManager_get_hook_settings_async_callback, stuff, g_free, G_TYPE_INVALID); +} +static +#ifdef G_HAVE_INLINE +inline +#endif +gboolean +org_sflphone_SFLphone_ConfigurationManager_set_hook_settings (DBusGProxy *proxy, const GHashTable* IN_settings, GError **error) + +{ + return dbus_g_proxy_call (proxy, "setHookSettings", error, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING), IN_settings, G_TYPE_INVALID, G_TYPE_INVALID); +} + +typedef void (*org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); + +static void +org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) +{ + DBusGAsyncData *data = (DBusGAsyncData*) user_data; + GError *error = NULL; + dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); + (*(org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_reply)data->cb) (proxy, error, data->userdata); + return; +} + +static +#ifdef G_HAVE_INLINE +inline +#endif +DBusGProxyCall* +org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_async (DBusGProxy *proxy, const GHashTable* IN_settings, org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_reply callback, gpointer userdata) + +{ + DBusGAsyncData *stuff; + stuff = g_new (DBusGAsyncData, 1); + stuff->cb = G_CALLBACK (callback); + stuff->userdata = userdata; + return dbus_g_proxy_begin_call (proxy, "setHookSettings", org_sflphone_SFLphone_ConfigurationManager_set_hook_settings_async_callback, stuff, g_free, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING), IN_settings, G_TYPE_INVALID); +} #endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_sflphone_SFLphone_ConfigurationManager */ G_END_DECLS diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c index 81063f99aa69c8020d0464c99f56a06df48b6b4e..60e6787c828aa7f6a901a387673c170fed5baaac 100644 --- a/sflphone-gtk/src/configwindow.c +++ b/sflphone-gtk/src/configwindow.c @@ -29,6 +29,7 @@ #include <mainwindow.h> #include <audioconf.h> #include <addressbook-config.h> +#include <hooks-config.h> #include <stdlib.h> #include <stdio.h> @@ -479,7 +480,7 @@ void update_registration( void ) GtkWidget* create_stun_tab() { GtkWidget * tableNat; - gchar * stun_server= "stun.fwdnet.net:3478"; + gchar * stun_server= "stun.ekiga.net:3478"; gchar * stun_enabled = "FALSE"; GtkWidget * label; @@ -781,6 +782,11 @@ show_config_window () gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Address Book"))); gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab); + // HookS tab + tab = create_hooks_settings(); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Hooks"))); + gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab); + gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook) , 1); result = gtk_dialog_run(dialog); @@ -856,5 +862,6 @@ void config_window_set_stun_visible() void save_configuration_parameters (void) { addressbook_save_parameters (); + hooks_save_parameters (); } diff --git a/sflphone-gtk/src/contactlist/Makefile.am b/sflphone-gtk/src/contactlist/Makefile.am index d8fee4636b19b1bd2d28abe3d21b7753647c0412..d603d369c831b92052444431560433b399f92747 100644 --- a/sflphone-gtk/src/contactlist/Makefile.am +++ b/sflphone-gtk/src/contactlist/Makefile.am @@ -3,6 +3,6 @@ noinst_LTLIBRARIES = libcontact.la libcontact_la_SOURCES = \ eds.c -libcontact_la_LDFLAGS= -pthread -lebook-1.2 -lgnome-2 -lpopt -ledataserver-1.2 -lxml2 -lgconf-2 -lsoup-2.4 -lbonobo-2 -lbonobo-activation -lORBit-2 -lgthread-2.0 -lrt -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 -lz -lfontconfig -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 - -libcontact_la_CFLAGS=-DORBIT2=1 -pthread -I/usr/include/evolution-data-server-2.24 -I/usr/include/libbonobo-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libxml2 -I/usr/include/libsoup-2.4 -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/libpng12 -I/usr/include/pygtk-2.0 +libcontact_la_LDFLAGS=@DEPS_LDFLAGS@ + +libcontact_la_CFLAGS=@DEPS_CFLAGS@ diff --git a/sflphone-gtk/src/contactlist/eds.c b/sflphone-gtk/src/contactlist/eds.c index 6444a6ca2a6edb15610484d999392e1a2bbdaddf..b2a6d4c9e445c16a5158214b44a008bb03016ac0 100644 --- a/sflphone-gtk/src/contactlist/eds.c +++ b/sflphone-gtk/src/contactlist/eds.c @@ -117,7 +117,7 @@ create_query (const char* s) phone[1] = e_book_query_field_exists (E_CONTACT_PHONE_HOME); phone[2] = e_book_query_field_exists (E_CONTACT_PHONE_MOBILE); - query = e_book_query_andv (e_book_query_or (n_search_fields, q, FALSE), e_book_query_or (3, phone, FALSE)); + query = e_book_query_andv (e_book_query_or (n_search_fields, q, FALSE), e_book_query_or (3, phone, FALSE), NULL); for (i = 0; i < n_search_fields; i++) { g_free (field_queries[i]); diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index c1def3f9b629a24a81ff406b5c286e12585d7dd6..580c50dc284d0cef71ad5358ea7549f5f61be4f7 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -1497,4 +1497,31 @@ void dbus_set_addressbook_settings (GHashTable * settings){ } } +GHashTable* dbus_get_hook_settings (void) { + + GError *error = NULL; + GHashTable *results = NULL; + + //g_print ("Calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings\n"); + + org_sflphone_SFLphone_ConfigurationManager_get_hook_settings (configurationManagerProxy, &results, &error); + if (error){ + g_print ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_hook_settings\n"); + g_error_free (error); + } + + return results; +} + +void dbus_set_hook_settings (GHashTable * settings){ + + GError *error = NULL; + + org_sflphone_SFLphone_ConfigurationManager_set_hook_settings (configurationManagerProxy, settings, &error); + if (error){ + g_print ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_hook_settings\n"); + g_error_free (error); + } +} + diff --git a/sflphone-gtk/src/dbus.h b/sflphone-gtk/src/dbus.h index 7eac089d8ae3d9768301b2ac134e5cb77e10eb4f..946c65486186c9103c73ed52e70c589223bb1814 100644 --- a/sflphone-gtk/src/dbus.h +++ b/sflphone-gtk/src/dbus.h @@ -458,6 +458,18 @@ GHashTable* dbus_get_addressbook_settings (void); */ void dbus_set_addressbook_settings (GHashTable *); +/** + * Encapsulate all the url hook-related configuration + * Get the configuration + */ +GHashTable* dbus_get_hook_settings (void); + +/** + * Encapsulate all the url hook-related configuration + * Set the configuration + */ +void dbus_set_hook_settings (GHashTable *); + diff --git a/sflphone-gtk/src/hooks-config.c b/sflphone-gtk/src/hooks-config.c new file mode 100644 index 0000000000000000000000000000000000000000..b4ede224d6e7542f9fbd087b60fb3e878608b7e9 --- /dev/null +++ b/sflphone-gtk/src/hooks-config.c @@ -0,0 +1,130 @@ +/* + * 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 "hooks-config.h" + +URLHook_Config *_urlhook_config; + +GtkWidget *field, *command; + +void hooks_load_parameters (URLHook_Config** settings){ + + GHashTable *_params = NULL; + URLHook_Config *_settings; + + // Allocate a struct + _settings = g_new0 (URLHook_Config, 1); + + // Fetch the settings from D-Bus + _params = (GHashTable*) dbus_get_hook_settings (); + + if (_params == NULL) { + _settings->sip_field = DEFAULT_SIP_URL_FIELD; + _settings->command = DEFAULT_URL_COMMAND; + _settings->sip_enabled = "0"; + } + else { + _settings->sip_field = (gchar*)(g_hash_table_lookup (_params, URLHOOK_SIP_FIELD)); + _settings->command = (gchar*)(g_hash_table_lookup (_params, URLHOOK_COMMAND)); + _settings->sip_enabled = (gchar*)(g_hash_table_lookup (_params, URLHOOK_SIP_ENABLED)); + } + + *settings = _settings; +} + + +void hooks_save_parameters (void){ + + GHashTable *params = NULL; + + params = g_hash_table_new (NULL, g_str_equal); + g_hash_table_replace (params, (gpointer)URLHOOK_SIP_FIELD, + g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(field)))); + g_hash_table_replace (params, (gpointer)URLHOOK_COMMAND, + g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(command)))); + g_hash_table_replace (params, (gpointer)URLHOOK_SIP_ENABLED, + (gpointer)g_strdup(_urlhook_config->sip_enabled)); + + dbus_set_hook_settings (params); + + // Decrement the reference count + g_hash_table_unref (params); + +} + +static void sip_enabled_cb (GtkWidget *widget) { + + guint check; + + check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget)); + if (check) + _urlhook_config->sip_enabled="1"; + else + _urlhook_config->sip_enabled="0"; +} + +GtkWidget* create_hooks_settings (){ + + GtkWidget *ret, *url_frame, *table, *label; + + // Load the user value + hooks_load_parameters (&_urlhook_config); + + ret = gtk_vbox_new(FALSE, 10); + gtk_container_set_border_width(GTK_CONTAINER(ret), 10); + + url_frame = gtk_frame_new(_("URL argument")); + gtk_box_pack_start(GTK_BOX(ret), url_frame, FALSE, FALSE, 0); + gtk_widget_show (url_frame); + + table = gtk_table_new ( 5, 2, FALSE/* homogeneous */); + gtk_table_set_row_spacings( GTK_TABLE(table), 10); + gtk_table_set_col_spacings( GTK_TABLE(table), 10); + gtk_widget_show(table); + gtk_container_add( GTK_CONTAINER (url_frame) , table ); + + field = gtk_check_button_new_with_mnemonic( _("_SIP protocol")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(field), (g_strcasecmp (_urlhook_config->sip_enabled, "1")==0)?TRUE:FALSE); + g_signal_connect (G_OBJECT(field) , "clicked" , G_CALLBACK (sip_enabled_cb), NULL); + gtk_table_attach ( GTK_TABLE( table ), field, 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + + field = gtk_check_button_new_with_mnemonic( _("_IAX2 protocol")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(field), TRUE); + //g_signal_connect (G_OBJECT(field) , "clicked" , NULL, NULL); + gtk_table_attach ( GTK_TABLE( table ), field, 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_set_sensitive (GTK_WIDGET (field), FALSE); + + label = gtk_label_new_with_mnemonic (_("_SIP Header: ")); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + field = gtk_entry_new (); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), field); + gtk_entry_set_text(GTK_ENTRY(field), _urlhook_config->sip_field); + gtk_table_attach ( GTK_TABLE( table ), field, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + + label = gtk_label_new_with_mnemonic (_("_Command: ")); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + command = gtk_entry_new (); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), command); + gtk_entry_set_text(GTK_ENTRY(command), _urlhook_config->command); + gtk_table_attach ( GTK_TABLE( table ), command, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10); + + gtk_widget_show_all(ret); + + return ret; +} diff --git a/sflphone-gtk/src/hooks-config.h b/sflphone-gtk/src/hooks-config.h new file mode 100644 index 0000000000000000000000000000000000000000..41ee59b718cc88938129305efe9b760aef24352a --- /dev/null +++ b/sflphone-gtk/src/hooks-config.h @@ -0,0 +1,54 @@ +/* + * 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 _HOOKS_CONFIG +#define _HOOKS_CONFIG + +#include <gtk/gtk.h> +#include <glib/gtypes.h> + +#include "actions.h" + +G_BEGIN_DECLS + +#define DEFAULT_SIP_URL_FIELD "X-sflphone-url" +#define DEFAULT_URL_COMMAND "x-www-browser" +#define URLHOOK_COMMAND "URLHOOK_COMMAND" +#define URLHOOK_SIP_FIELD "URLHOOK_SIP_FIELD" +#define URLHOOK_SIP_ENABLED "URLHOOK_SIP_ENABLED" + + +typedef struct _URLHook_Config { + gchar *sip_enabled; + gchar *sip_field; + gchar *command; +}URLHook_Config; + +/** + * Save the parameters through D-BUS + */ +void hooks_save_parameters (void); + +void hooks_load_parameters (URLHook_Config** settings); + +GtkWidget* create_hooks_settings (); + +G_END_DECLS + +#endif // _HOOKS_CONFIG diff --git a/sflphone-gtk/src/main.c b/sflphone-gtk/src/main.c index 886f523186bd176b06f1e99c8724d811decdf251..b3c92c07315d4765c13d28c82ffad85591efd6c2 100644 --- a/sflphone-gtk/src/main.c +++ b/sflphone-gtk/src/main.c @@ -33,7 +33,7 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); g_print("%s\n", PACKAGE_STRING); - g_print("Copyright (c) 2005 2006 2007 2008 Savoir-faire Linux Inc.\n"); + g_print("Copyright (c) 2005 2006 2007 2008 2009 Savoir-faire Linux Inc.\n"); g_print("This is free software. You may redistribute copies of it under the terms of\n\ the GNU General Public License Version 3 <http://www.gnu.org/licenses/gpl.html>.\n\ There is NO WARRANTY, to the extent permitted by law.\n\n"); diff --git a/sflphone-gtk/src/mainwindow.c b/sflphone-gtk/src/mainwindow.c index 02d274ceeaace8181fd2ab4c1e8918707054f69e..eb8efe6cadc0ea8cd829bef52b766dba6c728f7c 100644 --- a/sflphone-gtk/src/mainwindow.c +++ b/sflphone-gtk/src/mainwindow.c @@ -135,13 +135,19 @@ create_main_window () 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->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + // gtk_box_pack_start (GTK_BOX (vbox), history->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + // gtk_box_pack_start (GTK_BOX (vbox), contacts ->searchbar, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/, FALSE /*fill*/, 0 /*padding*/); - if( SHOW_SEARCHBAR ){ - filterEntry = create_filter_entry(); - gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all ( filterEntry ); - } + + // if( SHOW_SEARCHBAR ){ + // filterEntry = create_filter_entry(); + // gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + // gtk_widget_show_all ( filterEntry ); + // } + if( SHOW_VOLUME ){ speaker_control = create_slider("speaker"); @@ -172,7 +178,10 @@ create_main_window () /* dont't show the contact list */ gtk_widget_hide(contacts->tree); - //gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(histfilter)); + gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(histfilter)); + /* don't show waiting layer */ + gtk_widget_hide(waitingLayer); + // Configuration wizard if (account_list_get_size() == 0) { @@ -277,15 +286,15 @@ void main_window_searchbar( gboolean *state ){ if( !SHOW_SEARCHBAR ) { - filterEntry = create_filter_entry(); - gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); - gtk_widget_show_all (filterEntry); - *state = TRUE; + // filterEntry = create_filter_entry(); + // gtk_box_pack_start (GTK_BOX (subvbox), filterEntry, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/); + // gtk_widget_show_all (filterEntry); + // *state = TRUE; } else { - gtk_container_remove( GTK_CONTAINER(subvbox) , filterEntry ); - *state = FALSE; + // gtk_container_remove( GTK_CONTAINER(subvbox) , filterEntry ); + // *state = FALSE; } } diff --git a/sflphone-gtk/src/mainwindow.h b/sflphone-gtk/src/mainwindow.h index b5e385168bca26cee516e05c9629538e8ccb338f..f126452ce1134a2463bd2cdcc454b961a977e508 100644 --- a/sflphone-gtk/src/mainwindow.h +++ b/sflphone-gtk/src/mainwindow.h @@ -1,22 +1,22 @@ /* * 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 __MAINWINDOW_H__ #define __MAINWINDOW_H__ @@ -33,26 +33,28 @@ GtkAccelGroup * get_accel_group(); */ GtkWidget * get_main_window(); +GtkWidget *waitingLayer; + /** * Build the main window */ void create_main_window ( ); /** - * Display a dialog window + * Display a dialog window * Ask the user if he wants to hangup current calls before quiting * @return gboolean TRUE if the user wants to hang up * FALSE otherwise - */ + */ gboolean main_window_ask_quit() ; /** - * Shows/Hides the dialpad on the mainwindow + * Shows/Hides the dialpad on the mainwindow */ void main_window_dialpad( gboolean* state ); /** - * Shows/Hides the dialpad on the mainwindow + * Shows/Hides the dialpad on the mainwindow */ void main_window_volume_controls( gboolean* state ); @@ -88,4 +90,4 @@ void statusbar_push_message( const gchar* message , guint id ); void statusbar_pop_message( guint id ); void main_window_searchbar( gboolean *state ); -#endif +#endif diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c index 6a0a17ea7ed6685e93f951995c705dc5e2b8dc08..31bcfe0be2873b83c91950e8bdacc69caae4e701 100644 --- a/sflphone-gtk/src/menus.c +++ b/sflphone-gtk/src/menus.c @@ -2,17 +2,17 @@ * 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. @@ -48,7 +48,7 @@ GtkWidget * searchbarMenu; void update_menus() -{ +{ //Block signals for holdMenu gtk_signal_handler_block(GTK_OBJECT(holdMenu), holdConnId); @@ -63,7 +63,7 @@ void update_menus() if (selectedCall) { gtk_widget_set_sensitive( GTK_WIDGET(copyMenu), TRUE); - switch(selectedCall->state) + switch(selectedCall->state) { case CALL_STATE_INCOMING: gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE); @@ -95,12 +95,12 @@ void update_menus() case CALL_STATE_BUSY: case CALL_STATE_FAILURE: gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); - break; + break; default: g_warning("Should not happen in update_menus()!"); break; } - } + } else { gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu), TRUE); @@ -109,22 +109,23 @@ void update_menus() } /* ----------------------------------------------------------------- */ - static void + static void help_about ( void * foo UNUSED) { gchar *authors[] = { - "Yan Morin <yan.morin@savoirfairelinux.com>", + "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 Beaudoin <pierre-luc.beaudoin@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", NULL}; gchar *artists[] = { - "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", + "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", NULL}; @@ -141,7 +142,7 @@ help_about ( void * foo UNUSED) } - GtkWidget * + GtkWidget * create_help_menu() { GtkWidget * menu; @@ -153,7 +154,7 @@ create_help_menu() 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), + G_CALLBACK (help_about), NULL); gtk_widget_show (menu_items); @@ -163,19 +164,33 @@ create_help_menu() return root_menu; } /* ----------------------------------------------------------------- */ - static void + 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 + static void call_quit ( void * foo UNUSED) { sflphone_quit(); } - static void + static void call_minimize ( void * foo UNUSED) { #if GTK_CHECK_VERSION(2,10,0) @@ -192,11 +207,11 @@ switch_account( GtkWidget* item , gpointer data UNUSED) account_list_set_current_id( acc->accountID ); } - static void + static void call_hold (void* foo UNUSED) { call_t * selectedCall = call_get_selected(current_calls); - + if(selectedCall) { if(selectedCall->state == CALL_STATE_HOLD) @@ -208,29 +223,29 @@ call_hold (void* foo UNUSED) { 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 + static void call_pick_up ( void * foo UNUSED) { sflphone_pick_up(); } - static void + static void call_hang_up ( void * foo UNUSED) { sflphone_hang_up(); } -static void +static void call_record ( void * foo UNUSED) { sflphone_rec_call(); } - static void + static void call_wizard ( void * foo UNUSED) { #if GTK_CHECK_VERSION(2,10,0) @@ -269,8 +284,8 @@ call_back( void * foo UNUSED) display_calltree (current_calls); } } - - GtkWidget * + + GtkWidget * create_call_menu() { GtkWidget * menu; @@ -285,7 +300,7 @@ create_call_menu() 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), + G_CALLBACK (call_new_call), NULL); gtk_widget_show (newCallMenu); @@ -298,7 +313,7 @@ create_call_menu() 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), + G_CALLBACK (call_pick_up), NULL); gtk_widget_show (pickUpMenu); @@ -308,7 +323,7 @@ create_call_menu() 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), + G_CALLBACK (call_hang_up), NULL); gtk_widget_show (hangUpMenu); @@ -320,7 +335,7 @@ create_call_menu() //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), + G_CALLBACK (call_hold), NULL); gtk_widget_show (menu_items); @@ -330,7 +345,7 @@ create_call_menu() 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), + G_CALLBACK (call_record), NULL); gtk_widget_show (recordMenu); @@ -352,7 +367,7 @@ create_call_menu() 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), + G_CALLBACK (call_minimize), NULL); gtk_widget_show (menu_items); @@ -364,7 +379,7 @@ create_call_menu() 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), + G_CALLBACK (call_quit), NULL); gtk_widget_show (menu_items); @@ -376,20 +391,20 @@ create_call_menu() } /* ----------------------------------------------------------------- */ - static void + static void edit_preferences ( void * foo UNUSED) { show_config_window(); } - static void + static void edit_accounts ( void * foo UNUSED) { show_accounts_window(); } // The menu Edit/Copy should copy the current selected call's number - static void + static void edit_copy ( void * foo UNUSED) { GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); @@ -400,7 +415,7 @@ edit_copy ( void * foo UNUSED) { switch(selectedCall->state) { - case CALL_STATE_TRANSFERT: + case CALL_STATE_TRANSFERT: case CALL_STATE_DIALING: case CALL_STATE_RINGING: no = selectedCall->to; @@ -421,7 +436,7 @@ edit_copy ( void * foo UNUSED) } // The menu Edit/Paste should paste the clipboard into the current selected call - static void + static void edit_paste ( void * foo UNUSED) { GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); @@ -432,10 +447,10 @@ edit_paste ( void * foo UNUSED) { switch(selectedCall->state) { - case CALL_STATE_TRANSFERT: + case CALL_STATE_TRANSFERT: case CALL_STATE_DIALING: // Add the text to the number - { + { gchar * before = selectedCall->to; selectedCall->to = g_strconcat(selectedCall->to, no, NULL); g_free(before); @@ -449,7 +464,7 @@ edit_paste ( void * foo UNUSED) update_call_tree(current_calls, selectedCall); } break; - case CALL_STATE_RINGING: + case CALL_STATE_RINGING: case CALL_STATE_INCOMING: case CALL_STATE_BUSY: case CALL_STATE_FAILURE: @@ -515,7 +530,7 @@ clear_history (void) } } - GtkWidget * + GtkWidget * create_edit_menu() { GtkWidget * menu; @@ -528,14 +543,14 @@ create_edit_menu() 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), + 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), + G_CALLBACK (edit_paste), NULL); gtk_widget_show (pasteMenu); @@ -547,9 +562,9 @@ create_edit_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), + G_CALLBACK (clear_history), NULL); - gtk_widget_show (menu_items); + gtk_widget_show (menu_items); menu_items = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); @@ -557,16 +572,16 @@ create_edit_menu() menu_items = gtk_menu_item_new_with_mnemonic( _("_Accounts") ); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_accounts), + G_CALLBACK (edit_accounts), NULL); - gtk_widget_show (menu_items); + gtk_widget_show (menu_items); menu_items = gtk_image_menu_item_new_from_stock( GTK_STOCK_PREFERENCES, get_accel_group()); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); g_signal_connect_swapped (G_OBJECT (menu_items), "activate", - G_CALLBACK (edit_preferences), + G_CALLBACK (edit_preferences), NULL); - gtk_widget_show (menu_items); + gtk_widget_show (menu_items); root_menu = gtk_menu_item_new_with_mnemonic (_("_Edit")); @@ -575,7 +590,7 @@ create_edit_menu() return root_menu; } /* ----------------------------------------------------------------- */ - static void + static void view_dialpad (GtkImageMenuItem *imagemenuitem UNUSED, void* foo UNUSED) { @@ -584,15 +599,15 @@ view_dialpad (GtkImageMenuItem *imagemenuitem UNUSED, if( state ) gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( dialpadMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_dialpad_off.svg")); - else - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( dialpadMenu ), + else + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( dialpadMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_dialpad.svg")); dbus_set_dialpad( state ); - + } - static void + static void view_volume_controls (GtkImageMenuItem *imagemenuitem UNUSED, void* foo UNUSED) { @@ -601,13 +616,13 @@ view_volume_controls (GtkImageMenuItem *imagemenuitem UNUSED, if( state ) gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( volumeMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_volume_off.svg")); - else - gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( volumeMenu ), + else + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( volumeMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_volume.svg")); dbus_set_volume_controls( state ); } - static void + static void view_searchbar (GtkImageMenuItem *imagemenuitem UNUSED, void* foo UNUSED) { @@ -616,7 +631,7 @@ view_searchbar (GtkImageMenuItem *imagemenuitem UNUSED, dbus_set_searchbar( state ); } - GtkWidget * + GtkWidget * create_view_menu() { GtkWidget * menu; @@ -633,7 +648,7 @@ create_view_menu() gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( dialpadMenu ), image ); gtk_menu_shell_append (GTK_MENU_SHELL (menu), dialpadMenu); g_signal_connect(G_OBJECT ( dialpadMenu ), "activate", - G_CALLBACK (view_dialpad), + G_CALLBACK (view_dialpad), NULL); gtk_widget_show (dialpadMenu); @@ -645,7 +660,7 @@ create_view_menu() gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( volumeMenu ), image ); gtk_menu_shell_append (GTK_MENU_SHELL (menu), volumeMenu); g_signal_connect(G_OBJECT (volumeMenu), "activate", - G_CALLBACK (view_volume_controls), + G_CALLBACK (view_volume_controls), NULL); gtk_widget_show (volumeMenu); @@ -654,7 +669,7 @@ create_view_menu() 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), + G_CALLBACK (view_searchbar), NULL); gtk_widget_show (searchbarMenu); @@ -664,7 +679,7 @@ create_view_menu() return root_menu; } /* ----------------------------------------------------------------- */ - GtkWidget * + GtkWidget * create_menus ( ) { @@ -685,8 +700,9 @@ create_menus ( ) root_menu = create_help_menu(); gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu); - gtk_widget_show (menu_bar); - + // Create waiting icon + waitingLayer = create_waiting_icon(); + gtk_menu_shell_append(GTK_MENU_SHELL (menu_bar),waitingLayer); return menu_bar; } @@ -705,7 +721,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) if (selectedCall) { copy = TRUE; - switch(selectedCall->state) + switch(selectedCall->state) { case CALL_STATE_INCOMING: pickup = TRUE; @@ -732,12 +748,12 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) case CALL_STATE_BUSY: case CALL_STATE_FAILURE: hangup = TRUE; - break; + break; default: g_warning("Should not happen in show_popup_menu!"); break; } - } + } GtkWidget *menu; GtkWidget *image; @@ -745,7 +761,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) GtkWidget * menu_items; menu = gtk_menu_new (); - //g_signal_connect (menu, "deactivate", + //g_signal_connect (menu, "deactivate", // G_CALLBACK (gtk_widget_destroy), NULL); if(copy) @@ -753,7 +769,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) 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), + G_CALLBACK (edit_copy), NULL); gtk_widget_show (menu_items); } @@ -761,7 +777,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) 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), + G_CALLBACK (edit_paste), NULL); gtk_widget_show (menu_items); @@ -780,7 +796,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) 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), + G_CALLBACK (call_pick_up), NULL); gtk_widget_show (menu_items); } @@ -792,7 +808,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) 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), + G_CALLBACK (call_hang_up), NULL); gtk_widget_show (menu_items); } @@ -801,13 +817,13 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) { 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), + 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), + G_CALLBACK (call_hold), NULL); gtk_widget_show (menu_items); - } + } if(record) { @@ -816,7 +832,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) 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), + G_CALLBACK (call_record), NULL); gtk_widget_show (menu_items); } @@ -844,7 +860,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) (g_strcasecmp( acc->accountID , account_list_get_current()->accountID) == 0)? TRUE : FALSE); } g_signal_connect (G_OBJECT (menu_items), "activate", - G_CALLBACK (switch_account), + G_CALLBACK (switch_account), NULL); gtk_widget_show (menu_items); } // fi @@ -863,7 +879,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event) } gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time); } @@ -880,7 +896,7 @@ show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event) { remove = TRUE; pickup = TRUE; - } + } GtkWidget *menu; GtkWidget *image; @@ -888,7 +904,7 @@ show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event) GtkWidget * menu_items; menu = gtk_menu_new (); - //g_signal_connect (menu, "deactivate", + //g_signal_connect (menu, "deactivate", // G_CALLBACK (gtk_widget_destroy), NULL); if(pickup) @@ -926,6 +942,6 @@ show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event) } gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time); } diff --git a/sflphone-gtk/src/searchfilter.c b/sflphone-gtk/src/searchfilter.c index 92988c519a8ee1a1aea8bc1909ad5e8b91b1c2ec..7603993a3de7b3d8063b1890b57d69b5ea68aaf4 100644 --- a/sflphone-gtk/src/searchfilter.c +++ b/sflphone-gtk/src/searchfilter.c @@ -45,7 +45,7 @@ gboolean is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSE GValue val; gchar* text = NULL; - gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(filter_entry)); + gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(filter_entry_history)); memset (&val, 0, sizeof(val)); gtk_tree_model_get_value(GTK_TREE_MODEL(model), iter, 1, &val); if(G_VALUE_HOLDS_STRING(&val)){ @@ -113,8 +113,8 @@ void filter_entry_changed (GtkEntry* entry, gchar* arg1 UNUSED, gpointer data UN AddressBook_Config *addressbook_config; /* Switch to the address book when the focus is on the search bar */ - if (active_calltree != contacts) - display_calltree (contacts); + // if (active_calltree != contacts) + // display_calltree (contacts); /* We want to search in the contact list */ @@ -136,43 +136,70 @@ void filter_entry_changed (GtkEntry* entry, gchar* arg1 UNUSED, gpointer data UN } -void clear_filter_entry_if_default (GtkWidget* widget UNUSED, gpointer user_data UNUSED) { +void +filter_entry_changed_history(GtkEntry* entry UNUSED, gchar* arg1 UNUSED, gpointer data UNUSED) +{ + g_print("--- filter_entry_changed_history --- \n"); - if(g_ascii_strncasecmp(gtk_entry_get_text(GTK_ENTRY(filter_entry)), _("Search"), 6) == 0) - gtk_entry_set_text(GTK_ENTRY(filter_entry), ""); + if (active_calltree != history) + display_calltree (history); + // gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(historyButton), TRUE); + gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(histfilter)); + // gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(histfilter)); } -GtkWidget* create_filter_entry() { + +void clear_filter_entry_if_default (GtkWidget* widget, gpointer user_data UNUSED) { + + if(g_ascii_strncasecmp(gtk_entry_get_text(GTK_ENTRY(widget)), _("Search"), 6) == 0) + gtk_entry_set_text(GTK_ENTRY(widget), ""); + +} + +GtkWidget* create_filter_entry_contact() { GtkWidget* image; GtkWidget* ret = gtk_hbox_new(FALSE, 0); - filter_entry = sexy_icon_entry_new(); + filter_entry_contact = sexy_icon_entry_new(); image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR); - sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(filter_entry), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) ); - sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(filter_entry) ); - gtk_entry_set_text(GTK_ENTRY(filter_entry), _("Search")); - g_signal_connect(GTK_ENTRY(filter_entry), "changed", G_CALLBACK(filter_entry_changed), NULL); - g_signal_connect(GTK_ENTRY(filter_entry), "grab-focus", G_CALLBACK(clear_filter_entry_if_default), NULL); + sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(filter_entry_contact), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) ); + sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(filter_entry_contact) ); + gtk_entry_set_text(GTK_ENTRY(filter_entry_contact), _("Search")); + g_signal_connect(GTK_ENTRY(filter_entry_contact), "changed", G_CALLBACK(filter_entry_changed), NULL); + g_signal_connect(GTK_ENTRY(filter_entry_contact), "grab-focus", G_CALLBACK(clear_filter_entry_if_default), NULL); - gtk_box_pack_start(GTK_BOX(ret), filter_entry, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(ret), filter_entry_contact, TRUE, TRUE, 0); - // Create waiting icon - waitingPixOn = gdk_pixbuf_animation_new_from_file(ICONS_DIR "/wait-on.gif", NULL); - waitingPixOff = gdk_pixbuf_new_from_file(ICONS_DIR "/wait-off.gif", NULL); - waitingLayer = gtk_image_new_from_pixbuf(waitingPixOff); + return ret; +} - gtk_box_pack_end(GTK_BOX(ret), waitingLayer, TRUE, TRUE, 0); - return ret; +GtkWidget* create_filter_entry_history() { + g_print("--- create_filter_entry_history --- \n"); + + GtkWidget* image; + GtkWidget* ret = gtk_hbox_new(FALSE, 0); + + filter_entry_history = sexy_icon_entry_new(); + image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR); + sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(filter_entry_history), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) ); + sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(filter_entry_history) ); + gtk_entry_set_text(GTK_ENTRY(filter_entry_history), _("Search")); + g_signal_connect(GTK_ENTRY(filter_entry_history), "changed", G_CALLBACK(filter_entry_changed_history), NULL); + g_signal_connect(GTK_ENTRY(filter_entry_history), "grab-focus", G_CALLBACK(clear_filter_entry_if_default), NULL); + + gtk_box_pack_start(GTK_BOX(ret), filter_entry_history, TRUE, TRUE, 0); + + return ret; } void activateWaitingLayer() { - gtk_image_set_from_animation(GTK_IMAGE(waitingLayer),waitingPixOn); + gtk_widget_show(waitingLayer); } void deactivateWaitingLayer() { - gtk_image_set_from_pixbuf (GTK_IMAGE(waitingLayer),waitingPixOff); + gtk_widget_hide(waitingLayer); } diff --git a/sflphone-gtk/src/searchfilter.h b/sflphone-gtk/src/searchfilter.h index c22109635b98dda14046c583e63585a9ff38c7ad..66aa0fd6d49972e2315bf6bf2c5c582f844c61ad 100644 --- a/sflphone-gtk/src/searchfilter.h +++ b/sflphone-gtk/src/searchfilter.h @@ -26,9 +26,6 @@ #include <gtk/gtk.h> #include <libsexy/sexy-icon-entry.h> -GtkWidget *waitingLayer; - -GdkPixbufAnimation *waitingPixOn; GdkPixbuf *waitingPixOff; @@ -36,7 +33,9 @@ GtkTreeModel* create_filter(GtkTreeModel* child); gboolean is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data); -GtkWidget* create_filter_entry(); +GtkWidget* create_filter_entry_contact(); + +GtkWidget* create_filter_entry_history(); void activateWaitingLayer(); diff --git a/sflphone-gtk/view b/sflphone-gtk/view new file mode 100644 index 0000000000000000000000000000000000000000..1552fda6f631d91a7db39092156ab4fc51ff47b1 --- /dev/null +++ b/sflphone-gtk/view @@ -0,0 +1,6 @@ +src/actions.c: if(SHOW_SEARCHBAR) histfilter = create_filter(GTK_TREE_MODEL(history->store)); +src/calltree.c: gtk_widget_hide(history->tree); +src/calltree.c: gtk_widget_show(history->tree); +src/mainwindow.c: gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/); +src/mainwindow.c: gtk_widget_hide(history->tree); +src/mainwindow.c: gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(histfilter)); diff --git a/src/Makefile.am b/src/Makefile.am index 62b16508816ef09325ff14cbc183059016e7c9b7..9269904f4f05c823b2dd8991663bd5c1ccc43c88 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ IAXSOURCES = IAXHEADERS = endif -SUBDIRS = audio config dbus plug-in +SUBDIRS = audio config dbus plug-in hooks # Add here the cpp files to be build with sflphone sflphoned_SOURCES = \ @@ -50,8 +50,7 @@ sflphoned_LDADD = \ @CCRTP_LIBS@ \ @ALSA_LIBS@ \ @PULSEAUDIO_LIBS@ \ - @SAMPLERATE_LIBS@ \ - @LIBOPENSSL_LIBS@ + @SAMPLERATE_LIBS@ # sflphoned_LDFLAGS= -pg -luuid sflphoned_LDFLAGS= -luuid @@ -84,6 +83,7 @@ libsflphone_la_LIBADD = \ ./config/libconfig.la \ ./plug-in/libplugin.la \ ./plug-in/audiorecorder/libaudiorecorder.la \ + ./hooks/libhooks.la \ $(IAX_LIBS) libsflphone_la_SOURCES = diff --git a/src/dbus/configurationmanager-glue.h b/src/dbus/configurationmanager-glue.h index ea26d2b42b3eed55c38b648c20c26d4e397f90b1..f70bd67e29d9b41ab2ccdb990632d8f2b2db8277 100644 --- a/src/dbus/configurationmanager-glue.h +++ b/src/dbus/configurationmanager-glue.h @@ -79,6 +79,8 @@ public: register_method(ConfigurationManager_adaptor, isStunEnabled, _isStunEnabled_stub); register_method(ConfigurationManager_adaptor, getAddressbookSettings, _getAddressbookSettings_stub); register_method(ConfigurationManager_adaptor, setAddressbookSettings, _setAddressbookSettings_stub); + register_method(ConfigurationManager_adaptor, getHookSettings, _getHookSettings_stub); + register_method(ConfigurationManager_adaptor, setHookSettings, _setHookSettings_stub); } ::DBus::IntrospectedInterface *const introspect() const @@ -374,6 +376,16 @@ public: { "settings", "a{si}", true }, { 0, 0, 0 } }; + static ::DBus::IntrospectedArgument getHookSettings_args[] = + { + { "settings", "a{ss}", false }, + { 0, 0, 0 } + }; + static ::DBus::IntrospectedArgument setHookSettings_args[] = + { + { "settings", "a{ss}", true }, + { 0, 0, 0 } + }; static ::DBus::IntrospectedArgument parametersChanged_args[] = { { "details", "a{ss}", false }, @@ -449,6 +461,8 @@ public: { "isStunEnabled", isStunEnabled_args }, { "getAddressbookSettings", getAddressbookSettings_args }, { "setAddressbookSettings", setAddressbookSettings_args }, + { "getHookSettings", getHookSettings_args }, + { "setHookSettings", setHookSettings_args }, { 0, 0 } }; static ::DBus::IntrospectedMethod ConfigurationManager_adaptor_signals[] = @@ -542,6 +556,8 @@ public: virtual int32_t isStunEnabled() = 0; virtual std::map< std::string, int32_t > getAddressbookSettings() = 0; virtual void setAddressbookSettings(const std::map< std::string, int32_t >& settings) = 0; + virtual std::map< std::string, std::string > getHookSettings() = 0; + virtual void setHookSettings(const std::map< std::string, std::string >& settings) = 0; public: @@ -1133,6 +1149,25 @@ private: ::DBus::ReturnMessage reply(call); return reply; } + ::DBus::Message _getHookSettings_stub(const ::DBus::CallMessage &call) + { + ::DBus::MessageIter ri = call.reader(); + + std::map< std::string, std::string > argout1 = getHookSettings(); + ::DBus::ReturnMessage reply(call); + ::DBus::MessageIter wi = reply.writer(); + wi << argout1; + return reply; + } + ::DBus::Message _setHookSettings_stub(const ::DBus::CallMessage &call) + { + ::DBus::MessageIter ri = call.reader(); + + std::map< std::string, std::string > argin1; ri >> argin1; + setHookSettings(argin1); + ::DBus::ReturnMessage reply(call); + return reply; + } }; } } } diff --git a/src/dbus/configurationmanager-introspec.xml b/src/dbus/configurationmanager-introspec.xml index fdb8c355ccb51abd29f0b87e5834f5426677627b..b133c5e9779d040096effd1f9c071982fff0e435 100644 --- a/src/dbus/configurationmanager-introspec.xml +++ b/src/dbus/configurationmanager-introspec.xml @@ -266,6 +266,15 @@ <arg type="a{si}" name="settings" direction="in"/> </method> + <!-- Hook configuration --> + <method name="getHookSettings"> + <arg type="a{ss}" name="settings" direction="out"/> + </method> + + <method name="setHookSettings"> + <arg type="a{ss}" name="settings" direction="in"/> + </method> + <!-- ///////////////////////////// --> <signal name="parametersChanged"> <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/> diff --git a/src/dbus/configurationmanager.cpp b/src/dbus/configurationmanager.cpp index 58f8447a3524c6b363b498d442fdfc57a2ae7a63..7375de66783575dbb6d7e901fc3b8a2072635053 100644 --- a/src/dbus/configurationmanager.cpp +++ b/src/dbus/configurationmanager.cpp @@ -433,3 +433,11 @@ std::map<std::string, int32_t> ConfigurationManager::getAddressbookSettings (voi void ConfigurationManager::setAddressbookSettings (const std::map<std::string, int32_t>& settings) { Manager::instance().setAddressbookSettings (settings); } + +std::map<std::string,std::string> ConfigurationManager::getHookSettings (void) { + return Manager::instance().getHookSettings (); +} + +void ConfigurationManager::setHookSettings (const std::map<std::string, std::string>& settings) { + Manager::instance().setHookSettings (settings); +} diff --git a/src/dbus/configurationmanager.h b/src/dbus/configurationmanager.h index 60706378a7fb70754654fa2146741d716c5e7eae..f595d7e254db9811dfb433a37ac97dfbff5376bd 100644 --- a/src/dbus/configurationmanager.h +++ b/src/dbus/configurationmanager.h @@ -107,6 +107,9 @@ public: std::map<std::string, int32_t> getAddressbookSettings (void); void setAddressbookSettings (const std::map<std::string, int32_t>& settings); + std::map<std::string, std::string> getHookSettings (void); + void setHookSettings (const std::map<std::string, std::string>& settings); + }; diff --git a/src/global.h b/src/global.h index 334c18edfe4abf704b1b3d34a776da6bbd966e0f..406e2b855b572e5ff5633a39054c115214f73855 100644 --- a/src/global.h +++ b/src/global.h @@ -32,7 +32,7 @@ #include <map> #include <vector> -#define SFLPHONED_VERSION "0.9.3" /** Version number */ +#define SFLPHONED_VERSION "0.9.4" /** Version number */ #define HOMEDIR (getenv ("HOME")) /** Home directory */ @@ -135,4 +135,8 @@ static const SOUND_FORMAT INT32 = 0x8; #define DEFAULT_SIP_PORT 5060 +#define HOOK_DEFAULT_SIP_FIELD "X-sflphone-url" +#define HOOK_DEFAULT_URL_COMMAND "x-www-browser" + + #endif // __GLOBAL_H__ diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..aa5797fe7a723e97055388356c1b3d8bb82aea32 --- /dev/null +++ b/src/hooks/Makefile.am @@ -0,0 +1,6 @@ +SUBDIRS = + +noinst_LTLIBRARIES = libhooks.la + +libhooks_la_SOURCES = \ + urlhook.cpp urlhook.h diff --git a/src/hooks/urlhook.cpp b/src/hooks/urlhook.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a5e63b3190cf39601f58e1296608f6139c976d2 --- /dev/null +++ b/src/hooks/urlhook.cpp @@ -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. + */ + +#include "urlhook.h" +#include <iostream> + +UrlHook::UrlHook () { } + +UrlHook::~UrlHook () { } + +void UrlHook::addAction (std::string field_value, std::string command){ + + std::string command_bg; + + /* Execute the command in the background to not block the application */ + command_bg = command + " " + field_value + "&" ; + /* Execute a system call */ + RUN_COMMAND (command_bg.c_str()); +} + + diff --git a/src/hooks/urlhook.h b/src/hooks/urlhook.h new file mode 100644 index 0000000000000000000000000000000000000000..77a2d020362b75743cbe96fefa87d69cabd26457 --- /dev/null +++ b/src/hooks/urlhook.h @@ -0,0 +1,46 @@ +/* + * 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 URL_HOOK_H +#define URL_HOOK_H + +#include <string> +#include <stdlib.h> + +#define RUN_COMMAND(command) system(command); + +class UrlHook { + + public: + /** + * Constructor + */ + UrlHook (); + + /** + * Destructor + */ + ~UrlHook (); + + void addAction (std::string, std::string); + + private: +}; + +#endif // URL_HOOK_H diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 53fe6cf66e476816e55086b1fd31f23fb922e4d4..433390668619f8f9ba8c895f4633d9eaf29d06ae 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -375,9 +375,12 @@ ManagerImpl::onHoldCall(const CallID& id) { AccountID accountid; bool returnValue; + CallID call_id; stopTone(true); + call_id = id; + /* Direct IP to IP call */ if (getConfigFromCall (id) == Call::IPtoIP) { returnValue = SIPVoIPLink::instance (AccountNULL)-> onhold (id); @@ -396,7 +399,7 @@ ManagerImpl::onHoldCall(const CallID& id) removeWaitingCall(id); switchCall(""); - if (_dbus) _dbus->getCallManager()->callStateChanged(id, "HOLD"); + if (_dbus) _dbus->getCallManager()->callStateChanged(call_id, "HOLD"); return returnValue; } @@ -409,12 +412,15 @@ ManagerImpl::offHoldCall(const CallID& id) AccountID accountid; bool returnValue, rec; std::string codecName; + CallID call_id; stopTone(false); + call_id = id; //Place current call on hold if it isn't if (hasCurrentCall()) { + _debug ("Put the current call (ID=%s) on hold\n", getCurrentCallId().c_str()); onHoldCall(getCurrentCallId()); } @@ -437,12 +443,14 @@ ManagerImpl::offHoldCall(const CallID& id) } if (_dbus){ - /*if (rec) - _dbus->getCallManager()->callStateChanged(id, "UNHOLD_RECORD"); + + //_dbus->getCallManager()->callStateChanged(id, "CURRENT"); + + if (rec) + _dbus->getCallManager()->callStateChanged(call_id, "UNHOLD_RECORD"); else - _dbus->getCallManager()->callStateChanged(id, "UNHOLD_CURRENT"); - */ - _dbus->getCallManager()->callStateChanged(id, "CURRENT"); + _dbus->getCallManager()->callStateChanged(call_id, "UNHOLD_CURRENT"); + } switchCall(id); @@ -1201,6 +1209,11 @@ ManagerImpl::initConfigFile ( bool load_user_value ) fill_config_int (ADDRESSBOOK_DISPLAY_PHONE_HOME, NO_STR); fill_config_int (ADDRESSBOOK_DISPLAY_PHONE_MOBILE, NO_STR); + section = HOOKS; + fill_config_str (URLHOOK_SIP_FIELD, HOOK_DEFAULT_SIP_FIELD); + fill_config_str (URLHOOK_COMMAND, HOOK_DEFAULT_URL_COMMAND); + fill_config_str (URLHOOK_SIP_ENABLED, NO_STR); + // Loads config from ~/.sflphone/sflphonedrc or so.. if (createSettingsPath() == 1 && load_user_value) { _exist = _config.populateFromFile(_path); @@ -2546,7 +2559,7 @@ void ManagerImpl::registerCurSIPAccounts(VoIPLink *link) current = iter->second; if (current) { - if ( current->isEnabled() && current->getType() == "sip") { + if (current->isEnabled() && current->getType() == "sip") { //current->setVoIPLink(link); current->registerVoIPLink(); } @@ -2582,6 +2595,31 @@ void ManagerImpl::setAddressbookSettings (const std::map<std::string, int32_t>& saveConfig (); } + +std::map<std::string, std::string> ManagerImpl::getHookSettings () { + + std::map<std::string, std::string> settings; + + settings.insert (std::pair<std::string, std::string> ("URLHOOK_SIP_FIELD", getConfigString (HOOKS, URLHOOK_SIP_FIELD)) ); + settings.insert (std::pair<std::string, std::string> ("URLHOOK_COMMAND", getConfigString (HOOKS, URLHOOK_COMMAND)) ); + settings.insert (std::pair<std::string, std::string> ("URLHOOK_SIP_ENABLED", getConfigString (HOOKS, URLHOOK_SIP_ENABLED)) ); + + return settings; +} + +void ManagerImpl::setHookSettings (const std::map<std::string, std::string>& settings){ + + setConfig(HOOKS, URLHOOK_SIP_FIELD, (*settings.find("URLHOOK_SIP_FIELD")).second); + setConfig(HOOKS, URLHOOK_COMMAND, (*settings.find("URLHOOK_COMMAND")).second); + setConfig(HOOKS, URLHOOK_SIP_ENABLED, (*settings.find("URLHOOK_SIP_ENABLED")).second); + + // Write it to the configuration file + saveConfig (); +} + + + + void ManagerImpl::check_call_configuration (const CallID& id, const std::string &to, Call::CallConfiguration *callConfig) { std::string pattern; Call::CallConfiguration config; diff --git a/src/managerimpl.h b/src/managerimpl.h index 1788d65e65459af23e7257389c9373aff31e6f53..6abf1106da973892f892f850de1474bad296f613 100644 --- a/src/managerimpl.h +++ b/src/managerimpl.h @@ -563,6 +563,17 @@ class ManagerImpl { * Addressbook configuration */ void setAddressbookSettings (const std::map<std::string, int32_t>& settings); + + /** + * Hook configuration + */ + std::map<std::string, std::string> getHookSettings (void); + + /** + * Hook configuration + */ + void setHookSettings (const std::map<std::string, std::string>& settings); + /** * Get the audio manager diff --git a/src/sdp.cpp b/src/sdp.cpp index 63a5b69d58da240126aa7ebe7bc8b140e0660fcd..2c623f8d46e2f9763731c0dc6f07c93ad1927e34 100644 --- a/src/sdp.cpp +++ b/src/sdp.cpp @@ -379,7 +379,6 @@ void Sdp::set_local_media_capabilities () { } } _local_media_cap.push_back (audio); - _debug ("%s\n", audio->to_string ().c_str()); } void Sdp::attribute_port_to_all_media (int port) { @@ -408,7 +407,6 @@ void Sdp::fetch_remote_ip_from_sdp (pjmedia_sdp_session *r_sdp) { std::string remote_ip; remote_ip = r_sdp->conn->addr.ptr; - _debug("************************************************** Remote Audio IP: %s\n", remote_ip.c_str()); this->set_remote_ip(remote_ip); } diff --git a/src/sipaccount.cpp b/src/sipaccount.cpp index fc77c0450de4814c82d05b29aea2d5072e82b425..0dceb51243d46872583ee509a55f79bcdc6b5647 100644 --- a/src/sipaccount.cpp +++ b/src/sipaccount.cpp @@ -69,14 +69,14 @@ int SIPAccount::registerVoIPLink() int SIPAccount::unregisterVoIPLink() { - _debug("unregister account %s\n" , getAccountID().c_str()); - - _regc = NULL; - - if(_link->sendUnregister( _accountID )) - return true; - else - return false; + _debug("unregister account %s\n" , getAccountID().c_str()); + + if(_link->sendUnregister( _accountID )){ + setRegistrationInfo (NULL); + return true; + } + else + return false; } diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index f7bd90921c27f63d7e2fcbe17e588e1d55b5b687..12e014016fd358f8b918f578e002b31cd833b11a 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -51,6 +51,8 @@ bool setCallAudioLocal(SIPCall* call, std::string localIP, bool stun, std::strin void handle_incoming_options (pjsip_rx_data *rxdata); +std::string fetch_header_value (pjsip_msg *msg, std::string field); + /* * The global pool factory */ @@ -77,6 +79,11 @@ pjsip_module _mod_ua; pj_thread_t *thread; pj_thread_desc desc; +/* + * Url hook instance + */ +UrlHook *urlhook; + /** * Get the number of voicemail waiting in a SIP message */ @@ -171,6 +178,8 @@ SIPVoIPLink* SIPVoIPLink::_instance = NULL; // to get random number for RANDOM_PORT srand (time(NULL)); + urlhook = new UrlHook (); + /* Start pjsip initialization step */ init(); } @@ -314,14 +323,12 @@ int SIPVoIPLink::sendRegister( AccountID id ) /* Get the client registration information for this particular account */ regc = account->getRegistrationInfo(); - /* If the registration already exists, delete it */ - if(regc) { - + /* TODO If the registration already exists, delete it */ + /*if(regc) { status = pjsip_regc_destroy(regc); regc = NULL; PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); - } - + }*/ account->setRegister(true); @@ -331,7 +338,6 @@ int SIPVoIPLink::sendRegister( AccountID id ) /* Update the state of the voip link */ account->setRegistrationState(Trying); - if (!validStunServer) { account->setRegistrationState(ErrorExistStun); account->setRegister(false); @@ -387,7 +393,6 @@ int SIPVoIPLink::sendRegister( AccountID id ) return false; } - status = pjsip_regc_send(regc, tdata); if (status != PJ_SUCCESS) { _debug("UserAgent: Unable to send regc request.\n"); @@ -403,7 +408,7 @@ int SIPVoIPLink::sendRegister( AccountID id ) } int -SIPVoIPLink::sendUnregister( AccountID id ) +SIPVoIPLink::sendUnregister (AccountID id) { pj_status_t status = 0; pjsip_tx_data *tdata = NULL; @@ -435,7 +440,7 @@ SIPVoIPLink::sendUnregister( AccountID id ) return false; } - account->setRegistrationInfo(regc); + //account->setRegistrationInfo(regc); account->setRegister(false); return true; @@ -721,6 +726,7 @@ SIPVoIPLink::offhold(const CallID& id) bool SIPVoIPLink::transfer(const CallID& id, const std::string& to) { + SIPCall *call; std::string tmp_to; pjsip_evsub *sub; @@ -731,7 +737,6 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to) AccountID account_id; Account* account; - call = getSIPCall(id); call->stopRecording(); account_id = Manager::instance().getAccountFromCall(id); @@ -743,8 +748,14 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to) } tmp_to = SIPToHeader(to); - if (tmp_to.find("@") == std::string::npos) { - tmp_to = tmp_to + "@" + account->getHostname(); + if (account) { + if (tmp_to.find("@") == std::string::npos) { + tmp_to = tmp_to + "@" + account->getHostname(); + } + } + + else { + } _debug("In transfer, tmp_to is %s\n", tmp_to.data()); @@ -766,7 +777,6 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to) * because after this function, we can not find the cooresponding * voiplink from the call any more. But the voiplink is useful! */ - AccountID accId = Manager::instance().getAccountFromCall(call->getCallId()); pjsip_evsub_set_mod_data(sub, getModId(), this); /* @@ -1698,14 +1708,12 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam // The call is ringing - We need to handle this case only on outgoing call if (inv->state == PJSIP_INV_STATE_EARLY && e->body.tsx_state.tsx->role == PJSIP_ROLE_UAC){ - _debug ("*************************** PJSIP_INV_STATE_EARLY - PEER RINGING ***********************************\n"); call->setConnectionState(Call::Ringing); Manager::instance().peerRingingCall(call->getCallId()); } // We receive a ACK - The connection is established else if( inv->state == PJSIP_INV_STATE_CONFIRMED ){ - _debug ("*************************** PJSIP_INV_STATE_CONFIRMED ***********************************\n"); /* If the call is a direct IP-to-IP call */ if (call->getCallConfiguration () == Call::IPtoIP) { @@ -1721,7 +1729,6 @@ std::string SIPVoIPLink::getSipTo(const std::string& to_url, std::string hostnam } else if( inv->state == PJSIP_INV_STATE_DISCONNECTED ){ - _debug ("*************************** PJSIP_INV_STATE_DISCONNECTED %i***********************************\n", inv->cause); switch( inv->cause ) { /* The call terminates normally - BYE / CANCEL */ @@ -1802,11 +1809,11 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e */ _debug("UserAgent: The error is: %d\n", param->code); switch(param->code) { - case 408: case 606: account->setRegistrationState(ErrorConfStun); break; case 503: + case 408: account->setRegistrationState(ErrorHost); break; case 401: @@ -1945,6 +1952,22 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e return true; } + /******************************************* URL HOOK *********************************************/ + + if (Manager::instance().getConfigString (HOOKS, URLHOOK_SIP_ENABLED) == "1") { + + std::string header_value; + + header_value = fetch_header_value (rdata->msg_info.msg, Manager::instance().getConfigString (HOOKS, URLHOOK_SIP_FIELD)); + + if (header_value!=""){ + urlhook->addAction (header_value, + Manager::instance().getConfigString (HOOKS, URLHOOK_COMMAND)); + } + } + + /************************************************************************************************/ + // Generate a new call ID for the incoming call! id = Manager::instance().getNewCallID(); call = new SIPCall(id, Call::Incoming, _pool); @@ -2443,8 +2466,6 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e void on_rx_offer( pjsip_inv_session *inv, const pjmedia_sdp_session *offer ){ - _debug ( "********************************* REINVITE RECEIVED *******************************\n" ); - #ifdef CAN_REINVITE _debug ("reinvite SIP\n"); @@ -2538,4 +2559,31 @@ void call_on_tsx_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_e return true; } + std::string fetch_header_value (pjsip_msg *msg, std::string field) { + + pj_str_t name; + pjsip_generic_string_hdr * hdr; + std::string value, url; + size_t pos; + + std::cout << "fetch header value" << std::endl; + + /* Convert the field name into pjsip type */ + name = pj_str ((char*)field.c_str()); + + /* Get the header value and convert into string*/ + hdr = (pjsip_generic_string_hdr*) pjsip_msg_find_hdr_by_name (msg, &name, NULL); + + if (!hdr) + return ""; + + value = hdr->hvalue.ptr; + if ( (pos=value.find ("\n")) == std::string::npos) { + return ""; + } + + url = value.substr (0, pos); + return url; + } + diff --git a/src/sipvoiplink.h b/src/sipvoiplink.h index 92212c29353f982c147eccdf49356f0f6ce09de6..51bd9a01378b6a6f3dcf1ce90a664736927aba6d 100644 --- a/src/sipvoiplink.h +++ b/src/sipvoiplink.h @@ -23,6 +23,7 @@ #define SIPVOIPLINK_H #include "voiplink.h" +#include "hooks/urlhook.h" ////////////////////////////// /* PJSIP imports */ diff --git a/src/user_cfg.h b/src/user_cfg.h index 62bb5579e7676c4efac340749324a751bae83de1..48b78965d4ca9cf570f479e37f01b26a11270df7 100644 --- a/src/user_cfg.h +++ b/src/user_cfg.h @@ -78,8 +78,13 @@ #define ADDRESSBOOK_DISPLAY_PHONE_HOME "Addressbook.phone_home" #define ADDRESSBOOK_DISPLAY_PHONE_MOBILE "Addressbook.phone_mobile" +#define HOOKS "Hooks" /** Hooks section */ +#define URLHOOK_SIP_FIELD "Hooks.url_sip_field" +#define URLHOOK_COMMAND "Hooks.url_command" +#define URLHOOK_SIP_ENABLED "Hooks.sip_enabled" + #define EMPTY_FIELD "" /** Default value for empty field */ -#define DFT_STUN_SERVER "stun.fwdnet.net:3478" /** Default STUN server address */ +#define DFT_STUN_SERVER "stun.ekiga.net" /** Default STUN server address */ #define YES_STR "1" /** Default YES value */ #define NO_STR "0" /** Default NO value */ #define DFT_PULSE_LENGTH_STR "250" /** Default DTMF lenght */ diff --git a/test/hooksTest.h b/test/hooksTest.h new file mode 100644 index 0000000000000000000000000000000000000000..a08e7e3ecd19a5e6695f0da45c8c7a3d72f19cf3 --- /dev/null +++ b/test/hooksTest.h @@ -0,0 +1,68 @@ +/* + * 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. + */ + +// Cppunit import +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/TestCaller.h> +#include <cppunit/TestCase.h> +#include <cppunit/TestSuite.h> + +#include <assert.h> + +/* + * @file hooksTest.cpp + * @brief Regroups unitary tests related to the hooks. + */ + +#ifndef _HOOKS_TEST_ +#define _HOOKS_TEST_ + +class HooksTest : public CppUnit::TestCase { + + /** + * Use cppunit library macros to add unit test the factory + */ + CPPUNIT_TEST_SUITE (HooksTest); + CPPUNIT_TEST (); + CPPUNIT_TEST_SUITE_END(); + + public: + HooksTest() : CppUnit::TestCase("Hooks implementation Tests") {} + + /* + * Code factoring - Common resources can be initialized here. + * This method is called by unitcpp before each test + */ + void setUp(); + + /* + * Code factoring - Common resources can be released here. + * This method is called by unitcpp after each test + */ + inline void tearDown (); + + void testUnloadPlugins (); + + private: +}; + +/* Register our test module */ +CPPUNIT_TEST_SUITE_REGISTRATION (HooksTest); + +# diff --git a/tools/build-package.sh b/tools/build-package.sh index c2d4d5f85bab8e25b70fddf6a43dcd2cb23bf365..ec95e8e38a9d3fb53de97fa94b1d208c8b260b54 100755 --- a/tools/build-package.sh +++ b/tools/build-package.sh @@ -54,7 +54,7 @@ git checkout origin/release -b release # Get system parameters arch_flag=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'` os_version=`lsb_release -d -s -c | sed -e '1d'` -ver=0.9.3 +ver=0.9.4 if [ $platform == "ubuntu" ];then # Generate the changelog, according to the distribution and the git commit messages