diff --git a/Makefile.am b/Makefile.am index 9e957b71eb4da4409ad32810285d4c6698912164..a53fc6a4deae5f2d1bd357c983cfbcb47b805a63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libs src ringtones +SUBDIRS = libs src ringtones po EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* README.gentoo diff --git a/configure.ac b/configure.ac index 45cdc5b0d3e66353c66c0cc2759f23b8752202c7..2f5f661b9a575bd18cbaa21eb2b37c57f281d6dc 100644 --- a/configure.ac +++ b/configure.ac @@ -51,8 +51,7 @@ AC_CONFIG_FILES([po/Makefile \ AC_CONFIG_FILES([doc/Makefile \ doc/doxygen/Makefile]) -AC_CONFIG_FILES([platform/debian/changelog \ - platform/rpm/sflphone.spec \ +AC_CONFIG_FILES([platform/rpm/sflphone.spec \ platform/fedora/sflphone.spec \ platform/fedora/sflphone-fc6.spec]) @@ -251,13 +250,13 @@ AC_ARG_WITH([iax2], LIBIAX2= AS_IF([test "x$with_iax2" != xno], - [AC_CHECK_HEADER([iax/iax.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers (you may need to install the dev package). You may use --without-iax2 to compile without iax2 protocol support.]))] - [AC_CHECK_LIB([iax], [iax_init], + [AC_CHECK_LIB([iax2], [iax_init], [], [AC_MSG_FAILURE( - [libiax2 link test failed. You may use --without-iax2 to compile without iax2 protocol support.])] + [libiax2 link test failed. You need the sflphone-iax2 package. You may use --without-iax2 to compile without iax2 protocol support.])] ) ] + [AC_CHECK_HEADER([iax2/iax.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers. You may need to install sflphone-iax2-dev package. You may use --without-iax2 to compile without iax2 protocol support.]))] ) AC_DEFINE([HAVE_IAX], test "x$with_iax2" = "xyes", [Define if you have libiax2]) diff --git a/platform/debian/Release b/debian/Release similarity index 50% rename from platform/debian/Release rename to debian/Release index 5020eaf688e37bfb04013e7c8fbbe126a9ce2f27..7fb4d2cd9ab47a7db36db62a5fbbdea976a4655d 100644 --- a/platform/debian/Release +++ b/debian/Release @@ -1,7 +1,7 @@ Archive : unstable -Version: 0.8.2-3 -Component : main +Version: 0.9 +Component : universe Origin : SFLphone Label : sflphone -Architecture : i386 +Architecture : all diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 0000000000000000000000000000000000000000..9629dfc30d3f056cab6af72efd5493216aaf12cc --- /dev/null +++ b/debian/TODO @@ -0,0 +1 @@ +Please refers to the official site: http://www.sflphone.org, rubrique Goals diff --git a/platform/debian/arch b/debian/arch similarity index 100% rename from platform/debian/arch rename to debian/arch diff --git a/platform/debian/autopackage.sh b/debian/autopackage.sh similarity index 74% rename from platform/debian/autopackage.sh rename to debian/autopackage.sh index 6fedd7edb24b9b18e0641d5b354c0f5163174c4c..331b691ce8c057064d50bbd390ad85897a6b259c 100755 --- a/platform/debian/autopackage.sh +++ b/debian/autopackage.sh @@ -6,13 +6,13 @@ if [ $1 = "-h" ] then - echo "Usage: ./sfl_debian.sh version arch" - echo "For instance: ./sfl_debian.sh 0.8.2 i386" + echo "Usage: ./autopackage.sh version arch" + echo "For instance: ./autopackage.sh 0.8.2 all" exit 0 fi # Libraries dependencies -dependencies="libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , gnome-common , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libosip2-3, libexosip2-5, libcommoncpp2-1.5.3-0 , libccrtp1-1.5-1 , libiax0 , libgtkglext1" +dependencies="libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , gnome-common , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libosip2-2, libexosip2-4, libcommoncpp2-1.6-0 , libccrtp1-1.6-0 , sflphone-iax2 , libgsm1 (>=1.0.10) , libspeex1 (>=1.1.12) , dbus-c++-1 (>=0.5.0)" # Package Infos package="sflphone" @@ -40,12 +40,20 @@ debdir="$sfldir/DEBIAN" mkdir -p $sfldir$bindir cp $bindir/sflphoned $sfldir$bindir cp $bindir/sflphone-gtk $sfldir$bindir +ln -sf $bindir/sflphone-gtk $sfldir$bindir/sflphone #/usr/lib mkdir -p $sfldir/usr/lib/sflphone/codecs -cp $libdir/libdbus-c++-1.so $sfldir$libdir -cp $libdir/libdbus-c++-1.so.0 $sfldir$libdir -cp $libdir/libdbus-c++-1.so.0.0.0 $sfldir$libdir +# dbus +#cp $libdir/libdbus-c++-1.so $sfldir$libdir +#cp $libdir/libdbus-c++-1.so.0 $sfldir$libdir +#cp $libdir/libdbus-c++-1.so.0.0.0 $sfldir$libdir +# iax2 +# cp $libdir/libiax2.so.0.0.0 $sfldir$libdir +# ln -sf $libdir/libiax2.so.0.0.0 $sfldir$libdir/libiax2.so.0 +# ln -sf $libdir/libiax2.so.0.0.0 $sfldir$libdir/libiax2.so +# chmod 755 $sfldir$libdir/libiax2.so.0.0.0 + #/usr/lib/sflphone/codecs cp $libdir/sflphone/codecs/libcodec_* $sfldir$libdir/sflphone/codecs/ @@ -66,7 +74,13 @@ cp $sharedir/sflphone/ringtones/* $sfldir$sharedir/sflphone/ringtones #/usr/share/locale/fr/LC_MESSAGES mkdir -p $sfldir$sharedir/locale/fr/LC_MESSAGES cp $sharedir/locale/fr/LC_MESSAGES/sflphone.mo $sfldir$sharedir/locale/fr/LC_MESSAGES +mkdir -p $sfldir$sharedir/locale/es/LC_MESSAGES cp $sharedir/locale/es/LC_MESSAGES/sflphone.mo $sfldir$sharedir/locale/es/LC_MESSAGES +#/usr/share/doc/sflphone +mkdir -p $sfldir$sharedir/doc/sflphone +cp changelog.Debian.gz $sfldir$sharedir/doc/sflphone +cp copyright $sfldir$sharedir/doc/sflphone +cp TODO $sfldir$sharedir/doc/sflphone # DEBIAN files mkdir -p $debdir @@ -89,3 +103,6 @@ echo "Description: $desc" >> $control echo "Build the debian package ... " dpkg --build $sfldir ${sfldir}_$2.deb +# Clean up the generated stuff +echo "Clean up ... " +rm -rf $sfldir diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000000000000000000000000000000000..cb680da4d4d5612b76e1555f33474e95784690a2 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,37 @@ +sflphone (0.9) unstable; urgency=low + + * Clean dependencies ( removal of libboost ) + * Several GTK improvement and updates + * account window + * configuration window + * Migrate from GtkCheckMenuItem to GtkImageMenuItem + * ALSA standard I/O transfers: MMAP instead of R/W + * Fix speex audio quality + * IAX2 protocol + * Fix hold/unhold situation + * Add on hold music + * SIP protocol + * Ringtone on incoming call + * Fix transfer situation + * Add desktop notification ( libnotify ) + * Improve the system tray icon behaviour + * Improve registration error handling + * Register/unregister from the account window takes effect without starting + back SFLphone + * Compilation warnings removal + * Call history + * Add an account configuration wizard + + -- Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Wed, 30 Apr 2008 16:58:25 -0500 + +sflphone (0.8.2) unstable; urgency=low + + * Internationalization of the GTK GUI + * English / French + * STUN support + * Slight modifications of the graphical interface ( tooltips, dialpad, ...) + + + -- Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Fri, 21 Mar 2008 11:37:53 -0500 + + diff --git a/debian/changelog.Debian b/debian/changelog.Debian new file mode 100644 index 0000000000000000000000000000000000000000..fab62d270a385b9c848ed9640629f85e69994b2b --- /dev/null +++ b/debian/changelog.Debian @@ -0,0 +1,35 @@ +sflphone (0.9) unstable; urgency=low + * Clean dependencies ( removal of libboost ) + * Several GTK improvement and updates + * account window + * configuration window + * Migrate from GtkCheckMenuItem to GtkImageMenuItem + * ALSA standard I/O transfers: MMAP instead of R/W + * Fix speex audio quality + * IAX2 protocol + * Fix hold/unhold situation + * Add on hold music + * SIP protocol + * Ringtone on incoming call + * Fix transfer situation + * Add desktop notification ( libnotify ) + * Improve the system tray icon behaviour + * Improve registration error handling + * Register/unregister from the account window takes effect without starting + back SFLphone + * Compilation warnings removal + * Call history + * Add an account configuration wizard + + -- Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Wed, 30 Apr 2008 16:58:25 -0500 + +sflphone (0.8.2 ) unstable; urgency=low + + * Internationalization of the GTK GUI + * English / French + * STUN support + * Slight modifications of the graphical interface ( tooltips, dialpad, ...) + + + -- Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Fri, 21 Mar 2008 11:37:53 -0500 + diff --git a/debian/changelog.Debian.gz b/debian/changelog.Debian.gz new file mode 100644 index 0000000000000000000000000000000000000000..fc7a289da4544fe21811e35170d8227c5da208af Binary files /dev/null and b/debian/changelog.Debian.gz differ diff --git a/platform/debian/changelog.in b/debian/changelog.in similarity index 100% rename from platform/debian/changelog.in rename to debian/changelog.in diff --git a/platform/debian/compat b/debian/compat similarity index 100% rename from platform/debian/compat rename to debian/compat diff --git a/platform/debian/control b/debian/control similarity index 91% rename from platform/debian/control rename to debian/control index 8dfddbad15ce1ccfefd989f67416d6ba37f5c8cb..24b6821c15f5656563d8231c6d897b258f72c8d3 100644 --- a/platform/debian/control +++ b/debian/control @@ -1,12 +1,16 @@ -Package: sflphone -Version: 0.8.2-3 +Source: sflphone +Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional +Standards-Version: 0.8.2-3 + +Package: sflphone Architecture: i386 +Section: gnome +Priority: optional Essential: no Depends: libgcc1 , libsamplerate0 (>=0.1.2) , libdbus-glib-1-2 (>= 0.73), libexpat1 , libgtk2.0-0 , gnome-common , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) , libosip2-3, libexosip2-5, libcommoncpp2-1.5.3-0 , libccrtp1-1.5-1 , libiax0 , libgtkglext1 Homepage: http://www.sflphone.org -Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Description: SFLphone - Answer the call SFLphone is meant to be a robust enterprise-class desktop phone. It is design with a hundred-calls-a-day receptionist in mind. It can work for you, too. . diff --git a/platform/debian/copyright b/debian/copyright similarity index 53% rename from platform/debian/copyright rename to debian/copyright index 8da0bb92a2290009163eb209eb3bbeacb9297c16..2dd82d1ba2678dadb6aaafea1bdb54ce9d3441a9 100644 --- a/platform/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ This package was debianized by Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> -Fri, 21 Mar 2008 11:37:53 -0500. +Wed, 30 Apr 2008 11:37:53 -0500. It was downloaded from the git repository of SFLphone: git://sflphone.org/git/sflphone.git @@ -15,3 +15,14 @@ You are free to distribute this software under the terms of the GNU General Public License version 3. On Debian systems, the complete text of the GNU General Public License can be found in the file `/usr/share/common-licenses/GPL'. + +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. + + diff --git a/platform/debian/dirs b/debian/dirs similarity index 100% rename from platform/debian/dirs rename to debian/dirs diff --git a/platform/debian/docs b/debian/docs similarity index 100% rename from platform/debian/docs rename to debian/docs diff --git a/debian/package b/debian/package new file mode 100644 index 0000000000000000000000000000000000000000..48d8c4b9640c146ed1adcef04ccbd57b31d31551 --- /dev/null +++ b/debian/package @@ -0,0 +1 @@ +sflphone_0.8.5 diff --git a/platform/debian/rules b/debian/rules similarity index 94% rename from platform/debian/rules rename to debian/rules index 1db45d437cad274c9aa11af91f68afcc29a02cda..efde01dd03e95702fef9e90f0c6e0c0cfd5ed9bf 100755 --- a/platform/debian/rules +++ b/debian/rules @@ -16,6 +16,8 @@ # This has to be exported to make some magic below work. export DH_OPTIONS +package=sflphone + # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -33,8 +35,11 @@ endif config.status: configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" CXX="$(CXX)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info - + autoreconf --install + CFLAGS="$(CFLAGS)" CXX="$(CXX)" ./configure --prefix=/usr --with-debug + cd sflphone-gtk + gnome-autogen.sh --prefix=/usr + #Architecture build: build-arch build-indep diff --git a/platform/debian/sflphone.postrm b/debian/sflphone.postrm similarity index 100% rename from platform/debian/sflphone.postrm rename to debian/sflphone.postrm diff --git a/platform/debian/sflphone.preinst b/debian/sflphone.preinst similarity index 100% rename from platform/debian/sflphone.preinst rename to debian/sflphone.preinst diff --git a/platform/debian/sflphone.prerm b/debian/sflphone.prerm similarity index 100% rename from platform/debian/sflphone.prerm rename to debian/sflphone.prerm diff --git a/platform/debian/sflphoned-doc.docs b/debian/sflphoned-doc.docs similarity index 100% rename from platform/debian/sflphoned-doc.docs rename to debian/sflphoned-doc.docs diff --git a/platform/debian/sflphoned-doc.install b/debian/sflphoned-doc.install similarity index 100% rename from platform/debian/sflphoned-doc.install rename to debian/sflphoned-doc.install diff --git a/platform/debian/update.sh b/debian/update.sh similarity index 100% rename from platform/debian/update.sh rename to debian/update.sh diff --git a/debian/upload.sh b/debian/upload.sh new file mode 100755 index 0000000000000000000000000000000000000000..197740fe8e4d73863b6215c1cfac9053b3e3f63d --- /dev/null +++ b/debian/upload.sh @@ -0,0 +1,3 @@ +!#/bin/sh + +scp $1 root@gpl.savoirfairelinux.net:/var/www/vhosts/sflphone.org/htdocs/debian/dists/unstable/universe/binary-i386 diff --git a/doc/general_component_diagram.png b/doc/general_component_diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..fd5b11d7fdb3dd8aee972afdcc19a8bcc2998c1f Binary files /dev/null and b/doc/general_component_diagram.png differ diff --git a/images/sflphone.png b/images/sflphone.png new file mode 100644 index 0000000000000000000000000000000000000000..50c1483ac152972fa6d993b6823b5d247dd258bc Binary files /dev/null and b/images/sflphone.png differ diff --git a/libs/dbus/AUTHORS b/libs/dbus/AUTHORS deleted file mode 100644 index d9c8833559ba2c6f650242249c6b4bb98138c7bd..0000000000000000000000000000000000000000 --- a/libs/dbus/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Paolo Durante <shackan@gmail.com> diff --git a/libs/dbus/COPYING b/libs/dbus/COPYING deleted file mode 100644 index 5ab7695ab8cabe0c5c8a814bb0ab1e8066578fbb..0000000000000000000000000000000000000000 --- a/libs/dbus/COPYING +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/libs/dbus/ChangeLog b/libs/dbus/ChangeLog deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/dbus/INSTALL b/libs/dbus/INSTALL deleted file mode 100644 index 5458714e1e2cb289572992ad92eceffc848f64d6..0000000000000000000000000000000000000000 --- a/libs/dbus/INSTALL +++ /dev/null @@ -1,234 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -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 -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -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 -disabled by default to prevent problems with accidental use of stale -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 -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -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 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. - - 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. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -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 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 `..'. - - 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 -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -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). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/libs/dbus/Makefile.am b/libs/dbus/Makefile.am deleted file mode 100644 index 29bb7c9bb72b0e73a77594019c38280345c20cf2..0000000000000000000000000000000000000000 --- a/libs/dbus/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -SUBDIRS = src tools data doc examples - -EXTRA_DIST = autogen.sh libdbus-c++.spec libdbus-c++.spec.in - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dbus-c++-1.pc - -MAINTAINERCLEANFILES = \ - configure \ - Makefile.in \ - aclocal.m4 \ - compile \ - config.guess \ - config.sub \ - depcomp \ - install-sh \ - ltmain.sh \ - mdate-sh \ - missing \ - mkinstalldirs \ - libdbus-c++.spec - diff --git a/libs/dbus/NEWS b/libs/dbus/NEWS deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/dbus/README b/libs/dbus/README deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/dbus/SConscript b/libs/dbus/SConscript deleted file mode 100644 index d7b235898951800d2de2cb1470266aa63daad1df..0000000000000000000000000000000000000000 --- a/libs/dbus/SConscript +++ /dev/null @@ -1,85 +0,0 @@ -# -# library -# - -env = WengoGetEnvironment() - -env.ParseConfig('pkg-config --cflags --libs dbus-1') - -libs = [ - 'expat' -] -lib_path = [] -include_path = [ - 'include' -] -defines = { - 'DBUS_API_SUBJECT_TO_CHANGE':1, - 'DEBUG':1 -} -headers = [] -sources = [ - 'src/connection.cpp', - 'src/debug.cpp', - 'src/dispatcher.cpp', - 'src/error.cpp', - 'src/eventloop.cpp', - 'src/interface.cpp', - 'src/introspection.cpp', - 'src/property.cpp', - 'src/message.cpp', - 'src/object.cpp', - 'src/pendingcall.cpp', - 'src/server.cpp', - 'src/types.cpp', - 'src/xml.cpp' -] - -env.WengoAddDefines(defines) -env.WengoAddIncludePath(include_path) -env.WengoUseLibraries(libs) -env.WengoStaticLibrary('dbus-c++', sources) - -# -# tools -# - -tools_env = WengoGetEnvironment() - -tools_libs = [ - 'dbus-c++' -] -tools_defines = { - 'DBUS_API_SUBJECT_TO_CHANGE':1, -} -introspect_sources = [ - 'tools/introspect.cpp', -] - -xml2cpp_sources = [ - 'tools/xml2cpp.cpp' -] - -#tools_env.Append(LINKFLAGS = '-z origin') -#tools_env.Append(RPATH = env.Literal('\\$$ORIGIN\.')) - -tools_env.WengoAddDefines(tools_defines) -tools_env.WengoAddIncludePath(include_path) -tools_env.WengoUseLibraries(tools_libs) - -dbusxx_introspect = tools_env.WengoProgram('dbusxx-introspect', introspect_sources) -dbusxx_xml2cpp = tools_env.WengoProgram('dbusxx-xml2cpp', xml2cpp_sources) - -# -# xml translator -# - -def dbusxx_xml2cpp_emitter(target, source, env): - env.Depends(target, dbusxx_xml2cpp) - return (target, source) - -dbusxx_xml2cpp_builder = Builder(action = dbusxx_xml2cpp[0].abspath + ' $SOURCE --adaptor=$TARGET', - emitter = dbusxx_xml2cpp_emitter, - suffix = '.h', src_suffix = '.xml') - -Export('dbusxx_xml2cpp_builder') diff --git a/libs/dbus/TODO b/libs/dbus/TODO deleted file mode 100644 index f975a80a45241239e7a50bbb859bdc26de54d1c2..0000000000000000000000000000000000000000 --- a/libs/dbus/TODO +++ /dev/null @@ -1,8 +0,0 @@ -* Implement asynchronous method calls (hint: start from DBus::PendingCall) -* ...and patch the codegen to generate stubs for them -* Implement continuations in a saner way -* Find time for some hardcore valgrinding -* Make DBus::Server free an incoming connection when it's disconnected, not when freeing the server -* More examples -* Inline (Doxygen-style) documentation -* Native protocol implementation (as an alternative to libdbus) diff --git a/libs/dbus/autogen.sh b/libs/dbus/autogen.sh deleted file mode 100755 index 4af86e25d4b4dde140668ab04805c9f0c3a8018e..0000000000000000000000000000000000000000 --- a/libs/dbus/autogen.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -function autocmd() -{ - echo "Running ${1}..." - $* || { - echo "Error running ${1}" - exit 1 - } -} - -autocmd libtoolize --force --copy -autocmd aclocal -autocmd autoheader -autocmd automake --add-missing --force-missing --copy -Wall -autocmd autoconf - -echo "Autogen done, now you can ./configure" diff --git a/libs/dbus/configure.ac b/libs/dbus/configure.ac deleted file mode 100644 index 230564bc25e37e7fc811773930701c0ab7ac18c2..0000000000000000000000000000000000000000 --- a/libs/dbus/configure.ac +++ /dev/null @@ -1,193 +0,0 @@ -# Autojunk script for libdbus-c++ - -AC_PREREQ(2.59) -AC_INIT([libdbus-c++], 0.5.0, [shackan@gmail.com]) - -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AM_CONFIG_HEADER([include/dbus-c++/config.h]) - -AC_CANONICAL_HOST - -AC_SUBST(PACKAGE_VERSION) - - -# Set configuration options - -AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug], - [enable debugging support]), - [enable_debug=$enableval], - [enable_debug=no] -) - -AC_ARG_ENABLE(glib, - AS_HELP_STRING([--enable-glib], - [enable glib integration]), - [enable_glib=$enableval], - [enable_glib=no] -) - -AC_ARG_ENABLE(doxygen-docs, - AS_HELP_STRING([--enable-doxygen-docs], - [build DOXYGEN documentation (requires Doxygen)]), - [enable_doxygen_docs=$enableval], - [enable_doxygen_docs=no] -) - -# Check for programs - -AC_LANG_CPLUSPLUS - -AC_PROG_CC -AC_PROG_CXX - -CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}} -AC_SUBST(CXX_FOR_BUILD) - -AM_PROG_LIBTOOL - -PKG_PROG_PKG_CONFIG - - -AC_MSG_CHECKING([whether $CXX supports symbol visibility]) - -vtest=`$CXX --help --verbose 2>&1 | grep fvisibility` - -if test -n "$vtest"; then - AC_MSG_RESULT(yes) - - AC_DEFINE(GCC_HASCLASSVISIBILITY, 1, [to enable hidden symbols]) - CXXFLAGS="-fvisibility=hidden" -else - AC_MSG_RESULT(no) -fi - - -# Check for dependencies - -DBUS_REQUIRED_VERSION=0.60 -PKG_CHECK_MODULES(dbus, [dbus-1 >= $DBUS_REQUIRED_VERSION],, - AC_MSG_ERROR([You need the DBus libraries (version 0.6 or better)] - [http://www.freedesktop.org/wiki/Software_2fdbus]) -) -AC_SUBST(dbus_CFLAGS) -AC_SUBST(dbus_LIBS) - -DBUS_API_STABLE_VERSION=1.0.0 -PKG_CHECK_EXISTS([dbus-1 < $DBUS_API_STABLE_VERSION], - [AC_DEFINE(DBUS_API_SUBJECT_TO_CHANGE, , [unstable DBus])] -) - -DBUS_THREADS_INIT_DEFAULT_VERSION=0.93 -PKG_CHECK_EXISTS([dbus-1 >= $DBUS_THREADS_INIT_DEFAULT_VERSION], - [AC_DEFINE(DBUS_HAS_THREADS_INIT_DEFAULT, , [dbus_threads_init_default (needs DBus >= 0.93)])] -) - -DBUS_RECURSIVE_MUTEX_VERSION=0.95 -PKG_CHECK_EXISTS([dbus-1 >= $DBUS_RECURSIVE_MUTEX_VERSION], - [AC_DEFINE(DBUS_HAS_RECURSIVE_MUTEX, , [DBus supports recursive mutexes (needs DBus >= 0.95)])] -) - - -if test "$enable_glib" = "yes" ; then -PKG_CHECK_MODULES([glib], glib-2.0) -AC_SUBST(glib_CFLAGS) -AC_SUBST(glib_LIBS) -AM_CONDITIONAL(ENABLE_GLIB, test 1 = 1) -PKG_CHECK_MODULES([gtkmm], gtkmm-2.4, - AM_CONDITIONAL(HAVE_GTKMM, test 1 = 1), - AM_CONDITIONAL(HAVE_GTKMM, test 0 = 1) -) -AC_SUBST(gtkmm_CFLAGS) -AC_SUBST(gtkmm_LIBS) -else -AM_CONDITIONAL(ENABLE_GLIB, test 0 = 1) -AM_CONDITIONAL(HAVE_GTKMM, test 0 = 1) -fi - -AC_CHECK_LIB([expat], XML_ParserCreate_MM, - [AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false)], - have_expat=false) - -if ! $have_expat; then - AC_MSG_ERROR([You need the eXpat xml parser] - [http://expat.sourceforge.net/]) -fi - -xml_CFLAGS= -xml_LIBS=-lexpat - -AC_SUBST(xml_CFLAGS) -AC_SUBST(xml_LIBS) - -AC_CHECK_LIB([pthread], pthread_create, - [AC_CHECK_HEADERS(pthread.h, have_pthread=true, have_pthread=false)], - have_pthread=false) - -AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "true") - -if test "$enable_debug" = "yes" ; then - CXXFLAGS="$CXXFLAGS -Wall -ggdb -O0 -DDEBUG" -else - CXXFLAGS="$CXXFLAGS -Wall -O3" -fi - - -# Doxygen Documentation - -AC_PATH_PROG(DOXYGEN, doxygen, no) - -AC_MSG_CHECKING([whether to build Doxygen documentation]) - -if test "$DOXYGEN" = "no" ; then - have_doxygen=no -else - have_doxygen=yes -fi - -if test "$enable_doxygen_docs" = "auto" ; then - enable_doxygen_docs=no - - AC_MSG_RESULT(no) -fi - -if test "$enable_doxygen_docs" = "yes" ; then - if test "$have_doxygen" = "no"; then - AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found]) - fi - - AC_MSG_RESULT(yes) -fi - -AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test "$enable_doxygen_docs" = "yes") - -# For the tools/, we need libdbus-c++ for the "build" architecture as well - -AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes") - -AC_ARG_WITH(build-libdbus-cxx, - AS_HELP_STRING([--with-build-libdbus-cxx], - [For cross compilation: path to libdbus-cxx which was compiled for the 'build' system.]), - [ BUILD_LIBDBUS_CXX_DIR=${withval} ], - [ BUILD_LIBDBUS_CXX_DIR="\$(top_builddir)" ] -) -AC_SUBST(BUILD_LIBDBUS_CXX_DIR) - - -# Save processed files - -AC_OUTPUT( - Makefile - src/Makefile - tools/Makefile - data/Makefile - doc/Makefile - doc/Doxyfile - examples/Makefile - examples/properties/Makefile - examples/echo/Makefile - examples/hal/Makefile - examples/glib/Makefile - dbus-c++-1.pc - libdbus-c++.spec -) diff --git a/libs/dbus/data/Makefile.am b/libs/dbus/data/Makefile.am deleted file mode 100644 index 23df86ec8db8fe4cc2cfd00328f5edc0d1097fae..0000000000000000000000000000000000000000 --- a/libs/dbus/data/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = org.freedesktop.DBus.xml - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/data/org.freedesktop.DBus.xml b/libs/dbus/data/org.freedesktop.DBus.xml deleted file mode 100644 index 27afd0aa200085a6ec238252e755c146544cdad9..0000000000000000000000000000000000000000 --- a/libs/dbus/data/org.freedesktop.DBus.xml +++ /dev/null @@ -1,74 +0,0 @@ -<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" - "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> -<node> - <interface name="org.freedesktop.DBus.Introspectable"> - <method name="Introspect"> - <arg name="data" direction="out" type="s"/> - </method> - </interface> - <interface name="org.freedesktop.DBus"> - <method name="RequestName"> - <arg direction="in" type="s"/> - <arg direction="in" type="u"/> - <arg direction="out" type="u"/> - </method> - <method name="ReleaseName"> - <arg direction="in" type="s"/> - <arg direction="out" type="u"/> - </method> - <method name="StartServiceByName"> - <arg direction="in" type="s"/> - <arg direction="in" type="u"/> - <arg direction="out" type="u"/> - </method> - <method name="Hello"> - <arg direction="out" type="s"/> - </method> - <method name="NameHasOwner"> - <arg direction="in" type="s"/> - <arg direction="out" type="b"/> - </method> - <method name="ListNames"> - <arg direction="out" type="as"/> - </method> - <method name="AddMatch"> - <arg direction="in" type="s"/> - </method> - <method name="RemoveMatch"> - <arg direction="in" type="s"/> - </method> - <method name="GetNameOwner"> - <arg direction="in" type="s"/> - <arg direction="out" type="s"/> - </method> - <method name="ListQueuedOwners"> - <arg direction="in" type="s"/> - <arg direction="out" type="as"/> - </method> - <method name="GetConnectionUnixUser"> - <arg direction="in" type="s"/> - <arg direction="out" type="u"/> - </method> - <method name="GetConnectionUnixProcessID"> - <arg direction="in" type="s"/> - <arg direction="out" type="u"/> - </method> - <method name="GetConnectionSELinuxSecurityContext"> - <arg direction="in" type="s"/> - <arg direction="out" type="ay"/> - </method> - <method name="ReloadConfig"> - </method> - <signal name="NameOwnerChanged"> - <arg type="s"/> - <arg type="s"/> - <arg type="s"/> - </signal> - <signal name="NameLost"> - <arg type="s"/> - </signal> - <signal name="NameAcquired"> - <arg type="s"/> - </signal> - </interface> -</node> diff --git a/libs/dbus/dbus-c++-1.pc.in b/libs/dbus/dbus-c++-1.pc.in deleted file mode 100644 index bc5860a95594e9bd30af8687b7c1e162f6fd79bb..0000000000000000000000000000000000000000 --- a/libs/dbus/dbus-c++-1.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: dbus-c++ -Description: Native C++ bindings for D-Bus. -Requires: dbus-1 -Version: @VERSION@ -Libs: -L${libdir} -ldbus-c++-1 -Cflags: -I${includedir}/dbus-c++-1 -DDBUS_API_SUBJECT_TO_CHANGE diff --git a/libs/dbus/doc/Doxyfile.in b/libs/dbus/doc/Doxyfile.in deleted file mode 100644 index a2b3d4415fe2026b0f0e520d88934377bda6ff9a..0000000000000000000000000000000000000000 --- a/libs/dbus/doc/Doxyfile.in +++ /dev/null @@ -1,251 +0,0 @@ -# Doxyfile 1.4.6 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = @PACKAGE@ -PROJECT_NUMBER = @VERSION@ -OUTPUT_DIRECTORY = @top_srcdir@/doc/ -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = YES -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = NO -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = YES -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = @top_srcdir@/src/ @top_srcdir@/include/ -FILE_PATTERNS = *.cpp \ - *.h -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = Makefile.* \ - ChangeLog \ - CHANGES \ - CHANGES.* \ - README \ - README.* \ - *.png \ - AUTHORS \ - DESIGN \ - DESIGN.* \ - *.desktop \ - DESKTOP* \ - COMMENTS \ - HOWTO \ - magic \ - NOTES \ - TODO \ - THANKS -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 640 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/libs/dbus/doc/Makefile.am b/libs/dbus/doc/Makefile.am deleted file mode 100644 index 39fd9b9deb140ecfadc9dde627dc835de95fb335..0000000000000000000000000000000000000000 --- a/libs/dbus/doc/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -if DBUS_DOXYGEN_DOCS_ENABLED - -EXTRA_DIST = Doxyfile.in - -noinst_PROGRAMS = index.html - -index_html_SOURCES = Doxyfile - -index.html: Doxyfile - doxygen Doxyfile - -endif - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/doc/html/Makefile.am b/libs/dbus/doc/html/Makefile.am deleted file mode 100644 index 8eb67f86574b1821e66ddf261e6c7de2eaa46546..0000000000000000000000000000000000000000 --- a/libs/dbus/doc/html/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -CLEANFILES = *.html *.css *.png *.gif - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/examples/Makefile.am b/libs/dbus/examples/Makefile.am deleted file mode 100644 index b346604bad07e6aabfc20c1e3a581325446085f1..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = properties echo hal glib - -MAINTAINERCLEANFILES = \ - Makefile.in - diff --git a/libs/dbus/examples/echo/Makefile.am b/libs/dbus/examples/echo/Makefile.am deleted file mode 100644 index d3d8e56c99292e6b84bbfd690babe9f705aa59db..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -EXTRA_DIST = README echo-introspect.xml - -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_PROGRAMS = echo-server - -echo_server_SOURCES = echo-server-glue.h echo-server.h echo-server.cpp -echo_server_LDADD = $(top_builddir)/src/libdbus-c++-1.la - -echo-server-glue.h: echo-introspect.xml - $(top_builddir)/tools/dbusxx-xml2cpp $^ --adaptor=$@ - -if HAVE_PTHREAD -noinst_PROGRAMS += echo-client-mt -endif - -echo_client_mt_SOURCES = echo-client-glue.h echo-client.h echo-client.cpp -echo_client_mt_LDADD = $(top_builddir)/src/libdbus-c++-1.la -lpthread - -echo-client-glue.h: echo-introspect.xml - $(top_builddir)/tools/dbusxx-xml2cpp $^ --proxy=$@ - -BUILT_SOURCES = echo-server-glue.h echo-client-glue.h -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/examples/echo/README b/libs/dbus/examples/echo/README deleted file mode 100644 index 74e1d6d16c59858237e98e5186000951397d95d5..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/README +++ /dev/null @@ -1,23 +0,0 @@ -This is probably the most simple D-Bus program you could conceive - -To test, run `DBUSXX_VERBOSE=1 ./echo-server` and try the following commands: - -dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Random - -dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Hello string:"world" - -dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Sum array:int32:10,100,250 - -dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Info - -or, using python instead - -$ python -import dbus -bus = dbus.SessionBus() -object = bus.get_object('org.freedesktop.DBus.Examples.Echo','/org/freedesktop/DBus/Examples/Echo') -echo = dbus.Interface(object, dbus_interface='org.freedesktop.DBus.EchoDemo') -echo.Random() -echo.Hello("world") -echo.Sum([123, 234, 95, 520]) -echo.Info() diff --git a/libs/dbus/examples/echo/echo-client.cpp b/libs/dbus/examples/echo/echo-client.cpp deleted file mode 100644 index 11553659326c6ba466fa90fd6108e75886fb20b6..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/echo-client.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "echo-client.h" -#include <iostream> -#include <pthread.h> -#include <signal.h> - -#ifdef HAVE_CONFIG_H -#include <dbus-c++/config.h> -#endif - -using namespace std; - -static const char* ECHO_SERVER_NAME = "org.freedesktop.DBus.Examples.Echo"; -static const char* ECHO_SERVER_PATH = "/org/freedesktop/DBus/Examples/Echo"; - -EchoClient::EchoClient( DBus::Connection& connection, const char* path, const char* name ) -: DBus::ObjectProxy(connection, path, name) -{ -} - -void EchoClient::Echoed( const DBus::Variant& value ) -{ - cout << "!"; -} - -/* - * For some strange reason, libdbus frequently dies with an OOM - */ - -static const int THREADS = 16; - -static bool spin = true; - -void* greeter_thread( void* arg ) -{ - DBus::Connection* conn = reinterpret_cast<DBus::Connection*>(arg); - - EchoClient client(*conn, ECHO_SERVER_PATH, ECHO_SERVER_NAME); - - char idstr[16]; - - snprintf(idstr, sizeof(idstr), "%lu", pthread_self()); - - for(int i = 0; i < 100 && spin; ++i) - { - cout << client.Hello(idstr) << endl; - } - - cout << idstr << " done " << endl; - - return NULL; -} - -DBus::BusDispatcher dispatcher; - -void niam( int sig ) -{ - spin = false; - - dispatcher.leave(); -} - -int main() -{ - signal(SIGTERM, niam); - signal(SIGINT, niam); - -#ifdef DBUS_HAS_THREADS_INIT_DEFAULT - DBus::_init_threading(); -#else - cerr << "Thread support is not enabled! your D-Bus version is too old" << endl; -#endif - - DBus::default_dispatcher = &dispatcher; - - DBus::Connection conn = DBus::Connection::SessionBus(); - - pthread_t threads[THREADS]; - - for(int i = 0; i < THREADS; ++i) - { - pthread_create(threads+i, NULL, greeter_thread, &conn); - } - - dispatcher.enter(); - - cout << "terminating" << endl; - - for(int i = 0; i < THREADS; ++i) - { - pthread_join(threads[i], NULL); - } - - return 0; -} diff --git a/libs/dbus/examples/echo/echo-client.h b/libs/dbus/examples/echo/echo-client.h deleted file mode 100644 index 0f88e8005f5556fd5dcc1197332a72b865c65aa5..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/echo-client.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __DEMO_ECHO_CLIENT_H -#define __DEMO_ECHO_CLIENT_H - -#include <dbus-c++/dbus.h> -#include "echo-client-glue.h" - -class EchoClient -: public org::freedesktop::DBus::EchoDemo, - public DBus::IntrospectableProxy, - public DBus::ObjectProxy -{ -public: - - EchoClient( DBus::Connection& connection, const char* path, const char* name ); - - void Echoed( const DBus::Variant& value ); -}; - -#endif//__DEMO_ECHO_CLIENT_H diff --git a/libs/dbus/examples/echo/echo-introspect.xml b/libs/dbus/examples/echo/echo-introspect.xml deleted file mode 100644 index 7d415abdd4c17c9bd653bb9d619fc9dff22f5264..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/echo-introspect.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" ?> -<node name="/org/freedesktop/DBus/Examples/Echo"> - <interface name="org.freedesktop.DBus.EchoDemo"> - <method name="Random"> - <arg type="i" name="version" direction="out"/> - </method> - <method name="Hello"> - <arg type="s" name="name" direction="in"/> - <arg type="s" name="greeting" direction="out"/> - </method> - <method name="Echo"> - <arg type="v" name="input" direction="in"/> - <arg type="v" name="output" direction="out"/> - </method> - <method name="Cat"> - <arg type="s" name="file" direction="in"/> - <arg type="ay" name="stream" direction="out"/> - </method> - <method name="Sum"> - <arg type="ai" name="ints" direction="in"/> - <arg type="i" names="sum" direction="out"/> - </method> - <signal name="Echoed"> - <arg type="v" name="value"/> - </signal> - <method name="Info"> - <arg type="a{ss}" name="info" direction="out"/> - </method> - </interface> -</node> diff --git a/libs/dbus/examples/echo/echo-server.cpp b/libs/dbus/examples/echo/echo-server.cpp deleted file mode 100644 index 251e1a20b23819d38f0cf658928e808cbb4258c3..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/echo-server.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include "echo-server.h" -#include <unistd.h> -#include <stdlib.h> -#include <signal.h> -#include <stdio.h> - -static const char* ECHO_SERVER_NAME = "org.freedesktop.DBus.Examples.Echo"; -static const char* ECHO_SERVER_PATH = "/org/freedesktop/DBus/Examples/Echo"; - -EchoServer::EchoServer( DBus::Connection& connection ) -: DBus::ObjectAdaptor(connection, ECHO_SERVER_PATH) -{ -} - -DBus::Int32 EchoServer::Random() -{ - return rand(); -} - -DBus::String EchoServer::Hello( const DBus::String& name ) -{ - return "Hello " + name + "!"; -} - -DBus::Variant EchoServer::Echo( const DBus::Variant& value ) -{ - this->Echoed(value); - - return value; -} - -std::vector< DBus::Byte > EchoServer::Cat( const DBus::String & file ) -{ - FILE* handle = fopen(file.c_str(), "rb"); - - if(!handle) throw DBus::Error("org.freedesktop.DBus.EchoDemo.ErrorFileNotFound", "file not found"); - - DBus::Byte buff[1024]; - - size_t nread = fread(buff, 1, sizeof(buff), handle); - - fclose(handle); - - return std::vector< DBus::Byte > (buff, buff + nread); -} - -DBus::Int32 EchoServer::Sum( const std::vector<DBus::Int32>& ints ) -{ - DBus::Int32 sum = 0; - - for(size_t i = 0; i < ints.size(); ++i) sum += ints[i]; - - return sum; -} - -std::map< DBus::String, DBus::String > EchoServer::Info() -{ - std::map< DBus::String, DBus::String > info; - char hostname[HOST_NAME_MAX]; - - gethostname(hostname, sizeof(hostname)); - info["hostname"] = hostname; - info["username"] = getlogin(); - - return info; -} - - -DBus::BusDispatcher dispatcher; - -void niam( int sig ) -{ - dispatcher.leave(); -} - -int main() -{ - signal(SIGTERM, niam); - signal(SIGINT, niam); - - DBus::default_dispatcher = &dispatcher; - - DBus::Connection conn = DBus::Connection::SessionBus(); - conn.request_name(ECHO_SERVER_NAME); - - EchoServer server(conn); - - dispatcher.enter(); - - return 0; -} diff --git a/libs/dbus/examples/echo/echo-server.h b/libs/dbus/examples/echo/echo-server.h deleted file mode 100644 index 989d84c9d632c22c09a97c3c6f45c558632ef9b8..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/echo/echo-server.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __DEMO_ECHO_SERVER_H -#define __DEMO_ECHO_SERVER_H - -#include <dbus-c++/dbus.h> -#include "echo-server-glue.h" - -class EchoServer -: public org::freedesktop::DBus::EchoDemo, - public DBus::IntrospectableAdaptor, - public DBus::ObjectAdaptor -{ -public: - - EchoServer( DBus::Connection& connection ); - - DBus::Int32 Random(); - - DBus::String Hello( const DBus::String & name ); - - DBus::Variant Echo( const DBus::Variant & value ); - - std::vector< DBus::Byte > Cat( const DBus::String & file ); - - DBus::Int32 Sum( const std::vector<DBus::Int32> & ints ); - - std::map< DBus::String, DBus::String > Info(); -}; - -#endif//__DEMO_ECHO_SERVER_H diff --git a/libs/dbus/examples/glib/Makefile.am b/libs/dbus/examples/glib/Makefile.am deleted file mode 100644 index 849c46847775644ed92028048e8ee65b64dc6472..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/glib/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -EXTRA_DIST = - -AM_CPPFLAGS = -I$(top_srcdir)/include $(gtkmm_CFLAGS) -I$(top_srcdir)/tools - -if HAVE_GTKMM -noinst_PROGRAMS = dbus-browser -endif - -dbus_browser_SOURCES = dbus-glue.h dbus-browser.h dbus-browser.cpp $(top_srcdir)/tools/xml.cpp -dbus_browser_LDADD = $(top_builddir)/src/libdbus-c++-1.la $(gtkmm_LIBS) - -dbus-glue.h: $(top_srcdir)/data/org.freedesktop.DBus.xml - $(top_builddir)/tools/dbusxx-xml2cpp $^ --proxy=$@ - -BUILT_SOURCES = dbus-glue.h -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/examples/glib/dbus-browser.cpp b/libs/dbus/examples/glib/dbus-browser.cpp deleted file mode 100644 index cd74d7084cf99be0c964d49a725cde45ccdf6c2b..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/glib/dbus-browser.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "dbus-browser.h" - -#include <xml.h> -#include <iostream> - -using namespace std; - -static const char* DBUS_SERVER_NAME = "org.freedesktop.DBus"; -static const char* DBUS_SERVER_PATH = "/org/freedesktop/DBus"; - -DBusBrowser::DBusBrowser( ::DBus::Connection& conn ) -: ::DBus::ObjectProxy(conn, DBUS_SERVER_PATH, DBUS_SERVER_NAME) -{ - set_title("D-Bus Browser"); - set_border_width(5); - set_default_size(400, 500); - - typedef std::vector< ::DBus::String > Names; - - Names names = ListNames(); - - for(Names::iterator it = names.begin(); it != names.end(); ++it) - { - _cb_busnames.append_text(*it); - } - - _cb_busnames.signal_changed().connect( sigc::mem_fun(*this, &DBusBrowser::on_select_busname) ); - - _tm_inspect = Gtk::TreeStore::create(_records); - _tv_inspect.set_model(_tm_inspect); - _tv_inspect.append_column("Node", _records.name); - - _sc_tree.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - _sc_tree.add(_tv_inspect); - - _vbox.pack_start(_cb_busnames, Gtk::PACK_SHRINK); - _vbox.pack_start(_sc_tree); - - add(_vbox); - - show_all_children(); -} - -void DBusBrowser::NameOwnerChanged( - const ::DBus::String& name, const ::DBus::String& old_owner, const ::DBus::String& new_owner ) -{ - cout << name << ": " << old_owner << " -> " << new_owner << endl; -} - -void DBusBrowser::NameLost( const ::DBus::String& name ) -{ - cout << name << " lost" << endl; -} - -void DBusBrowser::NameAcquired( const ::DBus::String& name ) -{ - cout << name << " acquired" << endl; -} - -void DBusBrowser::on_select_busname() -{ - Glib::ustring busname = _cb_busnames.get_active_text(); - if(busname.empty()) return; - - _tm_inspect->clear(); - _inspect_append(NULL, "", busname); -} - -void DBusBrowser::_inspect_append( Gtk::TreeModel::Row* row, const std::string& buspath, const std::string& busname ) -{ - DBusInspector inspector(conn(), buspath.empty() ? "/" : buspath.c_str(), busname.c_str()); - - ::DBus::Xml::Document doc(inspector.Introspect()); - ::DBus::Xml::Node& root = *(doc.root); - - ::DBus::Xml::Nodes ifaces = root["interface"]; - - for(::DBus::Xml::Nodes::iterator ii = ifaces.begin(); ii != ifaces.end(); ++ii) - { - ::DBus::Xml::Node& iface = **ii; - - Gtk::TreeModel::Row i_row = row - ? *(_tm_inspect->append(row->children())) - : *(_tm_inspect->append()); - i_row[_records.name] = "interface: " + iface.get("name"); - - ::DBus::Xml::Nodes methods = iface["method"]; - - for(::DBus::Xml::Nodes::iterator im = methods.begin(); im != methods.end(); ++im) - { - Gtk::TreeModel::Row m_row = *(_tm_inspect->append(i_row.children())); - m_row[_records.name] = "method: " + (*im)->get("name"); - } - - ::DBus::Xml::Nodes signals = iface["signal"]; - - for(::DBus::Xml::Nodes::iterator is = signals.begin(); is != signals.end(); ++is) - { - Gtk::TreeModel::Row s_row = *(_tm_inspect->append(i_row.children())); - s_row[_records.name] = "signal: " + (*is)->get("name"); - } - } - - ::DBus::Xml::Nodes nodes = root["node"]; - - for(::DBus::Xml::Nodes::iterator in = nodes.begin(); in != nodes.end(); ++in) - { - std::string name = (*in)->get("name"); - - Gtk::TreeModel::Row n_row = row - ? *(_tm_inspect->append(row->children())) - : *(_tm_inspect->append()); - n_row[_records.name] = name; - - _inspect_append(&n_row, buspath + "/" + name, busname); - } -} - -DBus::Glib::BusDispatcher dispatcher; - -int main(int argc, char* argv[]) -{ - Gtk::Main kit(argc, argv); - - DBus::default_dispatcher = &dispatcher; - - dispatcher.attach(NULL); - - DBus::Connection conn = DBus::Connection::SessionBus(); - - DBusBrowser browser(conn); - - Gtk::Main::run(browser); - - return 0; -} diff --git a/libs/dbus/examples/glib/dbus-browser.h b/libs/dbus/examples/glib/dbus-browser.h deleted file mode 100644 index 10c9b3d128cf7680f6a1235603c6c63005cb1891..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/glib/dbus-browser.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef __DEMO_DBUS_BROWSER_H -#define __DEMO_DBUS_BROWSER_H - -#include <dbus-c++/dbus.h> -#include <dbus-c++/glib-integration.h> -#include <gtkmm.h> - -#include "dbus-glue.h" - -class DBusInspector -: public DBus::IntrospectableProxy, - public DBus::ObjectProxy -{ -public: - - DBusInspector( DBus::Connection& conn, const char* path, const char* service ) - : DBus::ObjectProxy(conn, path, service) - {} -}; - -class DBusBrowser -: public org::freedesktop::DBus, - public DBus::IntrospectableProxy, - public DBus::ObjectProxy, - public Gtk::Window -{ -public: - - DBusBrowser( ::DBus::Connection& ); - -private: - - void NameOwnerChanged( const ::DBus::String&, const ::DBus::String&, const ::DBus::String& ); - - void NameLost( const ::DBus::String& ); - - void NameAcquired( const ::DBus::String& ); - - void on_select_busname(); - - void _inspect_append( Gtk::TreeModel::Row*, const std::string&, const std::string& ); - -private: - - class InspectRecord : public Gtk::TreeModel::ColumnRecord - { - public: - - InspectRecord() { add(name); } - - Gtk::TreeModelColumn<Glib::ustring> name; - }; - - Gtk::VBox _vbox; - Gtk::ScrolledWindow _sc_tree; - Gtk::ComboBoxText _cb_busnames; - Gtk::TreeView _tv_inspect; - Glib::RefPtr<Gtk::TreeStore> _tm_inspect; - InspectRecord _records; -}; - -#endif//__DEMO_DBUS_BROWSER_H diff --git a/libs/dbus/examples/hal/Makefile.am b/libs/dbus/examples/hal/Makefile.am deleted file mode 100644 index ed3d5c504bb031f0df3f0fbfb5ff9d3f2bd931c1..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/hal/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_PROGRAMS = hal-listen - -hal_listen_SOURCES = hal-listen.h hal-listen.cpp -hal_listen_LDADD = $(top_builddir)/src/libdbus-c++-1.la - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/examples/hal/hal-listen.cpp b/libs/dbus/examples/hal/hal-listen.cpp deleted file mode 100644 index d36eb2ab843fc1d9605e03b0f1e60823df581ced..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/hal/hal-listen.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include "hal-listen.h" - -#include <signal.h> -#include <iostream> - -HalManagerProxy::HalManagerProxy( DBus::Connection& connection ) -: DBus::InterfaceProxy("org.freedesktop.Hal.Manager"), - DBus::ObjectProxy(connection, "/org/freedesktop/Hal/Manager", "org.freedesktop.Hal") -{ - connect_signal(HalManagerProxy, DeviceAdded, DeviceAddedCb); - connect_signal(HalManagerProxy, DeviceRemoved, DeviceRemovedCb); - - std::vector< DBus::String > devices = GetAllDevices(); - - std::vector< DBus::String >::iterator it; - for(it = devices.begin(); it != devices.end(); ++it) - { - DBus::Path udi = *it; - - std::cout << "found device " << udi << std::endl; - - _devices[udi] = new HalDeviceProxy(connection, udi); - } -} - -std::vector< DBus::String > HalManagerProxy::GetAllDevices() -{ - std::vector< DBus::String > udis; - DBus::CallMessage call; - - call.member("GetAllDevices"); - - DBus::Message reply = invoke_method(call); - DBus::MessageIter it = reply.reader(); - - it >> udis; - return udis; -} - -void HalManagerProxy::DeviceAddedCb( const DBus::SignalMessage& sig ) -{ - DBus::MessageIter it = sig.reader(); - DBus::String devname; - - it >> devname; - - DBus::Path udi(devname); - - _devices[devname] = new HalDeviceProxy(conn(), udi); - std::cout << "added device " << udi << std::endl; -} - -void HalManagerProxy::DeviceRemovedCb( const DBus::SignalMessage& sig ) -{ - DBus::MessageIter it = sig.reader(); - DBus::String devname; - - it >> devname; - - std::cout << "removed device " << devname << std::endl; - - _devices.erase(devname); -} - -HalDeviceProxy::HalDeviceProxy( DBus::Connection& connection, DBus::Path& udi ) -: DBus::InterfaceProxy("org.freedesktop.Hal.Device"), - DBus::ObjectProxy(connection, udi, "org.freedesktop.Hal") -{ - connect_signal(HalDeviceProxy, PropertyModified, PropertyModifiedCb); - connect_signal(HalDeviceProxy, Condition, ConditionCb); -} - -void HalDeviceProxy::PropertyModifiedCb( const DBus::SignalMessage& sig ) -{ - typedef DBus::Struct< DBus::String, DBus::Bool, DBus::Bool > HalProperty; - - DBus::MessageIter it = sig.reader(); - DBus::Int32 number; - - it >> number; - - DBus::MessageIter arr = it.recurse(); - - for(int i = 0; i < number; ++i, ++arr) - { - HalProperty hp; - - arr >> hp; - - std::cout << "modified property " << hp._1 << " in " << path() << std::endl; - } -} - -void HalDeviceProxy::ConditionCb( const DBus::SignalMessage& sig ) -{ - DBus::MessageIter it = sig.reader(); - DBus::String condition; - - it >> condition; - - std::cout << "encountered condition " << condition << " in " << path() << std::endl; -} - -DBus::BusDispatcher dispatcher; - -void niam( int sig ) -{ - dispatcher.leave(); -} - -int main() -{ - signal(SIGTERM, niam); - signal(SIGINT, niam); - - DBus::default_dispatcher = &dispatcher; - - DBus::Connection conn = DBus::Connection::SystemBus(); - - HalManagerProxy hal(conn); - - dispatcher.enter(); - - return 0; -} diff --git a/libs/dbus/examples/hal/hal-listen.h b/libs/dbus/examples/hal/hal-listen.h deleted file mode 100644 index 8401fbfad48e9838d50249a58acc9f61d3e9e6aa..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/hal/hal-listen.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __DEMO_HAL_LISTEN_H -#define __DEMO_HAL_LISTEN_H - -#include <dbus-c++/dbus.h> -#include <vector> -#include <map> - -class HalDeviceProxy; - -class HalManagerProxy -: public DBus::InterfaceProxy, - public DBus::ObjectProxy -{ -public: - - HalManagerProxy( DBus::Connection& connection ); - - std::vector< DBus::String > GetAllDevices(); - -private: - - void DeviceAddedCb( const DBus::SignalMessage& sig ); - - void DeviceRemovedCb( const DBus::SignalMessage& sig ); - - std::map< DBus::String, DBus::RefPtr< HalDeviceProxy > > _devices; -}; - -class HalDeviceProxy -: public DBus::InterfaceProxy, - public DBus::ObjectProxy -{ -public: - - HalDeviceProxy( DBus::Connection& connection, DBus::Path& udi ); - -private: - - void PropertyModifiedCb( const DBus::SignalMessage& sig ); - - void ConditionCb( const DBus::SignalMessage& sig ); -}; - -#endif//__DEMO_HAL_LISTEN_H diff --git a/libs/dbus/examples/properties/Makefile.am b/libs/dbus/examples/properties/Makefile.am deleted file mode 100644 index c0c9565b28b746655433eb2fa76b44ca7ba095af..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/properties/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -EXTRA_DIST = README props-introspect.xml - -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_PROGRAMS = props-server - -props_server_SOURCES = props-glue.h props-server.h props-server.cpp -props_server_LDADD = $(top_builddir)/src/libdbus-c++-1.la - -props-glue.h: props-introspect.xml - $(top_builddir)/tools/dbusxx-xml2cpp $^ --adaptor=$@ - -BUILT_SOURCES = props-glue.h -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/examples/properties/README b/libs/dbus/examples/properties/README deleted file mode 100644 index 2e7f3d7b049b9c5e84bcd1f08fe82ccafffdecfa..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/properties/README +++ /dev/null @@ -1,18 +0,0 @@ -This very simple example shows how to export properties (from objects implementing the org.freedesktop.DBus.Properties interface) - -To test, run `DBUSXX_VERBOSE=1 ./props-server` and try the following commands: - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Version" - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Version" int32:2 - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:string:"Hello D-Bus" - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:int32:200 - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Message" - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Something" - -dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" int32:100 - diff --git a/libs/dbus/examples/properties/props-introspect.xml b/libs/dbus/examples/properties/props-introspect.xml deleted file mode 100644 index 1ce7e72892136043d1b2ca6e03df1f096a337d05..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/properties/props-introspect.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" ?> -<node name="/org/freedesktop/DBus/Examples/Properties"> - <interface name="org.freedesktop.DBus.PropsDemo"> - <property name="Version" type="i" access="read"/> - <property name="Message" type="s" access="readwrite"/> - <signal name="MessageChanged"> - <arg name="message" type="s"/> - </signal> - </interface> -</node> diff --git a/libs/dbus/examples/properties/props-server.cpp b/libs/dbus/examples/properties/props-server.cpp deleted file mode 100644 index 6a4495f7de934c1af0e25efb47136b791cd48c90..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/properties/props-server.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "props-server.h" -#include <signal.h> - -static const char* PROPS_SERVER_NAME = "org.freedesktop.DBus.Examples.Properties"; -static const char* PROPS_SERVER_PATH = "/org/freedesktop/DBus/Examples/Properties"; - -PropsServer::PropsServer( DBus::Connection& connection ) -: DBus::ObjectAdaptor(connection, PROPS_SERVER_PATH) -{ - Version = 1; - Message = "default message"; -} - -void PropsServer::on_set_property - ( DBus::InterfaceAdaptor& interface, const DBus::String& property, const DBus::Variant& value ) -{ - if(property == "Message") - { - DBus::String msg = value; - this->MessageChanged(msg); - } -} - -DBus::BusDispatcher dispatcher; - -void niam( int sig ) -{ - dispatcher.leave(); -} - -int main() -{ - signal(SIGTERM, niam); - signal(SIGINT, niam); - - DBus::default_dispatcher = &dispatcher; - - DBus::Connection conn = DBus::Connection::SessionBus(); - conn.request_name(PROPS_SERVER_NAME); - - PropsServer server(conn); - - dispatcher.enter(); - - return 0; -} diff --git a/libs/dbus/examples/properties/props-server.h b/libs/dbus/examples/properties/props-server.h deleted file mode 100644 index 93d13eeddad32bae5fbe4dbea498ff8bf3e58838..0000000000000000000000000000000000000000 --- a/libs/dbus/examples/properties/props-server.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __DEMO_PROPS_SERVER_H -#define __DEMO_PROPS_SERVER_H - -#include <dbus-c++/dbus.h> -#include "props-glue.h" - -class PropsServer -: public org::freedesktop::DBus::PropsDemo, - public DBus::IntrospectableAdaptor, - public DBus::PropertiesAdaptor, - public DBus::ObjectAdaptor -{ -public: - - PropsServer( DBus::Connection& connection ); - - void on_set_property - ( DBus::InterfaceAdaptor& interface, const DBus::String& property, const DBus::Variant& value ); -}; - -#endif//__DEMO_PROPS_SERVER_H diff --git a/libs/dbus/include/dbus-c++/api.h b/libs/dbus/include/dbus-c++/api.h deleted file mode 100644 index c87495664194b78a5b6d69c90c7c81e8197bd820..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/api.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_API_H -#define __DBUSXX_API_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef GCC_HASCLASSVISIBILITY -# define DXXAPILOCAL __attribute__ ((visibility("hidden"))) -# define DXXAPIPUBLIC __attribute__ ((visibility("default"))) -#else -# define DXXAPILOCAL -# define DXXAPIPUBLIC -#endif - -#define DXXAPI DXXAPIPUBLIC - -#endif//__DBUSXX_API_H diff --git a/libs/dbus/include/dbus-c++/config.h.in b/libs/dbus/include/dbus-c++/config.h.in deleted file mode 100644 index f803e5dde35090e8ba837143213fc255bea902d4..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/config.h.in +++ /dev/null @@ -1,73 +0,0 @@ -/* include/dbus-c++/config.h.in. Generated from configure.ac by autoheader. */ - -/* unstable DBus */ -#undef DBUS_API_SUBJECT_TO_CHANGE - -/* DBus supports recursive mutexes (needs DBus >= 0.95) */ -#undef DBUS_HAS_RECURSIVE_MUTEX - -/* dbus_threads_init_default (needs DBus >= 0.93) */ -#undef DBUS_HAS_THREADS_INIT_DEFAULT - -/* to enable hidden symbols */ -#undef GCC_HASCLASSVISIBILITY - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the <expat.h> header file. */ -#undef HAVE_EXPAT_H - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the <pthread.h> header file. */ -#undef HAVE_PTHREAD_H - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/libs/dbus/include/dbus-c++/connection.h b/libs/dbus/include/dbus-c++/connection.h deleted file mode 100644 index 5a5272272d9fb589bff1f9c0cece9d1e7c52fc3b..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/connection.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_CONNECTION_H -#define __DBUSXX_CONNECTION_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <list> - -#include "api.h" -#include "types.h" -#include "util.h" -#include "message.h" -#include "pendingcall.h" - -namespace DBus { - -class Connection; - -typedef Slot<bool, const Message&> MessageSlot; - -typedef std::list<Connection> ConnectionList; - -class ObjectAdaptor; -class Dispatcher; - -class DXXAPI Connection -{ -public: - - static Connection SystemBus(); - - static Connection SessionBus(); - - static Connection ActivationBus(); - - struct Private; - - typedef std::list<Private*> PrivatePList; - - Connection( Private* ); - - Connection( const char* address, bool priv = true ); - - Connection( const Connection& c ); - - virtual ~Connection(); - - Dispatcher* setup( Dispatcher* ); - - bool operator == ( const Connection& ) const; - - void add_match( const char* rule ); - - void remove_match( const char* rule ); - - bool add_filter( MessageSlot& ); - - void remove_filter( MessageSlot& ); - - bool unique_name( const char* n ); - - const char* unique_name() const; - - bool register_bus(); - - bool connected() const; - - void disconnect(); - - void exit_on_disconnect( bool exit ); - - void flush(); - - bool send( const Message&, unsigned int* serial = NULL ); - - Message send_blocking( Message& msg, int timeout ); - - PendingCall send_async( Message& msg, int timeout ); - - void request_name( const char* name, int flags = 0 ); - - bool has_name( const char* name ); - - bool start_service( const char* name, unsigned long flags ); - - const std::vector<std::string>& names(); - -private: - - DXXAPILOCAL void init(); - -private: - - RefPtrI<Private> _pvt; - -friend class ObjectAdaptor; // needed in order to register object paths for a connection -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_CONNECTION_H diff --git a/libs/dbus/include/dbus-c++/dbus.h b/libs/dbus/include/dbus-c++/dbus.h deleted file mode 100644 index 45de4c307be0b8d9ce93560edafdcf944c1ccbb3..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/dbus.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_DBUS_H -#define __DBUSXX_DBUS_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "types.h" -#include "interface.h" -#include "object.h" -#include "property.h" -#include "connection.h" -#include "server.h" -#include "error.h" -#include "message.h" -#include "debug.h" -#include "pendingcall.h" -#include "server.h" -#include "util.h" -#include "dispatcher.h" -#include "eventloop.h" -#include "eventloop-integration.h" -#include "introspection.h" - -#endif//__DBUSXX_DBUS_H diff --git a/libs/dbus/include/dbus-c++/debug.h b/libs/dbus/include/dbus-c++/debug.h deleted file mode 100644 index 457ea5ad473c8a240f316b0b7ab13787516512e2..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/debug.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_DEBUG_H -#define __DBUSXX_DEBUG_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" - -namespace DBus { - -typedef void (*LogFunction)(const char* format, ...); - -extern DXXAPI LogFunction debug_log; - -} /* namespace DBus */ - -#endif diff --git a/libs/dbus/include/dbus-c++/dispatcher.h b/libs/dbus/include/dbus-c++/dispatcher.h deleted file mode 100644 index 329c234052058368125a5edd2298c9f66d75844a..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/dispatcher.h +++ /dev/null @@ -1,260 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_DISPATCHER_H -#define __DBUSXX_DISPATCHER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "connection.h" -#include "eventloop.h" - -namespace DBus { - -class DXXAPI Timeout -{ -public: - - class Internal; - - Timeout( Internal* i ); - - virtual ~Timeout(){} - - int interval() const; - - bool enabled() const; - - bool handle(); - - virtual void toggle() = 0; - -private: - - DXXAPILOCAL Timeout( const Timeout& ); - -private: - - Internal* _int; -}; - -class DXXAPI Watch -{ -public: - - class Internal; - - Watch( Internal* i ); - - virtual ~Watch(){} - - int descriptor() const; - - int flags() const; - - bool enabled() const; - - bool handle( int flags ); - - virtual void toggle() = 0; - -private: - - DXXAPILOCAL Watch( const Watch& ); - -private: - - Internal* _int; -}; - -class DXXAPI Dispatcher -{ -public: - - virtual ~Dispatcher() - {} - - void queue_connection( Connection::Private* ); - - void dispatch_pending(); - - virtual void enter() = 0; - - virtual void leave() = 0; - - virtual Timeout* add_timeout( Timeout::Internal* ) = 0; - - virtual void rem_timeout( Timeout* ) = 0; - - virtual Watch* add_watch( Watch::Internal* ) = 0; - - virtual void rem_watch( Watch* ) = 0; - - struct Private; - -private: - - DefaultMutex _mutex_p; - Connection::PrivatePList _pending_queue; -}; - -extern DXXAPI Dispatcher* default_dispatcher; - -/* classes for multithreading support -*/ - -class DXXAPI Mutex -{ -public: - - virtual ~Mutex() {} - - virtual void lock() = 0; - - virtual void unlock() = 0; - - struct Internal; - -protected: - - Internal* _int; -}; - -class DXXAPI CondVar -{ -public: - - virtual ~CondVar() {} - - virtual void wait( Mutex* ) = 0; - - virtual bool wait_timeout( Mutex*, int timeout ) = 0; - - virtual void wake_one() = 0; - - virtual void wake_all() = 0; - - struct Internal; - -protected: - - Internal* _int; -}; - -#ifndef DBUS_HAS_RECURSIVE_MUTEX -typedef Mutex* (*MutexNewFn)(); -typedef bool (*MutexFreeFn)( Mutex* mx ); -typedef bool (*MutexLockFn)( Mutex* mx ); -typedef void (*MutexUnlockFn)( Mutex* mx ); -#else -typedef Mutex* (*MutexNewFn)(); -typedef void (*MutexFreeFn)( Mutex* mx ); -typedef void (*MutexLockFn)( Mutex* mx ); -typedef void (*MutexUnlockFn)( Mutex* mx ); -#endif//DBUS_HAS_RECURSIVE_MUTEX - -typedef CondVar* (*CondVarNewFn)(); -typedef void (*CondVarFreeFn)( CondVar* cv ); -typedef void (*CondVarWaitFn)( CondVar* cv, Mutex* mx ); -typedef bool (*CondVarWaitTimeoutFn)( CondVar* cv, Mutex* mx, int timeout ); -typedef void (*CondVarWakeOneFn)( CondVar* cv ); -typedef void (*CondVarWakeAllFn)( CondVar* cv ); - -#ifdef DBUS_HAS_THREADS_INIT_DEFAULT -void DXXAPI _init_threading(); -#endif//DBUS_HAS_THREADS_INIT_DEFAULT - -void DXXAPI _init_threading( - MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn, - CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn -); - -template<class Mx, class Cv> -struct Threading -{ - static void init() - { - _init_threading( - mutex_new, mutex_free, mutex_lock, mutex_unlock, - condvar_new, condvar_free, condvar_wait, condvar_wait_timeout, condvar_wake_one, condvar_wake_all - ); - } - - static Mutex* mutex_new() - { - return new Mx; - } - - static void mutex_free( Mutex* mx ) - { - delete mx; - } - - static void mutex_lock( Mutex* mx ) - { - mx->lock(); - } - - static void mutex_unlock( Mutex* mx ) - { - mx->unlock(); - } - - static CondVar* condvar_new() - { - return new Cv; - } - - static void condvar_free( CondVar* cv ) - { - delete cv; - } - - static void condvar_wait( CondVar* cv, Mutex* mx ) - { - cv->wait(mx); - } - - static bool condvar_wait_timeout( CondVar* cv, Mutex* mx, int timeout ) - { - return cv->wait_timeout(mx, timeout); - } - - static void condvar_wake_one( CondVar* cv ) - { - cv->wake_one(); - } - - static void condvar_wake_all( CondVar* cv ) - { - cv->wake_all(); - } -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_DISPATCHER_H diff --git a/libs/dbus/include/dbus-c++/error.h b/libs/dbus/include/dbus-c++/error.h deleted file mode 100644 index d30d7c21387dda9cf9dabe846a26fff9ebea5f46..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/error.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_ERROR_H -#define __DBUSXX_ERROR_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "util.h" - -#include <exception> - -namespace DBus { - -class Message; -class InternalError; - -class DXXAPI Error : public std::exception -{ -public: - - Error(); - - Error( InternalError& ); - - Error( const char* name, const char* message ); - - Error( Message& ); - - ~Error() throw(); - - const char* what() const throw(); - - const char* name() const; - - const char* message() const; - - void set( const char* name, const char* message ); - // parameters MUST be static strings - - bool is_set() const; - - operator bool() const - { - return is_set(); - } - -private: - - RefPtrI<InternalError> _int; -}; - -struct DXXAPI ErrorFailed : public Error -{ - ErrorFailed( const char* message ) - : Error("org.freedesktop.DBus.Error.Failed", message) - {} -}; - -struct DXXAPI ErrorNoMemory : public Error -{ - ErrorNoMemory( const char* message ) - : Error("org.freedesktop.DBus.Error.NoMemory", message) - {} -}; - -struct DXXAPI ErrorServiceUnknown : public Error -{ - ErrorServiceUnknown( const char* message ) - : Error("org.freedesktop.DBus.Error.ServiceUnknown", message) - {} -}; - -struct DXXAPI ErrorNameHasNoOwner : public Error -{ - ErrorNameHasNoOwner( const char* message ) - : Error("org.freedesktop.DBus.Error.NameHasNoOwner", message) - {} -}; - -struct DXXAPI ErrorNoReply : public Error -{ - ErrorNoReply( const char* message ) - : Error("org.freedesktop.DBus.Error.NoReply", message) - {} -}; - -struct DXXAPI ErrorIOError : public Error -{ - ErrorIOError( const char* message ) - : Error("org.freedesktop.DBus.Error.IOError", message) - {} -}; - -struct DXXAPI ErrorBadAddress : public Error -{ - ErrorBadAddress( const char* message ) - : Error("org.freedesktop.DBus.Error.BadAddress", message) - {} -}; - -struct DXXAPI ErrorNotSupported : public Error -{ - ErrorNotSupported( const char* message ) - : Error("org.freedesktop.DBus.Error.NotSupported", message) - {} -}; - -struct DXXAPI ErrorLimitsExceeded : public Error -{ - ErrorLimitsExceeded( const char* message ) - : Error("org.freedesktop.DBus.Error.LimitsExceeded", message) - {} -}; - -struct DXXAPI ErrorAccessDenied : public Error -{ - ErrorAccessDenied( const char* message ) - : Error("org.freedesktop.DBus.Error.AccessDenied", message) - {} -}; - -struct DXXAPI ErrorAuthFailed : public Error -{ - ErrorAuthFailed( const char* message ) - : Error("org.freedesktop.DBus.Error.AuthFailed", message) - {} -}; - -struct DXXAPI ErrorNoServer : public Error -{ - ErrorNoServer( const char* message ) - : Error("org.freedesktop.DBus.Error.NoServer", message) - {} -}; - -struct DXXAPI ErrorTimeout : public Error -{ - ErrorTimeout( const char* message ) - : Error("org.freedesktop.DBus.Error.Timeout", message) - {} -}; - -struct DXXAPI ErrorNoNetwork : public Error -{ - ErrorNoNetwork( const char* message ) - : Error("org.freedesktop.DBus.Error.NoNetwork", message) - {} -}; - -struct DXXAPI ErrorAddressInUse : public Error -{ - ErrorAddressInUse( const char* message ) - : Error("org.freedesktop.DBus.Error.AddressInUse", message) - {} -}; - -struct DXXAPI ErrorDisconnected : public Error -{ - ErrorDisconnected( const char* message ) - : Error("org.freedesktop.DBus.Error.Disconnected", message) - {} -}; - -struct DXXAPI ErrorInvalidArgs : public Error -{ - ErrorInvalidArgs( const char* message ) - : Error("org.freedesktop.DBus.Error.InvalidArgs", message) - {} -}; - -struct DXXAPI ErrorFileNotFound : public Error -{ - ErrorFileNotFound( const char* message ) - : Error("org.freedesktop.DBus.Error.FileNotFound", message) - {} -}; - -struct DXXAPI ErrorUnknownMethod : public Error -{ - ErrorUnknownMethod( const char* message ) - : Error("org.freedesktop.DBus.Error.UnknownMethod", message) - {} -}; - -struct DXXAPI ErrorTimedOut : public Error -{ - ErrorTimedOut( const char* message ) - : Error("org.freedesktop.DBus.Error.TimedOut", message) - {} -}; - -struct DXXAPI ErrorMatchRuleNotFound : public Error -{ - ErrorMatchRuleNotFound( const char* message ) - : Error("org.freedesktop.DBus.Error.MatchRuleNotFound", message) - {} -}; - -struct DXXAPI ErrorMatchRuleInvalid : public Error -{ - ErrorMatchRuleInvalid( const char* message ) - : Error("org.freedesktop.DBus.Error.MatchRuleInvalid", message) - {} -}; - -struct DXXAPI ErrorSpawnExecFailed : public Error -{ - ErrorSpawnExecFailed( const char* message ) - : Error("org.freedesktop.DBus.Error.Spawn.ExecFailed", message) - {} -}; - -struct DXXAPI ErrorSpawnForkFailed : public Error -{ - ErrorSpawnForkFailed( const char* message ) - : Error("org.freedesktop.DBus.Error.Spawn.ForkFailed", message) - {} -}; - -struct DXXAPI ErrorSpawnChildExited : public Error -{ - ErrorSpawnChildExited( const char* message ) - : Error("org.freedesktop.DBus.Error.Spawn.ChildExited", message) - {} -}; - -struct DXXAPI ErrorSpawnChildSignaled : public Error -{ - ErrorSpawnChildSignaled( const char* message ) - : Error("org.freedesktop.DBus.Error.Spawn.ChildSignaled", message) - {} -}; - -struct DXXAPI ErrorSpawnFailed : public Error -{ - ErrorSpawnFailed( const char* message ) - : Error("org.freedesktop.DBus.Error.Spawn.Failed", message) - {} -}; - -struct DXXAPI ErrorInvalidSignature : public Error -{ - ErrorInvalidSignature( const char* message ) - : Error("org.freedesktop.DBus.Error.InvalidSignature", message) - {} -}; - -struct DXXAPI ErrorUnixProcessIdUnknown : public Error -{ - ErrorUnixProcessIdUnknown( const char* message ) - : Error("org.freedesktop.DBus.Error.UnixProcessIdUnknown", message) - {} -}; - -struct DXXAPI ErrorSELinuxSecurityContextUnknown : public Error -{ - ErrorSELinuxSecurityContextUnknown( const char* message ) - : Error("org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", message) - {} -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_ERROR_H diff --git a/libs/dbus/include/dbus-c++/eventloop-integration.h b/libs/dbus/include/dbus-c++/eventloop-integration.h deleted file mode 100644 index 1f5ae5ead5bd3be2f8efd43d9aad03ce5ad70adf..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/eventloop-integration.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_EVENTLOOP_INTEGRATION_H -#define __DBUSXX_EVENTLOOP_INTEGRATION_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "dispatcher.h" -#include "util.h" -#include "eventloop.h" - -namespace DBus { - -/* - * Glue between the event loop and the DBus library - */ - -class BusDispatcher; - -class DXXAPI BusTimeout : public Timeout, public DefaultTimeout -{ - BusTimeout( Timeout::Internal*, BusDispatcher* ); - - void toggle(); - -friend class BusDispatcher; -}; - -class DXXAPI BusWatch : public Watch, public DefaultWatch -{ - BusWatch( Watch::Internal*, BusDispatcher* ); - - void toggle(); - -friend class BusDispatcher; -}; - -class DXXAPI BusDispatcher : public Dispatcher, public DefaultMainLoop -{ -public: - - BusDispatcher() : _running(false) - {} - - ~BusDispatcher() - {} - - virtual void enter(); - - virtual void leave(); - - virtual void do_iteration(); - - virtual Timeout* add_timeout( Timeout::Internal* ); - - virtual void rem_timeout( Timeout* ); - - virtual Watch* add_watch( Watch::Internal* ); - - virtual void rem_watch( Watch* ); - - void watch_ready( DefaultWatch& ); - - void timeout_expired( DefaultTimeout& ); - -private: - - bool _running; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_EVENTLOOP_INTEGRATION_H diff --git a/libs/dbus/include/dbus-c++/eventloop.h b/libs/dbus/include/dbus-c++/eventloop.h deleted file mode 100644 index fcf116400c0e3d5316532375234aaa6511cfa25d..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/eventloop.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_EVENTLOOP_H -#define __DBUSXX_EVENTLOOP_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_PTHREAD -#include <pthread.h> -#endif - -#include <list> - -#include "api.h" -#include "util.h" - -namespace DBus { - -/* - * these Default* classes implement a very simple event loop which - * is used here as the default main loop, if you want to hook - * a different one use the Bus* classes in eventloop-integration.h - * or the Glib::Bus* classes as a reference - */ - -class DefaultMainLoop; - -class DXXAPI DefaultTimeout -{ -public: - - DefaultTimeout( int interval, bool repeat, DefaultMainLoop* ); - - virtual ~DefaultTimeout(); - - bool enabled(){ return _enabled; } - void enabled(bool e){ _enabled = e; } - - int interval(){ return _interval; } - void interval(int i){ _interval = i; } - - bool repeat(){ return _repeat; } - void repeat(bool r){ _repeat = r; } - - void* data(){ return _data; } - void data(void* d){ _data = d; } - - Slot<void, DefaultTimeout&> expired; - -private: - - bool _enabled; - - int _interval; - bool _repeat; - - double _expiration; - - void* _data; - - DefaultMainLoop* _disp; - -friend class DefaultMainLoop; -}; - -typedef std::list< DefaultTimeout* > DefaultTimeouts; - -class DXXAPI DefaultWatch -{ -public: - - DefaultWatch( int fd, int flags, DefaultMainLoop* ); - - virtual ~DefaultWatch(); - - bool enabled(){ return _enabled; } - void enabled(bool e){ _enabled = e; } - - int descriptor(){ return _fd; } - - int flags(){ return _flags; } - void flags( int f ){ _flags = f; } - - int state(){ return _state; } - - void* data(){ return _data; } - void data(void* d){ _data = d; } - - Slot<void, DefaultWatch&> ready; - -private: - - bool _enabled; - - int _fd; - int _flags; - int _state; - - void* _data; - - DefaultMainLoop* _disp; - -friend class DefaultMainLoop; -}; - -typedef std::list< DefaultWatch* > DefaultWatches; - -class DXXAPI DefaultMutex -{ -public: - - DefaultMutex(); - - ~DefaultMutex(); - - void lock(); - - void unlock(); - -private: - -#if defined HAVE_PTHREAD - - pthread_mutex _mutex; - -#elif defined HAVE_WIN32 - -//TODO: use a critical section - -#endif -}; - -class DXXAPI DefaultMainLoop -{ -public: - - DefaultMainLoop(); - - virtual ~DefaultMainLoop(); - - virtual void dispatch(); - -private: - - DefaultMutex _mutex_t; - DefaultTimeouts _timeouts; - - DefaultMutex _mutex_w; - DefaultWatches _watches; - -friend class DefaultTimeout; -friend class DefaultWatch; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_EVENTLOOP_H diff --git a/libs/dbus/include/dbus-c++/glib-integration.h b/libs/dbus/include/dbus-c++/glib-integration.h deleted file mode 100644 index 723c7d8d02061085ef71fe086b63473f84f2a0df..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/glib-integration.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_GLIB_INTEGRATION_H -#define __DBUSXX_GLIB_INTEGRATION_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <glib.h> - -#include "api.h" -#include "eventloop.h" - -namespace DBus { - -namespace Glib { - -class BusDispatcher; - -class DXXAPI BusTimeout : public Timeout -{ -private: - - BusTimeout( Timeout::Internal*, GMainContext* ); - - ~BusTimeout(); - - void toggle(); - - static gboolean timeout_handler( gpointer ); - - void _enable(); - - void _disable(); - -private: - - GSource* _source; - GMainContext* _ctx; - -friend class BusDispatcher; -}; - -class DXXAPI BusWatch : public Watch -{ -private: - - BusWatch( Watch::Internal*, GMainContext* ); - - ~BusWatch(); - - void toggle(); - - static gboolean watch_handler( gpointer ); - - void _enable(); - - void _disable(); - -private: - - GSource* _source; - GMainContext* _ctx; - -friend class BusDispatcher; -}; - -class DXXAPI BusDispatcher : public Dispatcher -{ -public: - BusDispatcher() : _ctx(NULL) {} - - void attach( GMainContext* ); - - void enter() {} - - void leave() {} - - Timeout* add_timeout( Timeout::Internal* ); - - void rem_timeout( Timeout* ); - - Watch* add_watch( Watch::Internal* ); - - void rem_watch( Watch* ); - -private: - - GMainContext* _ctx; -}; - -} /* namespace Glib */ - -} /* namespace DBus */ - -#endif//__DBUSXX_GLIB_INTEGRATION_H diff --git a/libs/dbus/include/dbus-c++/interface.h b/libs/dbus/include/dbus-c++/interface.h deleted file mode 100644 index a59785aefff3953ad3f06c32c140ec99b2e5eafe..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/interface.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_INTERFACE_H -#define __DBUSXX_INTERFACE_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string> -#include <map> -#include "api.h" -#include "util.h" -#include "types.h" - -#include "message.h" - -namespace DBus { - -//todo: this should belong to to properties.h -struct DXXAPI PropertyData -{ - bool read; - bool write; - std::string sig; - Variant value; -}; - -typedef std::map<std::string, PropertyData> PropertyTable; - -class IntrospectedInterface; - -class ObjectAdaptor; -class InterfaceAdaptor; -class SignalMessage; - -typedef std::map<std::string, InterfaceAdaptor*> InterfaceAdaptorTable; - -class DXXAPI AdaptorBase -{ -public: - - virtual const ObjectAdaptor* object() const = 0 ; - -protected: - - InterfaceAdaptor* find_interface( const std::string& name ); - - virtual ~AdaptorBase() - {} - - virtual void _emit_signal( SignalMessage& ) = 0; - - InterfaceAdaptorTable _interfaces; -}; - -/* -*/ - -class ObjectProxy; -class InterfaceProxy; -class CallMessage; - -typedef std::map<std::string, InterfaceProxy*> InterfaceProxyTable; - -class DXXAPI ProxyBase -{ -public: - - virtual const ObjectProxy* object() const = 0 ; - -protected: - - InterfaceProxy* find_interface( const std::string& name ); - - virtual ~ProxyBase() - {} - - virtual Message _invoke_method( CallMessage& ) = 0; - - InterfaceProxyTable _interfaces; -}; - -class DXXAPI Interface -{ -public: - - Interface( const std::string& name ); - - virtual ~Interface(); - - inline const std::string& name() const; - -private: - - std::string _name; -}; - -/* -*/ - -const std::string& Interface::name() const -{ - return _name; -} - -/* -*/ - -typedef std::map< std::string, Slot<Message, const CallMessage&> > MethodTable; - -class DXXAPI InterfaceAdaptor : public Interface, public virtual AdaptorBase -{ -public: - - InterfaceAdaptor( const std::string& name ); - - Message dispatch_method( const CallMessage& ); - - void emit_signal( const SignalMessage& ); - - Variant* get_property( const std::string& name ); - - void set_property( const std::string& name, Variant& value ); - - virtual IntrospectedInterface* const introspect() const - { - return NULL; - } - -protected: - - MethodTable _methods; - PropertyTable _properties; -}; - -/* -*/ - -typedef std::map< std::string, Slot<void, const SignalMessage&> > SignalTable; - -class DXXAPI InterfaceProxy : public Interface, public virtual ProxyBase -{ -public: - - InterfaceProxy( const std::string& name ); - - Message invoke_method( const CallMessage& ); - - bool dispatch_signal( const SignalMessage& ); - -protected: - - SignalTable _signals; -}; - -# define register_method(interface, method, callback) \ - InterfaceAdaptor::_methods[ #method ] = \ - new ::DBus::Callback< interface, ::DBus::Message, const ::DBus::CallMessage& >(this, & interface :: callback ); - -# define bind_property(variable, type, can_read, can_write) \ - InterfaceAdaptor::_properties[ #variable ].read = can_read; \ - InterfaceAdaptor::_properties[ #variable ].write = can_write; \ - InterfaceAdaptor::_properties[ #variable ].sig = type; \ - variable.bind( InterfaceAdaptor::_properties[ #variable ] ); - -# define connect_signal(interface, signal, callback) \ - InterfaceProxy::_signals[ #signal ] = \ - new ::DBus::Callback< interface, void, const ::DBus::SignalMessage& >(this, & interface :: callback ); - -} /* namespace DBus */ - -#endif//__DBUSXX_INTERFACE_H diff --git a/libs/dbus/include/dbus-c++/introspection.h b/libs/dbus/include/dbus-c++/introspection.h deleted file mode 100644 index 00a33b01547ec3ca933189881774555ac58af121..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/introspection.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_INTROSPECTION_H -#define __DBUSXX_INTROSPECTION_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "interface.h" - -namespace DBus { - -struct DXXAPI IntrospectedArgument -{ - const char* name; - const char* type; - const bool in; -}; - -struct DXXAPI IntrospectedMethod -{ - const char* name; - const IntrospectedArgument* args; -}; - -struct DXXAPI IntrospectedProperty -{ - const char* name; - const char* type; - const bool read; - const bool write; -}; - -struct DXXAPI IntrospectedInterface -{ - const char* name; - const IntrospectedMethod* methods; - const IntrospectedMethod* signals; - const IntrospectedProperty* properties; -}; - -class DXXAPI IntrospectableAdaptor : public InterfaceAdaptor -{ -public: - - IntrospectableAdaptor(); - - Message Introspect( const CallMessage& ); - -protected: - - IntrospectedInterface* const introspect() const; -}; - -class DXXAPI IntrospectableProxy : public InterfaceProxy -{ -public: - - IntrospectableProxy(); - - std::string Introspect(); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_INTROSPECTION_H diff --git a/libs/dbus/include/dbus-c++/message.h b/libs/dbus/include/dbus-c++/message.h deleted file mode 100644 index a287ab873d1a9c2baaa1128972786c5d1c85905a..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/message.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_MESSAGE_H -#define __DBUSXX_MESSAGE_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string> -#include <map> - -#include "api.h" -#include "util.h" - -namespace DBus { - -class Message; -class ErrorMessage; -class SignalMessage; -class ReturnMessage; -class Error; -class Connection; - -class DXXAPI MessageIter -{ -public: - - MessageIter() {} - - int type(); - - bool at_end(); - - bool has_next(); - - MessageIter& operator ++(); - - MessageIter operator ++(int); - - bool append_byte( unsigned char byte ); - - unsigned char get_byte(); - - bool append_bool( bool b ); - - bool get_bool(); - - bool append_int16( signed short i ); - - signed short get_int16(); - - bool append_uint16( unsigned short u ); - - unsigned short get_uint16(); - - bool append_int32( signed int i ); - - signed int get_int32(); - - bool append_uint32( unsigned int u ); - - unsigned int get_uint32(); - - bool append_int64( signed long long i ); - - signed long long get_int64(); - - bool append_uint64( unsigned long long i ); - - unsigned long long get_uint64(); - - bool append_double( double d ); - - double get_double(); - - bool append_string( const char* chars ); - - const char* get_string(); - - bool append_path( const char* chars ); - - const char* get_path(); - - bool append_signature( const char* chars ); - - const char* get_signature(); - - char* signature() const; //returned string must be manually free()'d - - MessageIter recurse(); - - bool append_array( char type, const void* ptr, size_t length ); - - int array_type(); - - int get_array( void* ptr ); - - bool is_array(); - - bool is_dict(); - - MessageIter new_array( const char* sig ); - - MessageIter new_variant( const char* sig ); - - MessageIter new_struct(); - - MessageIter new_dict_entry(); - - void close_container( MessageIter& container ); - - void copy_data( MessageIter& to ); - - Message& msg() const - { - return *_msg; - } - -private: - - DXXAPILOCAL MessageIter(Message& msg) : _msg(&msg) {} - - DXXAPILOCAL bool append_basic( int type_id, void* value ); - - DXXAPILOCAL void get_basic( int type_id, void* ptr ); - -private: - - /* I'm sorry, but don't want to include dbus.h in the public api - */ - unsigned char _iter[sizeof(void*)*3+sizeof(int)*11]; - - Message* _msg; - -friend class Message; -}; - -class DXXAPI Message -{ -public: - - struct Private; - - Message( Private*, bool incref = true ); - - Message( const Message& m ); - - ~Message(); - - Message& operator = ( const Message& m ); - - Message copy(); - - int type() const; - - int serial() const; - - int reply_serial() const; - - bool reply_serial( int ); - - const char* sender() const; - - bool sender( const char* s ); - - const char* destination() const; - - bool destination( const char* s ); - - bool is_error() const; - - bool is_signal( const char* interface, const char* member ) const; - - MessageIter reader() const; - - MessageIter writer(); - - bool append( int first_type, ... ); - - void terminate(); - -protected: - - Message(); - -protected: - - RefPtrI<Private> _pvt; - -/* classes who need to read `_pvt` directly -*/ -friend class ErrorMessage; -friend class ReturnMessage; -friend class MessageIter; -friend class Error; -friend class Connection; -}; - -/* -*/ - -class DXXAPI ErrorMessage : public Message -{ -public: - - ErrorMessage(); - - ErrorMessage( const Message&, const char* name, const char* message ); - - const char* name() const; - - bool name( const char* n ); - - bool operator == ( const ErrorMessage& ) const; -}; - -/* -*/ - -class DXXAPI SignalMessage : public Message -{ -public: - - SignalMessage( const char* name ); - - SignalMessage( const char* path, const char* interface, const char* name ); - - const char* interface() const; - - bool interface( const char* i ); - - const char* member() const; - - bool member( const char* m ); - - const char* path() const; - - char** path_split() const; - - bool path( const char* p ); - - bool operator == ( const SignalMessage& ) const; -}; - -/* -*/ - -class DXXAPI CallMessage : public Message -{ -public: - - CallMessage(); - - CallMessage( const char* dest, const char* path, const char* iface, const char* method ); - - const char* interface() const; - - bool interface( const char* i ); - - const char* member() const; - - bool member( const char* m ); - - const char* path() const; - - char** path_split() const; - - bool path( const char* p ); - - const char* signature() const; - - bool operator == ( const CallMessage& ) const; -}; - -/* -*/ - -class DXXAPI ReturnMessage : public Message -{ -public: - - ReturnMessage( const CallMessage& callee ); - - const char* signature() const; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_MESSAGE_H diff --git a/libs/dbus/include/dbus-c++/object.h b/libs/dbus/include/dbus-c++/object.h deleted file mode 100644 index 7c3240bb959695c41e156faf8de96adeab5c0728..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/object.h +++ /dev/null @@ -1,223 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_OBJECT_H -#define __DBUSXX_OBJECT_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string> -#include <list> - -#include "api.h" -#include "interface.h" -#include "connection.h" -#include "message.h" -#include "types.h" - -namespace DBus { - -class DXXAPI Object -{ -protected: - - Object( Connection& conn, const Path& path, const char* service ); - -public: - - virtual ~Object(); - - inline const DBus::Path& path() const; - - inline const std::string& service() const; - - inline Connection& conn(); - -private: - - DXXAPILOCAL virtual bool handle_message( const Message& ) = 0; - DXXAPILOCAL virtual void register_obj() = 0; - DXXAPILOCAL virtual void unregister_obj() = 0; - -private: - - Connection _conn; - DBus::Path _path; - std::string _service; -}; - -/* -*/ - -Connection& Object::conn() -{ - return _conn; -} - -const DBus::Path& Object::path() const -{ - return _path; -} - -const std::string& Object::service() const -{ - return _service; -} - -/* -*/ - -class DXXAPI Tag -{ -public: - - virtual ~Tag() - {} -}; - -/* -*/ - -class ObjectAdaptor; - -typedef std::list<ObjectAdaptor*> ObjectAdaptorPList; - -class DXXAPI ObjectAdaptor : public Object, public virtual AdaptorBase -{ -public: - - static ObjectAdaptor* from_path( const Path& path ); - - static ObjectAdaptorPList from_path_prefix( const std::string& prefix ); - - struct Private; - - ObjectAdaptor( Connection& conn, const Path& path ); - - ~ObjectAdaptor(); - - inline const ObjectAdaptor* object() const; - -protected: - - class DXXAPI Continuation - { - public: - - inline MessageIter& writer(); - - inline Tag* tag(); - - private: - - Continuation( Connection& conn, const CallMessage& call, const Tag* tag ); - - Connection _conn; - CallMessage _call; - MessageIter _writer; - ReturnMessage _return; - const Tag* _tag; - - friend class ObjectAdaptor; - }; - - void return_later( const Tag* tag ); - - void return_now( Continuation* ret ); - - void return_error( Continuation* ret, const Error error ); - - Continuation* find_continuation( const Tag* tag ); - -private: - - void _emit_signal( SignalMessage& ); - - bool handle_message( const Message& ); - - void register_obj(); - void unregister_obj(); - - typedef std::map<const Tag*, Continuation*> ContinuationMap; - ContinuationMap _continuations; - -friend struct Private; -}; - -const ObjectAdaptor* ObjectAdaptor::object() const -{ - return this; -} - -Tag* ObjectAdaptor::Continuation::tag() -{ - return const_cast<Tag*>(_tag); -} - -MessageIter& ObjectAdaptor::Continuation::writer() -{ - return _writer; -} - -/* -*/ - -class ObjectProxy; - -typedef std::list<ObjectProxy*> ObjectProxyPList; - -class DXXAPI ObjectProxy : public Object, public virtual ProxyBase -{ -public: - - ObjectProxy( Connection& conn, const Path& path, const char* service = "" ); - - ~ObjectProxy(); - - inline const ObjectProxy* object() const; - -private: - - Message _invoke_method( CallMessage& ); - - bool handle_message( const Message& ); - - void register_obj(); - void unregister_obj(); - -private: - - MessageSlot _filtered; -}; - -const ObjectProxy* ObjectProxy::object() const -{ - return this; -} - -} /* namespace DBus */ - -#endif//__DBUSXX_OBJECT_H diff --git a/libs/dbus/include/dbus-c++/pendingcall.h b/libs/dbus/include/dbus-c++/pendingcall.h deleted file mode 100644 index d7c64b801ea4335d7eb03b82ba3b70f1764c2412..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/pendingcall.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_PENDING_CALL_H -#define __DBUSXX_PENDING_CALL_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "util.h" -#include "message.h" - -namespace DBus { - -class Connection; - -class DXXAPI PendingCall -{ -public: - - struct Private; - - PendingCall( Private* ); - - PendingCall( const PendingCall& ); - - virtual ~PendingCall(); - - PendingCall& operator = ( const PendingCall& ); - - bool completed(); - - void cancel(); - - void block(); - - void data( void* ); - - void* data(); - - Slot<void, PendingCall&>& slot(); - - Message steal_reply(); - -private: - - RefPtrI<Private> _pvt; - -friend struct Private; -friend class Connection; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_PENDING_CALL_H diff --git a/libs/dbus/include/dbus-c++/property.h b/libs/dbus/include/dbus-c++/property.h deleted file mode 100644 index 28e1846106eb3040789c7e488b27ea4be9879b30..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/property.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_PROPERTY_H -#define __DBUSXX_PROPERTY_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "types.h" -#include "interface.h" - -namespace DBus { - -template <typename T> -class PropertyAdaptor -{ -public: - - PropertyAdaptor() : _data(0) - {} - - void bind( PropertyData& data ) - { - _data = &data; - } - - T operator() (void) const - { - return (T)_data->value; - } - - PropertyAdaptor& operator = ( const T& t ) - { - _data->value.clear(); - MessageIter wi = _data->value.writer(); - wi << t; - return *this; - } - -private: - - PropertyData* _data; -}; - -struct IntrospectedInterface; - -class DXXAPI PropertiesAdaptor : public InterfaceAdaptor -{ -public: - - PropertiesAdaptor(); - - Message Get( const CallMessage& ); - - Message Set( const CallMessage& ); - -protected: - - virtual void on_get_property( InterfaceAdaptor& interface, const String& property, Variant& value ) - {} - - virtual void on_set_property( InterfaceAdaptor& interface, const String& property, const Variant& value ) - {} - - IntrospectedInterface* const introspect() const; -}; - -class DXXAPI PropertiesProxy : public InterfaceProxy -{ -public: - - PropertiesProxy(); - - Variant Get( const String& interface, const String& property ); - - void Set( const String& interface, const String& property, const Variant& value ); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_PROPERTY_H - diff --git a/libs/dbus/include/dbus-c++/refptr_impl.h b/libs/dbus/include/dbus-c++/refptr_impl.h deleted file mode 100644 index bf42f40d890ec1e380519e1d88d1215b4a3aca40..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/refptr_impl.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_REFPTR_IMPL_H -#define __DBUSXX_REFPTR_IMPL_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "util.h" - -namespace DBus { - -template <class T> -RefPtrI<T>::RefPtrI( T* ptr ) -: __ptr(ptr) -{} - -template <class T> -RefPtrI<T>::~RefPtrI() -{ - if(__cnt.one()) delete __ptr; -} - -} /* namespace DBus */ - -#endif//__DBUSXX_REFPTR_IMPL_H diff --git a/libs/dbus/include/dbus-c++/server.h b/libs/dbus/include/dbus-c++/server.h deleted file mode 100644 index 4597610810c08c69e31322a395e3bfde18078d3e..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/server.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_SERVER_H -#define __DBUSXX_SERVER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <list> - -#include "api.h" -#include "error.h" -#include "connection.h" -#include "util.h" -#include "dispatcher.h" - -namespace DBus { - -class Server; - -typedef std::list<Server> ServerList; - -class DXXAPI Server -{ -public: - - Server( const char* address ); - - Dispatcher* setup( Dispatcher* ); - - virtual ~Server(); - - bool listening() const; - - bool operator == ( const Server& ) const; - - void disconnect(); - - struct Private; - -protected: - - Server( const Server& s ) - {} - - virtual void on_new_connection( Connection& c ) = 0; - -private: - - RefPtrI<Private> _pvt; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_SERVER_H diff --git a/libs/dbus/include/dbus-c++/types.h b/libs/dbus/include/dbus-c++/types.h deleted file mode 100644 index f90f980f5f492918989035ba4fe2f56cfce8b7e0..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/types.h +++ /dev/null @@ -1,514 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_TYPES_H -#define __DBUSXX_TYPES_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string> -#include <vector> -#include <map> - -#include "api.h" -#include "util.h" -#include "message.h" -#include "error.h" - -namespace DBus { - -typedef unsigned char Byte; -typedef bool Bool; -typedef signed short Int16; -typedef unsigned short UInt16; -typedef signed int Int32; -typedef unsigned int UInt32; -typedef signed long long Int64; -typedef unsigned long long UInt64; -typedef double Double; -typedef std::string String; - -struct DXXAPI Path : public std::string -{ - Path() {} - Path( const std::string& s ) : std::string(s) {} - Path( const char* c ) : std::string(c) {} - Path& operator = ( std::string& s ) - { - std::string::operator = (s); - return *this; - } -}; - -struct DXXAPI Signature : public std::string -{ - Signature() {} - Signature( const std::string& s ) : std::string(s) {} - Signature( const char* c ) : std::string(c) {} - Signature& operator = ( std::string& s ) - { - std::string::operator = (s); - return *this; - } -}; - -struct DXXAPI Invalid {}; - -class DXXAPI Variant -{ -public: - - Variant(); - - Variant( MessageIter& it ); - - Variant& operator = ( const Variant& v ); - - const Signature signature() const; - - void clear(); - - MessageIter reader() const - { - return _msg.reader(); - } - - MessageIter writer() - { - return _msg.writer(); - } - - template <typename T> - operator T() const - { - T cast; - MessageIter ri = _msg.reader(); - ri >> cast; - return cast; - } - -private: - - Message _msg; -}; - -template < - typename T1, - typename T2 = Invalid, - typename T3 = Invalid, - typename T4 = Invalid, - typename T5 = Invalid, - typename T6 = Invalid, - typename T7 = Invalid, - typename T8 = Invalid // who needs more than eight? -> -struct Struct -{ - T1 _1; T2 _2; T3 _3; T4 _4; T5 _5; T6 _6; T7 _7; T8 _8; -}; - -template<typename K, typename V> -inline bool dict_has_key( const std::map<K,V>& map, const K& key ) -{ - return map.find(key) != map.end(); -} - -template <typename T> -struct type -{ - static std::string sig() - { - throw ErrorInvalidArgs("unknown type"); - return ""; - } -}; - -template <> struct type<Variant> { static std::string sig(){ return "v"; } }; -template <> struct type<Byte> { static std::string sig(){ return "y"; } }; -template <> struct type<Bool> { static std::string sig(){ return "b"; } }; -template <> struct type<Int16> { static std::string sig(){ return "n"; } }; -template <> struct type<UInt16> { static std::string sig(){ return "q"; } }; -template <> struct type<Int32> { static std::string sig(){ return "i"; } }; -template <> struct type<UInt32> { static std::string sig(){ return "u"; } }; -template <> struct type<Int64> { static std::string sig(){ return "x"; } }; -template <> struct type<UInt64> { static std::string sig(){ return "t"; } }; -template <> struct type<Double> { static std::string sig(){ return "d"; } }; -template <> struct type<String> { static std::string sig(){ return "s"; } }; -template <> struct type<Path> { static std::string sig(){ return "o"; } }; -template <> struct type<Signature> { static std::string sig(){ return "g"; } }; -template <> struct type<Invalid> { static std::string sig(){ return ""; } }; - -template <typename E> -struct type< std::vector<E> > -{ static std::string sig(){ return "a" + type<E>::sig(); } }; - -template <typename K, typename V> -struct type< std::map<K,V> > -{ static std::string sig(){ return "a{" + type<K>::sig() + type<V>::sig() + "}"; } }; - -template < - typename T1, - typename T2, - typename T3, - typename T4, - typename T5, - typename T6, - typename T7, - typename T8 // who needs more than eight? -> -struct type< Struct<T1,T2,T3,T4,T5,T6,T7,T8> > -{ - static std::string sig() - { - return "(" - + type<T1>::sig() - + type<T2>::sig() - + type<T3>::sig() - + type<T4>::sig() - + type<T5>::sig() - + type<T6>::sig() - + type<T7>::sig() - + type<T8>::sig() - + ")"; - } -}; - -} /* namespace DBus */ - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Invalid& ) -{ - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Byte& val ) -{ - iter.append_byte(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Bool& val ) -{ - iter.append_bool(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int16& val ) -{ - iter.append_int16(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt16& val ) -{ - iter.append_uint16(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int32& val ) -{ - iter.append_int32(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt32& val ) -{ - iter.append_uint32(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int64& val ) -{ - iter.append_int64(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt64& val ) -{ - iter.append_uint64(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Double& val ) -{ - iter.append_double(val); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::String& val ) -{ - iter.append_string(val.c_str()); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Path& val ) -{ - iter.append_path(val.c_str()); - return iter; -} - -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Signature& val ) -{ - iter.append_signature(val.c_str()); - return iter; -} - -template<typename E> -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::vector<E>& val ) -{ - const std::string sig = DBus::type<E>::sig(); - DBus::MessageIter ait = iter.new_array(sig.c_str()); - - typename std::vector<E>::const_iterator vit; - for(vit = val.begin(); vit != val.end(); ++vit) - { - ait << *vit; - } - - iter.close_container(ait); - return iter; -} - -template<> -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::vector<DBus::Byte>& val ) -{ - DBus::MessageIter ait = iter.new_array("y"); - ait.append_array('y', &val.front(), val.size()); - iter.close_container(ait); - return iter; -} - -template<typename K, typename V> -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::map<K,V>& val ) -{ - const std::string sig = "{" + DBus::type<K>::sig() + DBus::type<V>::sig() + "}"; - DBus::MessageIter ait = iter.new_array(sig.c_str()); - - typename std::map<K,V>::const_iterator mit; - for(mit = val.begin(); mit != val.end(); ++mit) - { - DBus::MessageIter eit = ait.new_dict_entry(); - - eit << mit->first << mit->second; - - ait.close_container(eit); - } - - iter.close_container(ait); - return iter; -} - -template < - typename T1, - typename T2, - typename T3, - typename T4, - typename T5, - typename T6, - typename T7, - typename T8 -> -inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Struct<T1,T2,T3,T4,T5,T6,T7,T8>& val ) -{ -/* const std::string sig = - DBus::type<T1>::sig() + DBus::type<T2>::sig() + DBus::type<T3>::sig() + DBus::type<T4>::sig() + - DBus::type<T5>::sig() + DBus::type<T6>::sig() + DBus::type<T7>::sig() + DBus::type<T8>::sig(); -*/ - DBus::MessageIter sit = iter.new_struct(/*sig.c_str()*/); - - sit << val._1 << val._2 << val._3 << val._4 << val._5 << val._6 << val._7 << val._8; - - iter.close_container(sit); - - return iter; -} - -extern DXXAPI DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Variant& val ); - -/* - */ - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Invalid& ) -{ - return iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Byte& val ) -{ - val = iter.get_byte(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Bool& val ) -{ - val = iter.get_bool(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int16& val ) -{ - val = iter.get_int16(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt16& val ) -{ - val = iter.get_uint16(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int32& val ) -{ - val = iter.get_int32(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt32& val ) -{ - val = iter.get_uint32(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int64& val ) -{ - val = iter.get_int64(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt64& val ) -{ - val = iter.get_uint64(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Double& val ) -{ - val = iter.get_double(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::String& val ) -{ - val = iter.get_string(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Path& val ) -{ - val = iter.get_path(); - return ++iter; -} - -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Signature& val ) -{ - val = iter.get_signature(); - return ++iter; -} - -template<typename E> -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::vector<E>& val ) -{ - if(!iter.is_array()) - throw DBus::ErrorInvalidArgs("array expected"); - - DBus::MessageIter ait = iter.recurse(); - - while(!ait.at_end()) - { - E elem; - - ait >> elem; - - val.push_back(elem); - } - return ++iter; -} - -template<> -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::vector<DBus::Byte>& val ) -{ - if(!iter.is_array()) - throw DBus::ErrorInvalidArgs("array expected"); - - if(iter.array_type() != 'y') - throw DBus::ErrorInvalidArgs("byte-array expected"); - - DBus::MessageIter ait = iter.recurse(); - - DBus::Byte* array; - size_t length = ait.get_array(&array); - - val.insert(val.end(), array, array+length); - - return ++iter; -} - -template<typename K, typename V> -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::map<K,V>& val ) -{ - if(!iter.is_dict()) - throw DBus::ErrorInvalidArgs("dictionary value expected"); - - DBus::MessageIter mit = iter.recurse(); - - while(!mit.at_end()) - { - K key; V value; - - DBus::MessageIter eit = mit.recurse(); - - eit >> key >> value; - - val[key] = value; - - ++mit; - } - - return ++iter; -} - -template < - typename T1, - typename T2, - typename T3, - typename T4, - typename T5, - typename T6, - typename T7, - typename T8 -> -inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Struct<T1,T2,T3,T4,T5,T6,T7,T8>& val) -{ - DBus::MessageIter sit = iter.recurse(); - - sit >> val._1 >> val._2 >> val._3 >> val._4 >> val._5 >> val._6 >> val._7 >> val._8; - - return ++iter; -} - -extern DXXAPI DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Variant& val ); - -#endif//__DBUSXX_TYPES_H - diff --git a/libs/dbus/include/dbus-c++/util.h b/libs/dbus/include/dbus-c++/util.h deleted file mode 100644 index a22f26719c431be9aa9755b347247ef66bb74c72..0000000000000000000000000000000000000000 --- a/libs/dbus/include/dbus-c++/util.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_UTIL_H -#define __DBUSXX_UTIL_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "api.h" -#include "debug.h" - -namespace DBus { - -/* - * Very simple reference counting - */ - -class DXXAPI RefCnt -{ -public: - - RefCnt() - { - __ref = new int; - (*__ref) = 1; - } - - RefCnt( const RefCnt& rc ) - { - __ref = rc.__ref; - ref(); - } - - virtual ~RefCnt() - { - unref(); - } - - RefCnt& operator = ( const RefCnt& ref ) - { - ref.ref(); - unref(); - __ref = ref.__ref; - return *this; - } - - bool noref() const - { - return (*__ref) == 0; - } - - bool one() const - { - return (*__ref) == 1; - } - -private: - - DXXAPILOCAL void ref() const - { - ++ (*__ref); - } - DXXAPILOCAL void unref() const - { - -- (*__ref); - - if( (*__ref) < 0 ) - { - debug_log("%p: refcount dropped below zero!", __ref); - } - - if( noref() ) - { - delete __ref; - } - } - -private: - - int *__ref; -}; - -/* - * Reference counting pointers (emulate boost::shared_ptr) - */ - -template <class T> -class RefPtrI // RefPtr to incomplete type -{ -public: - - RefPtrI( T* ptr = 0 ); - - ~RefPtrI(); - - RefPtrI& operator = ( const RefPtrI& ref ) - { - if( this != &ref ) - { - if(__cnt.one()) delete __ptr; - - __ptr = ref.__ptr; - __cnt = ref.__cnt; - } - return *this; - } - - T& operator *() const - { - return *__ptr; - } - - T* operator ->() const - { - if(__cnt.noref()) return 0; - - return __ptr; - } - - T* get() const - { - if(__cnt.noref()) return 0; - - return __ptr; - } - -private: - - T* __ptr; - RefCnt __cnt; -}; - -template <class T> -class RefPtr -{ -public: - - RefPtr( T* ptr = 0) - : __ptr(ptr) - {} - - ~RefPtr() - { - if(__cnt.one()) delete __ptr; - } - - RefPtr& operator = ( const RefPtr& ref ) - { - if( this != &ref ) - { - if(__cnt.one()) delete __ptr; - - __ptr = ref.__ptr; - __cnt = ref.__cnt; - } - return *this; - } - - T& operator *() const - { - return *__ptr; - } - - T* operator ->() const - { - if(__cnt.noref()) return 0; - - return __ptr; - } - - T* get() const - { - if(__cnt.noref()) return 0; - - return __ptr; - } - -private: - - T* __ptr; - RefCnt __cnt; -}; - -/* - * Typed callback template - */ - -template <class R, class P> -class Callback_Base -{ -public: - - virtual R call( P param ) const = 0; - - virtual ~Callback_Base() - {} -}; - -template <class R, class P> -class Slot -{ -public: - - Slot& operator = ( Callback_Base<R,P>* s ) - { - _cb = s; - - return *this; - } - - R operator()( P param ) const - { - /*if(_cb.get())*/ return _cb->call(param); - } - - R call( P param ) const - { - /*if(_cb.get())*/ return _cb->call(param); - } - - bool empty() - { - return _cb.get() == 0; - } - -private: - - RefPtr< Callback_Base<R,P> > _cb; -}; - -template <class C, class R, class P> -class Callback : public Callback_Base<R,P> -{ -public: - - typedef R (C::*M)(P); - - Callback( C* c, M m ) - : _c(c), _m(m) - {} - - R call( P param ) const - { - /*if(_c)*/ return (_c->*_m)(param); - } - -private: - - C* _c; M _m; -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_UTIL_H diff --git a/libs/dbus/libdbus-c++.spec.in b/libs/dbus/libdbus-c++.spec.in deleted file mode 100644 index 264e02f23bebf974e676610721d4d16601e529fc..0000000000000000000000000000000000000000 --- a/libs/dbus/libdbus-c++.spec.in +++ /dev/null @@ -1,62 +0,0 @@ - - - - -Summary: C++ Interface for DBus -Name: libdbus-c++ -Version: @PACKAGE_VERSION@ -Release: 70001 -URL: http://dev.openwengo.org/trac/openwengo/trac.fcgi/browser/wengophone-ng/branches/wengophone-dbus-api/libs/dbus/src -Source0: %{name}-%{version}.tar.gz -License: LGPL -Group: Libraries -BuildRoot: %{_tmppath}/%{name}-root -Prefix: /usr - -%description - -Ability to reflect dbus methods and signals into a more natural C++ object system. - -%package devel -Requires: libdbus-c++ = %{version} -Group: Development/Libraries -Summary: Header files for libdbus-c++ - -%description devel -Header files for libdbus-c++ - - -%prep -%setup -q - -%build -./configure --prefix=/usr -make -j 4 - -%install -make prefix=$RPM_BUILD_ROOT%{prefix} install - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(755,root,root) -%{prefix}/lib/libdbus-c++*.so* - - - -%files devel -%defattr(-,root,root) -%{prefix}/bin/dbusxx-xml2cpp -%{prefix}/bin/dbusxx-introspect -%{prefix}/lib/libdbus-c*.a -%{prefix}/include/dbus-c++-1 -%{prefix}/lib/pkgconfig/*.pc - -%changelog -* Thu Feb 8 2007 Ben Martin -- initial spec file diff --git a/libs/dbus/src/Makefile.am b/libs/dbus/src/Makefile.am deleted file mode 100644 index b74bb66aea044ddf413c7f70ee39524059712b14..0000000000000000000000000000000000000000 --- a/libs/dbus/src/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(dbus_CFLAGS) \ - $(glib_CFLAGS) \ - -I$(top_srcdir)/include - -if ENABLE_GLIB -GLIB_H = $(HEADER_DIR)/glib-integration.h -GLIB_CPP = glib-integration.cpp -endif - -HEADER_DIR = $(top_srcdir)/include/dbus-c++ -HEADER_FILES = \ - $(HEADER_DIR)/config.h \ - $(HEADER_DIR)/dbus.h \ - $(HEADER_DIR)/types.h \ - $(HEADER_DIR)/connection.h \ - $(HEADER_DIR)/property.h \ - $(HEADER_DIR)/debug.h \ - $(HEADER_DIR)/error.h \ - $(HEADER_DIR)/interface.h \ - $(HEADER_DIR)/message.h \ - $(HEADER_DIR)/dispatcher.h \ - $(HEADER_DIR)/object.h \ - $(HEADER_DIR)/pendingcall.h \ - $(HEADER_DIR)/server.h \ - $(HEADER_DIR)/debug.h \ - $(HEADER_DIR)/util.h \ - $(HEADER_DIR)/refptr_impl.h \ - $(HEADER_DIR)/introspection.h \ - $(HEADER_DIR)/api.h \ - $(HEADER_DIR)/eventloop.h \ - $(HEADER_DIR)/eventloop-integration.h \ - $(GLIB_H) - -lib_includedir=$(includedir)/dbus-c++-1/dbus-c++/ -lib_include_HEADERS = $(HEADER_FILES) - -lib_LTLIBRARIES = libdbus-c++-1.la -libdbus_c___1_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp types.cpp connection.cpp connection_p.h property.cpp dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h eventloop.cpp eventloop-integration.cpp $(GLIB_CPP) -libdbus_c___1_la_LIBADD = $(dbus_LIBS) $(glib_LIBS) $(pthread_LIBS) - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/src/connection.cpp b/libs/dbus/src/connection.cpp deleted file mode 100644 index bf43a99f1123d563722ea4e6b3899c06db252590..0000000000000000000000000000000000000000 --- a/libs/dbus/src/connection.cpp +++ /dev/null @@ -1,413 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/debug.h> -#include <dbus-c++/connection.h> - -#include <dbus/dbus.h> -#include <string> - -#include "internalerror.h" - -#include "connection_p.h" -#include "dispatcher_p.h" -#include "server_p.h" -#include "message_p.h" -#include "pendingcall_p.h" - -using namespace DBus; - -Connection::Private::Private( DBusConnection* c, Server::Private* s ) -: conn(c) , dispatcher(0), server(s) -{ - init(); -} - -Connection::Private::Private( DBusBusType type ) -{ - InternalError e; - - conn = dbus_bus_get_private(type, e); - - if(e) throw Error(e); - - init(); -} - -Connection::Private::~Private() -{ - debug_log("terminating connection 0x%08x", conn); - - detach_server(); - - if(dbus_connection_get_is_connected(conn)) - { - std::vector<std::string>::iterator i = names.begin(); - - while(i != names.end()) - { - debug_log("%s: releasing bus name %s", dbus_bus_get_unique_name(conn), i->c_str()); - dbus_bus_release_name(conn, i->c_str(), NULL); - ++i; - } - dbus_connection_close(conn); - } - dbus_connection_unref(conn); -} - -void Connection::Private::init() -{ - dbus_connection_ref(conn); - dbus_connection_ref(conn); //todo: the library has to own another reference - - disconn_filter = new Callback<Connection::Private, bool, const Message&>( - this, &Connection::Private::disconn_filter_function - ); - - dbus_connection_add_filter(conn, message_filter_stub, &disconn_filter, NULL); - - dbus_connection_set_dispatch_status_function(conn, dispatch_status_stub, this, 0); - dbus_connection_set_exit_on_disconnect(conn, false); //why was this set to true?? -} - -void Connection::Private::detach_server() -{ -/* Server::Private* tmp = server; - - server = NULL; - - if(tmp) - { - ConnectionList::iterator i; - - for(i = tmp->connections.begin(); i != tmp->connections.end(); ++i) - { - if(i->_pvt.get() == this) - { - tmp->connections.erase(i); - break; - } - } - }*/ -} - -bool Connection::Private::do_dispatch() -{ - debug_log("dispatching on %p", conn); - - if(!dbus_connection_get_is_connected(conn)) - { - debug_log("connection terminated"); - - detach_server(); - - return true; - } - - return dbus_connection_dispatch(conn) != DBUS_DISPATCH_DATA_REMAINS; -} - -void Connection::Private::dispatch_status_stub( DBusConnection* dc, DBusDispatchStatus status, void* data ) -{ - Private* p = static_cast<Private*>(data); - - switch(status) - { - case DBUS_DISPATCH_DATA_REMAINS: - debug_log("some dispatching to do on %p", dc); - p->dispatcher->queue_connection(p); - break; - - case DBUS_DISPATCH_COMPLETE: - debug_log("all dispatching done on %p", dc); - break; - - case DBUS_DISPATCH_NEED_MEMORY: //uh oh... - debug_log("connection %p needs memory", dc); - break; - } -} - -DBusHandlerResult Connection::Private::message_filter_stub( DBusConnection* conn, DBusMessage* dmsg, void* data ) -{ - MessageSlot* slot = static_cast<MessageSlot*>(data); - - Message msg = Message(new Message::Private(dmsg)); - - return slot && !slot->empty() && slot->call(msg) - ? DBUS_HANDLER_RESULT_HANDLED - : DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -bool Connection::Private::disconn_filter_function( const Message& msg ) -{ - if(msg.is_signal(DBUS_INTERFACE_LOCAL,"Disconnected")) - { - debug_log("%p disconnected by local bus", conn); - dbus_connection_close(conn); - - return true; - } - return false; -} - -Connection Connection::SystemBus() -{ - return Connection(new Private(DBUS_BUS_SYSTEM)); -} - -Connection Connection::SessionBus() -{ - return Connection(new Private(DBUS_BUS_SESSION)); -} - -Connection Connection::ActivationBus() -{ - return Connection(new Private(DBUS_BUS_STARTER)); -} - -Connection::Connection( const char* address, bool priv ) -{ - InternalError e; - DBusConnection* conn = priv - ? dbus_connection_open_private(address, e) - : dbus_connection_open(address, e); - - if(e) throw Error(e); - - _pvt = new Private(conn); - - setup(default_dispatcher); - - debug_log("connected to %s", address); -} - -Connection::Connection( Connection::Private* p ) -: _pvt(p) -{ - setup(default_dispatcher); -} - -Connection::Connection( const Connection& c ) -: _pvt(c._pvt) -{ - dbus_connection_ref(_pvt->conn); -} - -Connection::~Connection() -{ - dbus_connection_unref(_pvt->conn); -} - -Dispatcher* Connection::setup( Dispatcher* dispatcher ) -{ - debug_log("registering stubs for connection %p", _pvt->conn); - - if(!dispatcher) dispatcher = default_dispatcher; - - if(!dispatcher) throw ErrorFailed("no default dispatcher set for new connection"); - - Dispatcher* prev = _pvt->dispatcher; - - _pvt->dispatcher = dispatcher; - - dispatcher->queue_connection(_pvt.get()); - - dbus_connection_set_watch_functions( - _pvt->conn, - Dispatcher::Private::on_add_watch, - Dispatcher::Private::on_rem_watch, - Dispatcher::Private::on_toggle_watch, - dispatcher, - 0 - ); - - dbus_connection_set_timeout_functions( - _pvt->conn, - Dispatcher::Private::on_add_timeout, - Dispatcher::Private::on_rem_timeout, - Dispatcher::Private::on_toggle_timeout, - dispatcher, - 0 - ); - - return prev; -} - -bool Connection::operator == ( const Connection& c ) const -{ - return _pvt->conn == c._pvt->conn; -} - -bool Connection::register_bus() -{ - InternalError e; - - bool r = dbus_bus_register(_pvt->conn, e); - - if(e) throw (e); - - return r; -} - -bool Connection::connected() const -{ - return dbus_connection_get_is_connected(_pvt->conn); -} - -void Connection::disconnect() -{ -// dbus_connection_disconnect(_pvt->conn); // disappeared in 0.9x - dbus_connection_close(_pvt->conn); -} - -void Connection::exit_on_disconnect( bool exit ) -{ - dbus_connection_set_exit_on_disconnect(_pvt->conn, exit); -} - -bool Connection::unique_name( const char* n ) -{ - return dbus_bus_set_unique_name(_pvt->conn, n); -} - -const char* Connection::unique_name() const -{ - return dbus_bus_get_unique_name(_pvt->conn); -} - -void Connection::flush() -{ - dbus_connection_flush(_pvt->conn); -} - -void Connection::add_match( const char* rule ) -{ - InternalError e; - - dbus_bus_add_match(_pvt->conn, rule, e); - - debug_log("%s: added match rule %s", unique_name(), rule); - - if(e) throw Error(e); -} - -void Connection::remove_match( const char* rule ) -{ - InternalError e; - - dbus_bus_remove_match(_pvt->conn, rule, e); - - debug_log("%s: removed match rule %s", unique_name(), rule); - - if(e) throw Error(e); -} - -bool Connection::add_filter( MessageSlot& s ) -{ - debug_log("%s: adding filter", unique_name()); - return dbus_connection_add_filter(_pvt->conn, Private::message_filter_stub, &s, NULL); -} - -void Connection::remove_filter( MessageSlot& s ) -{ - debug_log("%s: removing filter", unique_name()); - dbus_connection_remove_filter(_pvt->conn, Private::message_filter_stub, &s); -} - -bool Connection::send( const Message& msg, unsigned int* serial ) -{ - return dbus_connection_send(_pvt->conn, msg._pvt->msg, serial); -} - -Message Connection::send_blocking( Message& msg, int timeout ) -{ - DBusMessage* reply; - InternalError e; - - reply = dbus_connection_send_with_reply_and_block(_pvt->conn, msg._pvt->msg, timeout, e); - - if(e) throw Error(e); - - return Message(new Message::Private(reply), false); -} - -PendingCall Connection::send_async( Message& msg, int timeout ) -{ - DBusPendingCall* pending; - - if(!dbus_connection_send_with_reply(_pvt->conn, msg._pvt->msg, &pending, timeout)) - { - throw ErrorNoMemory("Unable to start asynchronous call"); - } - return PendingCall(new PendingCall::Private(pending)); -} - -void Connection::request_name( const char* name, int flags ) -{ - InternalError e; - - debug_log("%s: registering bus name %s", unique_name(), name); - - dbus_bus_request_name(_pvt->conn, name, flags, e); //we deliberately don't check return value - - if(e) throw Error(e); - -// this->remove_match("destination"); - - if(name) - { - _pvt->names.push_back(name); - std::string match = "destination='" + _pvt->names.back() + "'"; - add_match(match.c_str()); - } -} - -bool Connection::has_name( const char* name ) -{ - InternalError e; - - bool b = dbus_bus_name_has_owner(_pvt->conn, name, e); - - if(e) throw Error(e); - - return b; -} - -const std::vector<std::string>& Connection::names() -{ - return _pvt->names; -} - -bool Connection::start_service( const char* name, unsigned long flags ) -{ - InternalError e; - - bool b = dbus_bus_start_service_by_name(_pvt->conn, name, flags, NULL, e); - - if(e) throw Error(e); - - return b; -} - diff --git a/libs/dbus/src/connection_p.h b/libs/dbus/src/connection_p.h deleted file mode 100644 index eec96e38eaf33a466ab4a0ff54595c9df0af3371..0000000000000000000000000000000000000000 --- a/libs/dbus/src/connection_p.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_CONNECTION_P_H -#define __DBUSXX_CONNECTION_P_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/connection.h> -#include <dbus-c++/server.h> -#include <dbus-c++/dispatcher.h> -#include <dbus-c++/refptr_impl.h> - -#include <dbus/dbus.h> - -#include <string> - -namespace DBus { - -struct DXXAPILOCAL Connection::Private -{ - DBusConnection* conn; - - std::vector<std::string> names; - - Dispatcher* dispatcher; - bool do_dispatch(); - - MessageSlot disconn_filter; - bool disconn_filter_function( const Message& ); - - Server::Private* server; - void detach_server(); - - Private( DBusConnection*, Server::Private* = NULL ); - - Private( DBusBusType ); - - ~Private(); - - void init(); - - static void dispatch_status_stub( DBusConnection*, DBusDispatchStatus, void* ); - - static DBusHandlerResult message_filter_stub( DBusConnection*, DBusMessage*, void* ); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_CONNECTION_P_H diff --git a/libs/dbus/src/debug.cpp b/libs/dbus/src/debug.cpp deleted file mode 100644 index 69d2d08c9bb025251d99adb53a82fae86919aa86..0000000000000000000000000000000000000000 --- a/libs/dbus/src/debug.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/debug.h> - -#include <stdarg.h> -#include <cstdio> -#include <stdlib.h> - -static void _debug_log_default(const char* format, ...) -{ -#ifdef DEBUG - - static int debug_env = getenv("DBUSXX_VERBOSE") ? 1 : 0; - - if(debug_env) - { - va_list args; - va_start(args, format); - - fprintf(stderr, "dbus-c++: "); - vfprintf(stderr, format, args); - fprintf(stderr, "\n"); - - va_end(args); - } - -#endif//DEBUG -} - -DBus::LogFunction DBus::debug_log = _debug_log_default; - diff --git a/libs/dbus/src/dispatcher.cpp b/libs/dbus/src/dispatcher.cpp deleted file mode 100644 index bed88f85f0a3e8d2bf2476af14e33e6ae06e7206..0000000000000000000000000000000000000000 --- a/libs/dbus/src/dispatcher.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/dispatcher.h> - -#include <dbus/dbus.h> - -#include "dispatcher_p.h" -#include "server_p.h" -#include "connection_p.h" - -DBus::Dispatcher* DBus::default_dispatcher = NULL; - -using namespace DBus; - -Timeout::Timeout( Timeout::Internal* i ) -: _int(i) -{ - dbus_timeout_set_data((DBusTimeout*)i, this, NULL); -} - -int Timeout::interval() const -{ - return dbus_timeout_get_interval((DBusTimeout*)_int); -} - -bool Timeout::enabled() const -{ - return dbus_timeout_get_enabled((DBusTimeout*)_int); -} - -bool Timeout::handle() -{ - return dbus_timeout_handle((DBusTimeout*)_int); -} - -/* -*/ - -Watch::Watch( Watch::Internal* i ) -: _int(i) -{ - dbus_watch_set_data((DBusWatch*)i, this, NULL); -} - -int Watch::descriptor() const -{ - return dbus_watch_get_fd((DBusWatch*)_int); -} - -int Watch::flags() const -{ - return dbus_watch_get_flags((DBusWatch*)_int); -} - -bool Watch::enabled() const -{ - return dbus_watch_get_enabled((DBusWatch*)_int); -} - -bool Watch::handle( int flags ) -{ - return dbus_watch_handle((DBusWatch*)_int, flags); -} - -/* -*/ - -dbus_bool_t Dispatcher::Private::on_add_watch( DBusWatch* watch, void* data ) -{ - Dispatcher* d = static_cast<Dispatcher*>(data); - - Watch::Internal* w = reinterpret_cast<Watch::Internal*>(watch); - - d->add_watch(w); - - return true; -} - -void Dispatcher::Private::on_rem_watch( DBusWatch* watch, void* data ) -{ - Dispatcher* d = static_cast<Dispatcher*>(data); - - Watch* w = static_cast<Watch*>(dbus_watch_get_data(watch)); - - d->rem_watch(w); -} - -void Dispatcher::Private::on_toggle_watch( DBusWatch* watch, void* data ) -{ - Watch* w = static_cast<Watch*>(dbus_watch_get_data(watch)); - - w->toggle(); -} - -dbus_bool_t Dispatcher::Private::on_add_timeout( DBusTimeout* timeout, void* data ) -{ - Dispatcher* d = static_cast<Dispatcher*>(data); - - Timeout::Internal* t = reinterpret_cast<Timeout::Internal*>(timeout); - - d->add_timeout(t); - - return true; -} - -void Dispatcher::Private::on_rem_timeout( DBusTimeout* timeout, void* data ) -{ - Dispatcher* d = static_cast<Dispatcher*>(data); - - Timeout* t = static_cast<Timeout*>(dbus_timeout_get_data(timeout)); - - d->rem_timeout(t); -} - -void Dispatcher::Private::on_toggle_timeout( DBusTimeout* timeout, void* data ) -{ - Timeout* t = static_cast<Timeout*>(dbus_timeout_get_data(timeout)); - - t->toggle(); -} - -void Dispatcher::queue_connection( Connection::Private* cp ) -{ - _mutex_p.lock(); - _pending_queue.push_back(cp); - _mutex_p.unlock(); -} - -void Dispatcher::dispatch_pending() -{ - _mutex_p.lock(); - - while(_pending_queue.size() > 0) - { - Connection::PrivatePList::iterator i, j; - - i = _pending_queue.begin(); - - while(i != _pending_queue.end()) - { - j = i; - - ++j; - - if((*i)->do_dispatch()) - _pending_queue.erase(i); - - i = j; - } - } - _mutex_p.unlock(); -} - -#ifdef DBUS_HAS_THREADS_INIT_DEFAULT -void DBus::_init_threading() -{ - dbus_threads_init_default(); -} -#endif//DBUS_HAS_THREADS_INIT_DEFAULT - -void DBus::_init_threading( - MutexNewFn m1, - MutexFreeFn m2, - MutexLockFn m3, - MutexUnlockFn m4, - CondVarNewFn c1, - CondVarFreeFn c2, - CondVarWaitFn c3, - CondVarWaitTimeoutFn c4, - CondVarWakeOneFn c5, - CondVarWakeAllFn c6 -) -{ -#ifndef DBUS_HAS_RECURSIVE_MUTEX - DBusThreadFunctions functions = { - DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK | - DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK | - DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK | - DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK| - DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK, - (DBusMutexNewFunction) m1, - (DBusMutexFreeFunction) m2, - (DBusMutexLockFunction) m3, - (DBusMutexUnlockFunction) m4, - (DBusCondVarNewFunction) c1, - (DBusCondVarFreeFunction) c2, - (DBusCondVarWaitFunction) c3, - (DBusCondVarWaitTimeoutFunction) c4, - (DBusCondVarWakeOneFunction) c5, - (DBusCondVarWakeAllFunction) c6 - }; -#else - DBusThreadFunctions functions = { - DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK | - DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK | - DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK | - DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK | - DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK| - DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK, - 0, 0, 0, 0, - (DBusCondVarNewFunction) c1, - (DBusCondVarFreeFunction) c2, - (DBusCondVarWaitFunction) c3, - (DBusCondVarWaitTimeoutFunction) c4, - (DBusCondVarWakeOneFunction) c5, - (DBusCondVarWakeAllFunction) c6, - (DBusRecursiveMutexNewFunction) m1, - (DBusRecursiveMutexFreeFunction) m2, - (DBusRecursiveMutexLockFunction) m3, - (DBusRecursiveMutexUnlockFunction) m4 - }; -#endif//DBUS_HAS_RECURSIVE_MUTEX - dbus_threads_init(&functions); -} diff --git a/libs/dbus/src/dispatcher_p.h b/libs/dbus/src/dispatcher_p.h deleted file mode 100644 index be2dea7db7681389437671b9f2769db3d13c97e0..0000000000000000000000000000000000000000 --- a/libs/dbus/src/dispatcher_p.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_DISPATCHER_P_H -#define __DBUSXX_DISPATCHER_P_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/dispatcher.h> - -#include <dbus/dbus.h> - -#include "internalerror.h" - -namespace DBus { - -struct DXXAPILOCAL Dispatcher::Private -{ - static dbus_bool_t on_add_watch( DBusWatch* watch, void* data ); - - static void on_rem_watch( DBusWatch* watch, void* data ); - - static void on_toggle_watch( DBusWatch* watch, void* data ); - - static dbus_bool_t on_add_timeout( DBusTimeout* timeout, void* data ); - - static void on_rem_timeout( DBusTimeout* timeout, void* data ); - - static void on_toggle_timeout( DBusTimeout* timeout, void* data ); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_DISPATCHER_P_H diff --git a/libs/dbus/src/error.cpp b/libs/dbus/src/error.cpp deleted file mode 100644 index 92251176a01283012d1188f4d907268ad2ab13cb..0000000000000000000000000000000000000000 --- a/libs/dbus/src/error.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/message.h> -#include <dbus-c++/error.h> - -#include <dbus/dbus.h> - -#include "message_p.h" -#include "internalerror.h" - -using namespace DBus; - -/* -*/ - -Error::Error() -: _int(new InternalError) -{} - -Error::Error(InternalError& i) -: _int(new InternalError(i)) -{} - -Error::Error( const char* name, const char* message ) -: _int(new InternalError) -{ - set(name, message); -} - -Error::Error( Message& m ) -: _int(new InternalError) -{ - dbus_set_error_from_message(&(_int->error), m._pvt->msg); -} - -Error::~Error() throw() -{ -} - -const char* Error::name() const -{ - return _int->error.name; -} - -const char* Error::message() const -{ - return _int->error.message; -} - -bool Error::is_set() const -{ - return *(_int); -} - -void Error::set( const char* name, const char* message ) -{ - dbus_set_error_const(&(_int->error), name, message); -} - -const char* Error::what() const throw() -{ - return _int->error.message; -} - diff --git a/libs/dbus/src/eventloop-integration.cpp b/libs/dbus/src/eventloop-integration.cpp deleted file mode 100644 index b9a4b125b62303222df750efa41c86c6e9872497..0000000000000000000000000000000000000000 --- a/libs/dbus/src/eventloop-integration.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/eventloop-integration.h> -#include <dbus-c++/debug.h> - -#include <sys/poll.h> - -#include <dbus/dbus.h> - -using namespace DBus; - -BusTimeout::BusTimeout( Timeout::Internal* ti, BusDispatcher* bd ) -: Timeout(ti), DefaultTimeout(Timeout::interval(), true, bd) -{ - DefaultTimeout::enabled(Timeout::enabled()); -} - -void BusTimeout::toggle() -{ - debug_log("timeout %p toggled (%s)", this, Timeout::enabled() ? "on":"off"); - - DefaultTimeout::enabled(Timeout::enabled()); -} - -BusWatch::BusWatch( Watch::Internal* wi, BusDispatcher* bd ) -: Watch(wi), DefaultWatch(Watch::descriptor(), 0, bd) -{ - int flags = POLLHUP | POLLERR; - - if(Watch::flags() & DBUS_WATCH_READABLE) - flags |= POLLIN; - if(Watch::flags() & DBUS_WATCH_WRITABLE) - flags |= POLLOUT; - - DefaultWatch::flags(flags); - DefaultWatch::enabled(Watch::enabled()); -} - -void BusWatch::toggle() -{ - debug_log("watch %p toggled (%s)", this, Watch::enabled() ? "on":"off"); - - DefaultWatch::enabled(Watch::enabled()); -} - -void BusDispatcher::enter() -{ - debug_log("entering dispatcher %p", this); - - _running = true; - - while(_running) - { - do_iteration(); - } - - debug_log("leaving dispatcher %p", this); -} - -void BusDispatcher::leave() -{ - _running = false; -} - -void BusDispatcher::do_iteration() -{ - dispatch_pending(); - dispatch(); -} - -Timeout* BusDispatcher::add_timeout( Timeout::Internal* ti ) -{ - BusTimeout* bt = new BusTimeout(ti, this); - - bt->expired = new Callback<BusDispatcher, void, DefaultTimeout&>(this, &BusDispatcher::timeout_expired); - bt->data(bt); - - debug_log("added timeout %p (%s)", bt, ((Timeout*)bt)->enabled() ? "on":"off"); - - return bt; -} - -void BusDispatcher::rem_timeout( Timeout* t ) -{ - debug_log("removed timeout %p", t); - - delete t; -} - -Watch* BusDispatcher::add_watch( Watch::Internal* wi ) -{ - BusWatch* bw = new BusWatch(wi, this); - - bw->ready = new Callback<BusDispatcher, void, DefaultWatch&>(this, &BusDispatcher::watch_ready); - bw->data(bw); - - debug_log("added watch %p (%s) fd=%d flags=%d", - bw, ((Watch*)bw)->enabled() ? "on":"off", ((Watch*)bw)->descriptor(), ((Watch*)bw)->flags() - ); - - return bw; -} - -void BusDispatcher::rem_watch( Watch* w ) -{ - debug_log("removed watch %p", w); - - delete w; -} - -void BusDispatcher::timeout_expired( DefaultTimeout& et ) -{ - debug_log("timeout %p expired", &et); - - BusTimeout* timeout = reinterpret_cast<BusTimeout*>(et.data()); - - timeout->handle(); -} - -void BusDispatcher::watch_ready( DefaultWatch& ew ) -{ - BusWatch* watch = reinterpret_cast<BusWatch*>(ew.data()); - - debug_log("watch %p ready, flags=%d state=%d", - watch, ((Watch*)watch)->flags(), watch->state() - ); - - int flags = 0; - - if(watch->state() & POLLIN) - flags |= DBUS_WATCH_READABLE; - if(watch->state() & POLLOUT) - flags |= DBUS_WATCH_WRITABLE; - if(watch->state() & POLLHUP) - flags |= DBUS_WATCH_HANGUP; - if(watch->state() & POLLERR) - flags |= DBUS_WATCH_ERROR; - - watch->handle(flags); -} - diff --git a/libs/dbus/src/eventloop.cpp b/libs/dbus/src/eventloop.cpp deleted file mode 100644 index 32a1044d7c5b4f77913bcc7ef4291f5532bc01d0..0000000000000000000000000000000000000000 --- a/libs/dbus/src/eventloop.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/eventloop.h> -#include <dbus-c++/debug.h> - -#include <sys/poll.h> -#include <sys/time.h> - -#include <dbus/dbus.h> - -using namespace DBus; - -static double millis( timeval tv ) -{ - return (tv.tv_sec*1000.0 + tv.tv_usec/1000.0); -} - -DefaultTimeout::DefaultTimeout( int interval, bool repeat, DefaultMainLoop* ed ) -: _enabled(true), _interval(interval), _repeat(repeat), _expiration(0), _data(0), _disp(ed) -{ - timeval now; - gettimeofday(&now, NULL); - - _expiration = millis(now) + interval; - - _disp->_mutex_t.lock(); - _disp->_timeouts.push_back(this); - _disp->_mutex_t.unlock(); -} - -DefaultTimeout::~DefaultTimeout() -{ - _disp->_mutex_t.lock(); - _disp->_timeouts.remove(this); - _disp->_mutex_t.unlock(); -} - -DefaultWatch::DefaultWatch( int fd, int flags, DefaultMainLoop* ed ) -: _enabled(true), _fd(fd), _flags(flags), _state(0), _data(0), _disp(ed) -{ - _disp->_mutex_w.lock(); - _disp->_watches.push_back(this); - _disp->_mutex_w.unlock(); -} - -DefaultWatch::~DefaultWatch() -{ - _disp->_mutex_w.lock(); - _disp->_watches.remove(this); - _disp->_mutex_w.unlock(); -} - -DefaultMutex::DefaultMutex() -{ -#if defined HAVE_PTHREAD - - pthread_mutex_init(&_mutex, NULL); - -#elif defined HAVE_WIN32 -#endif -} - -DefaultMutex::~DefaultMutex() -{ -#if defined HAVE_PTHREAD - - pthread_mutex_destroy(&_mutex); - -#elif defined HAVE_WIN32 -#endif -} - -void DefaultMutex::lock() -{ -#if defined HAVE_PTHREAD - - pthread_mutex_lock(&_mutex); - -#elif defined HAVE_WIN32 -#endif -} - -void DefaultMutex::unlock() -{ -#if defined HAVE_PTHREAD - - pthread_mutex_unlock(&_mutex); - -#elif defined HAVE_WIN32 -#endif -} - -DefaultMainLoop::DefaultMainLoop() -{ -} - -DefaultMainLoop::~DefaultMainLoop() -{ - _mutex_w.lock(); - - DefaultWatches::iterator wi = _watches.begin(); - while(wi != _watches.end()) - { - DefaultWatches::iterator wmp = wi; - ++wmp; - delete (*wi); - wi = wmp; - } - _mutex_w.unlock(); - - _mutex_t.lock(); - - DefaultTimeouts::iterator ti = _timeouts.begin(); - while(ti != _timeouts.end()) - { - DefaultTimeouts::iterator tmp = ti; - ++tmp; - delete (*ti); - ti = tmp; - } - _mutex_t.unlock(); -} - -void DefaultMainLoop::dispatch() -{ - _mutex_w.lock(); - - int nfd = _watches.size(); - - pollfd fds[nfd]; - - DefaultWatches::iterator wi = _watches.begin(); - - for(nfd = 0; wi != _watches.end(); ++wi) - { - if((*wi)->enabled()) - { - fds[nfd].fd = (*wi)->descriptor(); - fds[nfd].events = (*wi)->flags(); - fds[nfd].revents = 0; - - ++nfd; - } - } - _mutex_w.unlock(); - - int wait_min = 10000; - - DefaultTimeouts::iterator ti; - - _mutex_t.lock(); - - for(ti = _timeouts.begin(); ti != _timeouts.end(); ++ti) - { - if((*ti)->enabled() && (*ti)->interval() < wait_min) - wait_min = (*ti)->interval(); - } - - _mutex_t.unlock(); - - poll(fds, nfd, wait_min); - - timeval now; - gettimeofday(&now, NULL); - - double now_millis = millis(now); - - _mutex_t.lock(); - - ti = _timeouts.begin(); - - while(ti != _timeouts.end()) - { - DefaultTimeouts::iterator tmp = ti; - ++tmp; - - if((*ti)->enabled() && now_millis >= (*ti)->_expiration) - { - (*ti)->expired(*(*ti)); - - if((*ti)->_repeat) - { - (*ti)->_expiration = now_millis + (*ti)->_interval; - } - - } - - ti = tmp; - } - - _mutex_t.unlock(); - - _mutex_w.lock(); - - for(int j = 0; j < nfd; ++j) - { - DefaultWatches::iterator wi; - - for(wi = _watches.begin(); wi != _watches.end();) - { - DefaultWatches::iterator tmp = wi; - ++tmp; - - if((*wi)->enabled() && (*wi)->_fd == fds[j].fd) - { - if(fds[j].revents) - { - (*wi)->_state = fds[j].revents; - - (*wi)->ready(*(*wi)); - - fds[j].revents = 0; - } - } - - wi = tmp; - } - } - _mutex_w.unlock(); -} - diff --git a/libs/dbus/src/glib-integration.cpp b/libs/dbus/src/glib-integration.cpp deleted file mode 100644 index 42c31ea6ed874f57f3fe20e5f6a438d1f367b0aa..0000000000000000000000000000000000000000 --- a/libs/dbus/src/glib-integration.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/glib-integration.h> - -#include <dbus/dbus.h> // for DBUS_WATCH_* - -using namespace DBus; - -Glib::BusTimeout::BusTimeout( Timeout::Internal* ti, GMainContext* ctx ) -: Timeout(ti), _ctx(ctx) -{ - _enable(); -} - -Glib::BusTimeout::~BusTimeout() -{ - _disable(); -} - -void Glib::BusTimeout::toggle() -{ - debug_log("glib: timeout %p toggled (%s)", this, Timeout::enabled() ? "on":"off"); - - if(Timeout::enabled()) _enable(); - else _disable(); -} - -gboolean Glib::BusTimeout::timeout_handler( gpointer data ) -{ - Glib::BusTimeout* t = reinterpret_cast<Glib::BusTimeout*>(data); - - t->handle(); - - return TRUE; -} - -void Glib::BusTimeout::_enable() -{ - _source = g_timeout_source_new(Timeout::interval()); - g_source_set_callback(_source, timeout_handler, this, NULL); - g_source_attach(_source, _ctx); -} - -void Glib::BusTimeout::_disable() -{ - g_source_destroy(_source); -} - -struct BusSource -{ - GSource source; - GPollFD poll; -}; - -static gboolean watch_prepare( GSource *source, gint *timeout ) -{ -// debug_log("glib: watch_prepare"); - - *timeout = -1; - return FALSE; -} - -static gboolean watch_check( GSource *source ) -{ -// debug_log("glib: watch_check"); - - BusSource* io = (BusSource*)source; - return io->poll.revents ? TRUE : FALSE; -} - -static gboolean watch_dispatch( GSource *source, GSourceFunc callback, gpointer data ) -{ - debug_log("glib: watch_dispatch"); - - gboolean cb = callback(data); - DBus::default_dispatcher->dispatch_pending(); //TODO: won't work in case of multiple dispatchers - return cb; -} - -static GSourceFuncs watch_funcs = { - watch_prepare, - watch_check, - watch_dispatch, - NULL -}; - -Glib::BusWatch::BusWatch( Watch::Internal* wi, GMainContext* ctx ) -: Watch(wi), _ctx(ctx) -{ - _enable(); -} - -Glib::BusWatch::~BusWatch() -{ - _disable(); -} - -void Glib::BusWatch::toggle() -{ - debug_log("glib: watch %p toggled (%s)", this, Watch::enabled() ? "on":"off"); - - if(Watch::enabled()) _enable(); - else _disable(); -} - -gboolean Glib::BusWatch::watch_handler( gpointer data ) -{ - Glib::BusWatch* w = reinterpret_cast<Glib::BusWatch*>(data); - - BusSource* io = (BusSource*)(w->_source); - - int flags = 0; - if(io->poll.revents & G_IO_IN) - flags |= DBUS_WATCH_READABLE; - if(io->poll.revents & G_IO_OUT) - flags |= DBUS_WATCH_WRITABLE; - if(io->poll.revents & G_IO_ERR) - flags |= DBUS_WATCH_ERROR; - if(io->poll.revents & G_IO_HUP) - flags |= DBUS_WATCH_HANGUP; - - w->handle(flags); - - return TRUE; -} - -void Glib::BusWatch::_enable() -{ - _source = g_source_new(&watch_funcs, sizeof(BusSource)); - g_source_set_callback(_source, watch_handler, this, NULL); - - int flags = Watch::flags(); - int condition = 0; - - if(flags & DBUS_WATCH_READABLE) - condition |= G_IO_IN; -// if(flags & DBUS_WATCH_WRITABLE) -// condition |= G_IO_OUT; - if(flags & DBUS_WATCH_ERROR) - condition |= G_IO_ERR; - if(flags & DBUS_WATCH_HANGUP) - condition |= G_IO_HUP; - - GPollFD* poll = &(((BusSource*)_source)->poll); - poll->fd = Watch::descriptor(); - poll->events = condition; - poll->revents = 0; - - g_source_add_poll(_source, poll); - g_source_attach(_source, _ctx); -} - -void Glib::BusWatch::_disable() -{ - GPollFD* poll = &(((BusSource*)_source)->poll); - g_source_remove_poll(_source, poll); - g_source_destroy(_source); -} - -void Glib::BusDispatcher::attach( GMainContext* ctx ) -{ - _ctx = ctx ? ctx : g_main_context_default(); -} - -Timeout* Glib::BusDispatcher::add_timeout( Timeout::Internal* wi ) -{ - Timeout* t = new Glib::BusTimeout(wi, _ctx); - - debug_log("glib: added timeout %p (%s)", t, t->enabled() ? "on":"off"); - - return t; -} - -void Glib::BusDispatcher::rem_timeout( Timeout* t ) -{ - debug_log("glib: removed timeout %p", t); - - delete t; -} - -Watch* Glib::BusDispatcher::add_watch( Watch::Internal* wi ) -{ - Watch* w = new Glib::BusWatch(wi, _ctx); - - debug_log("glib: added watch %p (%s) fd=%d flags=%d", - w, w->enabled() ? "on":"off", w->descriptor(), w->flags() - ); - return w; -} - -void Glib::BusDispatcher::rem_watch( Watch* w ) -{ - debug_log("glib: removed watch %p", w); - - delete w; -} diff --git a/libs/dbus/src/interface.cpp b/libs/dbus/src/interface.cpp deleted file mode 100644 index 9615973d5813ad05041429e7fc400b506549ee2b..0000000000000000000000000000000000000000 --- a/libs/dbus/src/interface.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/debug.h> -#include <dbus-c++/interface.h> - -#include "internalerror.h" - -using namespace DBus; - -Interface::Interface( const std::string& name ) -: _name(name) -{} - -Interface::~Interface() -{} - -InterfaceAdaptor* AdaptorBase::find_interface( const std::string& name ) -{ - InterfaceAdaptorTable::const_iterator ii = _interfaces.find(name); - - return ii != _interfaces.end() ? ii->second : NULL; -} - -InterfaceAdaptor::InterfaceAdaptor( const std::string& name ) -: Interface(name) -{ - debug_log("adding interface %s", name.c_str()); - - _interfaces[name] = this; -} - -Message InterfaceAdaptor::dispatch_method( const CallMessage& msg ) -{ - const char* name = msg.member(); - - MethodTable::iterator mi = _methods.find(name); - if( mi != _methods.end() ) - { - return mi->second.call( msg ); - } - else - { - return ErrorMessage(msg, DBUS_ERROR_UNKNOWN_METHOD, name); - } -} - -void InterfaceAdaptor::emit_signal( const SignalMessage& sig ) -{ - SignalMessage& sig2 = const_cast<SignalMessage&>(sig); - - sig2.interface( name().c_str() ); - _emit_signal(sig2); -} - -Variant* InterfaceAdaptor::get_property( const std::string& name ) -{ - PropertyTable::iterator pti = _properties.find(name); - - if( pti != _properties.end() ) - { - if( !pti->second.read ) - throw ErrorAccessDenied("property is not readable"); - - return &(pti->second.value); - } - return NULL; -} - -void InterfaceAdaptor::set_property( const std::string& name, Variant& value ) -{ - PropertyTable::iterator pti = _properties.find(name); - - if( pti != _properties.end() ) - { - if( !pti->second.write ) - throw ErrorAccessDenied("property is not writeable"); - - Signature sig = value.signature(); - - if( pti->second.sig != sig ) - throw ErrorInvalidSignature("property expects a different type"); - - pti->second.value = value; - return; - } - throw ErrorFailed("requested property not found"); -} - -InterfaceProxy* ProxyBase::find_interface( const std::string& name ) -{ - InterfaceProxyTable::const_iterator ii = _interfaces.find(name); - - return ii != _interfaces.end() ? ii->second : NULL; -} - -InterfaceProxy::InterfaceProxy( const std::string& name ) -: Interface(name) -{ - debug_log("adding interface %s", name.c_str()); - - _interfaces[name] = this; -} - -bool InterfaceProxy::dispatch_signal( const SignalMessage& msg ) -{ - const char* name = msg.member(); - - SignalTable::iterator si = _signals.find(name); - if( si != _signals.end() ) - { - si->second.call( msg ); - return true; - } - else - { - return false; - } -} - -Message InterfaceProxy::invoke_method( const CallMessage& call ) -{ - CallMessage& call2 = const_cast<CallMessage&>(call); - - call2.interface( name().c_str() ); - return _invoke_method(call2); -} diff --git a/libs/dbus/src/internalerror.h b/libs/dbus/src/internalerror.h deleted file mode 100644 index 0f287e12f192d876d0197453706d64becd9af7ac..0000000000000000000000000000000000000000 --- a/libs/dbus/src/internalerror.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_INTERNALERROR_H -#define __DBUSXX_INTERNALERROR_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/error.h> - -#include <dbus/dbus.h> - -namespace DBus { - -struct DXXAPI InternalError -{ - DBusError error; - - InternalError() - { - dbus_error_init(&error); - } - - explicit InternalError( DBusError* e ) - { - dbus_error_init(&error); - dbus_move_error(e, &error); - } - - InternalError(const InternalError& ie) - { - dbus_error_init(&error); - dbus_move_error(const_cast<DBusError*>(&(ie.error)), &error); - } - - ~InternalError() - { - dbus_error_free(&error); - } - - operator DBusError*() - { - return &error; - } - - operator bool() - { - return dbus_error_is_set(&error); - } -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_INTERNALERROR_H diff --git a/libs/dbus/src/introspection.cpp b/libs/dbus/src/introspection.cpp deleted file mode 100644 index 7fc7b38c3daf70ea811860f50987ed5509482c43..0000000000000000000000000000000000000000 --- a/libs/dbus/src/introspection.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/introspection.h> -#include <dbus-c++/object.h> -#include <dbus-c++/message.h> - -#include <dbus/dbus.h> - -#include <sstream> - -using namespace DBus; - -static const char* introspectable_name = "org.freedesktop.DBus.Introspectable"; - -IntrospectableAdaptor::IntrospectableAdaptor() -: InterfaceAdaptor(introspectable_name) -{ - register_method(IntrospectableAdaptor, Introspect, Introspect); -} - -Message IntrospectableAdaptor::Introspect( const CallMessage& call ) -{ - debug_log("requested introspection data"); - - std::ostringstream xml; - - xml << DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE; - - const std::string path = object()->path(); - - xml << "<node name=\"" << path << "\">"; - - InterfaceAdaptorTable::const_iterator iti; - - for(iti = _interfaces.begin(); iti != _interfaces.end(); ++iti) - { - debug_log("introspecting interface %s", iti->first.c_str()); - - IntrospectedInterface* const intro = iti->second->introspect(); - if(intro) - { - xml << "<interface name=\"" << intro->name << "\">"; - - for(const IntrospectedProperty* p = intro->properties; p->name; ++p) - { - std::string access; - - if(p->read) access += "read"; - if(p->write) access += "write"; - - xml << "<property name=\"" << p->name << "\"" - << " type=\"" << p->type << "\"" - << " access=\"" << access << "\"/>"; - } - - for(const IntrospectedMethod* m = intro->methods; m->args; ++m) - { - xml << "<method name=\"" << m->name << "\">"; - - for(const IntrospectedArgument* a = m->args; a->type; ++a) - { - xml << "<arg direction=\"" << (a->in ? "in" : "out") << "\"" - << " type=\"" << a->type << "\""; - - if(a->name) xml << " name=\"" << a->name << "\""; - - xml << "/>"; - } - - xml << "</method>"; - } - - for(const IntrospectedMethod* m = intro->signals; m->args; ++m) - { - xml << "<signal name=\"" << m->name << "\">"; - - for(const IntrospectedArgument* a = m->args; a->type; ++a) - { - xml << "<arg type=\"" << a->type << "\""; - - if(a->name) xml << " name=\"" << a->name << "\""; - - xml << "/>"; - } - xml << "</signal>"; - } - - xml << "</interface>"; - } - } - const ObjectAdaptorPList children = ObjectAdaptor::from_path_prefix(path + '/'); - - ObjectAdaptorPList::const_iterator oci; - - for(oci = children.begin(); oci != children.end(); ++oci) - { - std::string name = (*oci)->path().substr(path.length()+1); - name.substr(name.find('/')); - - xml << "<node name=\"" << name << "\"/>"; - } - - xml << "</node>"; - - ReturnMessage reply(call); - MessageIter wi = reply.writer(); - wi.append_string(xml.str().c_str()); - return reply; -} - -IntrospectedInterface* const IntrospectableAdaptor::introspect() const -{ - static IntrospectedArgument Introspect_args[] = - { - { "data", "s", false }, - { 0, 0, 0 } - }; - static IntrospectedMethod Introspectable_methods[] = - { - { "Introspect", Introspect_args }, - { 0, 0 } - }; - static IntrospectedMethod Introspectable_signals[] = - { - { 0, 0 } - }; - static IntrospectedProperty Introspectable_properties[] = - { - { 0, 0, 0, 0 } - }; - static IntrospectedInterface Introspectable_interface = - { - introspectable_name, - Introspectable_methods, - Introspectable_signals, - Introspectable_properties - }; - return &Introspectable_interface; -} - -IntrospectableProxy::IntrospectableProxy() -: InterfaceProxy(introspectable_name) -{} - -std::string IntrospectableProxy::Introspect() -{ - DBus::CallMessage call; - - call.member("Introspect"); - - DBus::Message ret = invoke_method(call); - - DBus::MessageIter ri = ret.reader(); - const char* str = ri.get_string(); - - return str; -} diff --git a/libs/dbus/src/message.cpp b/libs/dbus/src/message.cpp deleted file mode 100644 index 6f6d7af36ad3586a16195f94aa3cfe2fa5049f9d..0000000000000000000000000000000000000000 --- a/libs/dbus/src/message.cpp +++ /dev/null @@ -1,638 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/message.h> - -#include <dbus/dbus.h> - -#include "internalerror.h" -#include "message_p.h" - -using namespace DBus; - -/* -*/ - -int MessageIter::type() -{ - return dbus_message_iter_get_arg_type((DBusMessageIter*)&_iter); -} - -bool MessageIter::at_end() -{ - return type() == DBUS_TYPE_INVALID; -} - -bool MessageIter::has_next() -{ - return dbus_message_iter_has_next((DBusMessageIter*)&_iter); -} - -MessageIter& MessageIter::operator ++() -{ - dbus_message_iter_next((DBusMessageIter*)&_iter); - return (*this); -} - -MessageIter MessageIter::operator ++(int) -{ - MessageIter copy(*this); - ++(*this); - return copy; -} - -bool MessageIter::append_basic( int type_id, void* value ) -{ - return dbus_message_iter_append_basic((DBusMessageIter*)&_iter, type_id, value); -} - -void MessageIter::get_basic( int type_id, void* ptr ) -{ - if(type() != type_id) - throw ErrorInvalidArgs("type mismatch"); - - dbus_message_iter_get_basic((DBusMessageIter*)_iter, ptr); -} - -bool MessageIter::append_byte( unsigned char b ) -{ - return append_basic(DBUS_TYPE_BYTE, &b); -} - -unsigned char MessageIter::get_byte() -{ - unsigned char b; - get_basic(DBUS_TYPE_BYTE, &b); - return b; -} - -bool MessageIter::append_bool( bool b ) -{ - dbus_bool_t db = b; - return append_basic(DBUS_TYPE_BOOLEAN, &db); -} - -bool MessageIter::get_bool() -{ - dbus_bool_t db; - get_basic(DBUS_TYPE_BOOLEAN, &db); - return (bool)db; -} - -bool MessageIter::append_int16( signed short i ) -{ - return append_basic(DBUS_TYPE_INT16, &i); -} - -signed short MessageIter::get_int16() -{ - signed short i; - get_basic(DBUS_TYPE_INT16, &i); - return i; -} - -bool MessageIter::append_uint16( unsigned short u ) -{ - return append_basic(DBUS_TYPE_UINT16, &u); -} - -unsigned short MessageIter::get_uint16() -{ - unsigned short u; - get_basic(DBUS_TYPE_UINT16, &u); - return u; -} - -bool MessageIter::append_int32( signed int i ) -{ - return append_basic(DBUS_TYPE_INT32, &i); -} - -signed int MessageIter::get_int32() -{ - signed int i; - get_basic(DBUS_TYPE_INT32, &i); - return i; -} - -bool MessageIter::append_uint32( unsigned int u ) -{ - return append_basic(DBUS_TYPE_UINT32, &u); -} - -unsigned int MessageIter::get_uint32() -{ - unsigned int u; - get_basic(DBUS_TYPE_UINT32, &u); - return u; -} - -signed long long MessageIter::get_int64() -{ - signed long long i; - get_basic(DBUS_TYPE_INT64, &i); - return i; -} - -bool MessageIter::append_int64( signed long long i ) -{ - return append_basic(DBUS_TYPE_INT64, &i); -} - -unsigned long long MessageIter::get_uint64() -{ - unsigned long long u; - get_basic(DBUS_TYPE_UINT64, &u); - return u; -} - -bool MessageIter::append_uint64( unsigned long long u ) -{ - return append_basic(DBUS_TYPE_UINT64, &u); -} - -double MessageIter::get_double() -{ - double d; - get_basic(DBUS_TYPE_DOUBLE, &d); - return d; -} - -bool MessageIter::append_double( double d ) -{ - return append_basic(DBUS_TYPE_DOUBLE, &d); -} - -bool MessageIter::append_string( const char* chars ) -{ - return append_basic(DBUS_TYPE_STRING, &chars); -} - -const char* MessageIter::get_string() -{ - char* chars; - get_basic(DBUS_TYPE_STRING, &chars); - return chars; -} - -bool MessageIter::append_path( const char* chars ) -{ - return append_basic(DBUS_TYPE_OBJECT_PATH, &chars); -} - -const char* MessageIter::get_path() -{ - char* chars; - get_basic(DBUS_TYPE_OBJECT_PATH, &chars); - return chars; -} - -bool MessageIter::append_signature( const char* chars ) -{ - return append_basic(DBUS_TYPE_SIGNATURE, &chars); -} - -const char* MessageIter::get_signature() -{ - char* chars; - get_basic(DBUS_TYPE_SIGNATURE, &chars); - return chars; -} - -MessageIter MessageIter::recurse() -{ - MessageIter iter(msg()); - dbus_message_iter_recurse((DBusMessageIter*)&_iter, (DBusMessageIter*)&(iter._iter)); - return iter; -} - -char* MessageIter::signature() const -{ - return dbus_message_iter_get_signature((DBusMessageIter*)&_iter); -} - -bool MessageIter::append_array( char type, const void* ptr, size_t length ) -{ - return dbus_message_iter_append_fixed_array((DBusMessageIter*)&_iter, type, &ptr, length); -} - -int MessageIter::array_type() -{ - return dbus_message_iter_get_element_type((DBusMessageIter*)&_iter); -} - -int MessageIter::get_array( void* ptr ) -{ - int length; - dbus_message_iter_get_fixed_array((DBusMessageIter*)&_iter, ptr, &length); - return length; -} - -bool MessageIter::is_array() -{ - return dbus_message_iter_get_arg_type((DBusMessageIter*)&_iter) == DBUS_TYPE_ARRAY; -} - -bool MessageIter::is_dict() -{ - return is_array() && dbus_message_iter_get_element_type((DBusMessageIter*)_iter) == DBUS_TYPE_DICT_ENTRY; -} - -MessageIter MessageIter::new_array( const char* sig ) -{ - MessageIter arr(msg()); - dbus_message_iter_open_container( - (DBusMessageIter*)&_iter, DBUS_TYPE_ARRAY, sig, (DBusMessageIter*)&(arr._iter) - ); - return arr; -} - -MessageIter MessageIter::new_variant( const char* sig ) -{ - MessageIter var(msg()); - dbus_message_iter_open_container( - (DBusMessageIter*)_iter, DBUS_TYPE_VARIANT, sig, (DBusMessageIter*)&(var._iter) - ); - return var; -} - -MessageIter MessageIter::new_struct() -{ - MessageIter stu(msg()); - dbus_message_iter_open_container( - (DBusMessageIter*)_iter, DBUS_TYPE_STRUCT, NULL, (DBusMessageIter*)&(stu._iter) - ); - return stu; -} - -MessageIter MessageIter::new_dict_entry() -{ - MessageIter ent(msg()); - dbus_message_iter_open_container( - (DBusMessageIter*)_iter, DBUS_TYPE_DICT_ENTRY, NULL, (DBusMessageIter*)&(ent._iter) - ); - return ent; -} - -void MessageIter::close_container( MessageIter& container ) -{ - dbus_message_iter_close_container((DBusMessageIter*)&_iter, (DBusMessageIter*)&(container._iter)); -} - -static bool is_basic_type(int typecode) -{ - switch(typecode) - { - case 'y': - case 'b': - case 'n': - case 'q': - case 'i': - case 'u': - case 'x': - case 't': - case 'd': - case 's': - case 'o': - case 'g': - return true; - default: - return false; - } -} - -void MessageIter::copy_data( MessageIter& to ) -{ - for(MessageIter& from = *this; !from.at_end(); ++from) - { - if(is_basic_type(from.type())) - { - debug_log("copying basic type: %c", from.type()); - - unsigned char value[8]; - from.get_basic(from.type(), &value); - to.append_basic(from.type(), &value); - } - else - { - MessageIter from_container = from.recurse(); - char* sig = from_container.signature(); - - debug_log("copying compound type: %c[%s]", from.type(), sig); - - MessageIter to_container (to.msg()); - dbus_message_iter_open_container - ( - (DBusMessageIter*)&(to._iter), - from.type(), - from.type() == DBUS_TYPE_VARIANT ? NULL : sig, - (DBusMessageIter*)&(to_container._iter) - ); - - from_container.copy_data(to_container); - to.close_container(to_container); - free(sig); - } - } -} - -/* -*/ - -Message::Message() -: _pvt(new Private) -{ -} - -Message::Message( Message::Private* p, bool incref ) -: _pvt(p) -{ - if(_pvt->msg && incref) dbus_message_ref(_pvt->msg); -} - -Message::Message( const Message& m ) -: _pvt(m._pvt) -{ - dbus_message_ref(_pvt->msg); -} - -Message::~Message() -{ - dbus_message_unref(_pvt->msg); -} - -Message& Message::operator = ( const Message& m ) -{ - if(&m != this) - { - dbus_message_unref(_pvt->msg); - _pvt = m._pvt; - dbus_message_ref(_pvt->msg); - } - return *this; -} - -Message Message::copy() -{ - Private* pvt = new Private(dbus_message_copy(_pvt->msg)); - return Message(pvt); -} - -bool Message::append( int first_type, ... ) -{ - va_list vl; - va_start(vl, first_type); - - bool b = dbus_message_append_args_valist(_pvt->msg, first_type, vl); - - va_end(vl); - return b; -} - -void Message::terminate() -{ - dbus_message_append_args(_pvt->msg, DBUS_TYPE_INVALID); -} - -int Message::type() const -{ - return dbus_message_get_type(_pvt->msg); -} - -int Message::serial() const -{ - return dbus_message_get_serial(_pvt->msg); -} - -int Message::reply_serial() const -{ - return dbus_message_get_reply_serial(_pvt->msg); -} - -bool Message::reply_serial( int s ) -{ - return dbus_message_set_reply_serial(_pvt->msg, s); -} - -const char* Message::sender() const -{ - return dbus_message_get_sender(_pvt->msg); -} - -bool Message::sender( const char* s ) -{ - return dbus_message_set_sender(_pvt->msg, s); -} - -const char* Message::destination() const -{ - return dbus_message_get_destination(_pvt->msg); -} - -bool Message::destination( const char* s ) -{ - return dbus_message_set_destination(_pvt->msg, s); -} - -bool Message::is_error() const -{ - return type() == DBUS_MESSAGE_TYPE_ERROR; -} - -bool Message::is_signal( const char* interface, const char* member ) const -{ - return dbus_message_is_signal(_pvt->msg, interface, member); -} - -MessageIter Message::writer() -{ - MessageIter iter(*this); - dbus_message_iter_init_append(_pvt->msg, (DBusMessageIter*)&(iter._iter)); - return iter; -} - -MessageIter Message::reader() const -{ - MessageIter iter(const_cast<Message&>(*this)); - dbus_message_iter_init(_pvt->msg, (DBusMessageIter*)&(iter._iter)); - return iter; -} - -/* -*/ - -ErrorMessage::ErrorMessage() -{ - _pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_ERROR); -} - -ErrorMessage::ErrorMessage( const Message& to_reply, const char* name, const char* message ) -{ - _pvt->msg = dbus_message_new_error(to_reply._pvt->msg, name, message); -} - -bool ErrorMessage::operator == ( const ErrorMessage& m ) const -{ - return dbus_message_is_error(_pvt->msg, m.name()); -} - -const char* ErrorMessage::name() const -{ - return dbus_message_get_error_name(_pvt->msg); -} - -bool ErrorMessage::name( const char* n ) -{ - return dbus_message_set_error_name(_pvt->msg, n); -} - -/* -*/ - -SignalMessage::SignalMessage( const char* name ) -{ - _pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_SIGNAL); - member(name); -} - -SignalMessage::SignalMessage( const char* path, const char* interface, const char* name ) -{ - _pvt->msg = dbus_message_new_signal(path, interface, name); -} - -bool SignalMessage::operator == ( const SignalMessage& m ) const -{ - return dbus_message_is_signal(_pvt->msg, m.interface(), m.member()); -} - -const char* SignalMessage::interface() const -{ - return dbus_message_get_interface(_pvt->msg); -} - -bool SignalMessage::interface( const char* i ) -{ - return dbus_message_set_interface(_pvt->msg, i); -} - -const char* SignalMessage::member() const -{ - return dbus_message_get_member(_pvt->msg); -} - -bool SignalMessage::member( const char* m ) -{ - return dbus_message_set_member(_pvt->msg, m); -} - -const char* SignalMessage::path() const -{ - return dbus_message_get_path(_pvt->msg); -} - -char** SignalMessage::path_split() const -{ - char** p; - dbus_message_get_path_decomposed(_pvt->msg, &p); //todo: return as a std::vector ? - return p; -} - -bool SignalMessage::path( const char* p ) -{ - return dbus_message_set_path(_pvt->msg, p); -} - -/* -*/ - -CallMessage::CallMessage() -{ - _pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL); -} - -CallMessage::CallMessage( const char* dest, const char* path, const char* iface, const char* method ) -{ - _pvt->msg = dbus_message_new_method_call(dest, path, iface, method); -} - -bool CallMessage::operator == ( const CallMessage& m ) const -{ - return dbus_message_is_method_call(_pvt->msg, m.interface(), m.member()); -} - -const char* CallMessage::interface() const -{ - return dbus_message_get_interface(_pvt->msg); -} - -bool CallMessage::interface( const char* i ) -{ - return dbus_message_set_interface(_pvt->msg, i); -} - -const char* CallMessage::member() const -{ - return dbus_message_get_member(_pvt->msg); -} - -bool CallMessage::member( const char* m ) -{ - return dbus_message_set_member(_pvt->msg, m); -} - -const char* CallMessage::path() const -{ - return dbus_message_get_path(_pvt->msg); -} - -char** CallMessage::path_split() const -{ - char** p; - dbus_message_get_path_decomposed(_pvt->msg, &p); - return p; -} - -bool CallMessage::path( const char* p ) -{ - return dbus_message_set_path(_pvt->msg, p); -} - -const char* CallMessage::signature() const -{ - return dbus_message_get_signature(_pvt->msg); -} - -/* -*/ - -ReturnMessage::ReturnMessage( const CallMessage& callee ) -{ - _pvt = new Private(dbus_message_new_method_return(callee._pvt->msg)); -} - -const char* ReturnMessage::signature() const -{ - return dbus_message_get_signature(_pvt->msg); -} - diff --git a/libs/dbus/src/message_p.h b/libs/dbus/src/message_p.h deleted file mode 100644 index c080d01918a29fea758d40d64ab1066751e518a1..0000000000000000000000000000000000000000 --- a/libs/dbus/src/message_p.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_MESSAGE_P_H -#define __DBUSXX_MESSAGE_P_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/message.h> -#include <dbus-c++/refptr_impl.h> - -#include <dbus/dbus.h> - -namespace DBus { - -struct DXXAPILOCAL Message::Private -{ - DBusMessage* msg; - - Private() : msg(0) - {} - - Private( DBusMessage* m ) : msg(m) - {} -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_MESSAGE_P_H diff --git a/libs/dbus/src/object.cpp b/libs/dbus/src/object.cpp deleted file mode 100644 index 8f9b8dfc1de52748e484d9f38efb56cd2a5a36bd..0000000000000000000000000000000000000000 --- a/libs/dbus/src/object.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/debug.h> -#include <dbus-c++/object.h> -#include "internalerror.h" - -#include <map> -#include <dbus/dbus.h> - -#include "message_p.h" -#include "server_p.h" -#include "connection_p.h" - -using namespace DBus; - -Object::Object( Connection& conn, const Path& path, const char* service ) -: _conn(conn), _path(path), _service(service ? service : "") -{ -} - -Object::~Object() -{ -} - -struct ObjectAdaptor::Private -{ - static void unregister_function_stub( DBusConnection*, void* ); - static DBusHandlerResult message_function_stub( DBusConnection*, DBusMessage*, void* ); -}; - -static DBusObjectPathVTable _vtable = -{ - ObjectAdaptor::Private::unregister_function_stub, - ObjectAdaptor::Private::message_function_stub, - NULL, NULL, NULL, NULL -}; - -void ObjectAdaptor::Private::unregister_function_stub( DBusConnection* conn, void* data ) -{ - //TODO: what do we have to do here ? -} - -DBusHandlerResult ObjectAdaptor::Private::message_function_stub( DBusConnection*, DBusMessage* dmsg, void* data ) -{ - ObjectAdaptor* o = static_cast<ObjectAdaptor*>(data); - - if( o ) - { - Message msg(new Message::Private(dmsg)); - - debug_log("in object %s", o->path().c_str()); - debug_log(" got message #%d from %s to %s", - msg.serial(), - msg.sender(), - msg.destination() - ); - - return o->handle_message(msg) - ? DBUS_HANDLER_RESULT_HANDLED - : DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - else - { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } -} - -typedef std::map<Path, ObjectAdaptor*> ObjectAdaptorTable; -static ObjectAdaptorTable _adaptor_table; - -ObjectAdaptor* ObjectAdaptor::from_path( const Path& path ) -{ - ObjectAdaptorTable::iterator ati = _adaptor_table.find(path); - - if(ati != _adaptor_table.end()) - return ati->second; - - return NULL; -} - -ObjectAdaptorPList ObjectAdaptor::from_path_prefix( const std::string& prefix ) -{ - ObjectAdaptorPList ali; - - ObjectAdaptorTable::iterator ati = _adaptor_table.begin(); - - size_t plen = prefix.length(); - - while(ati != _adaptor_table.end()) - { - if(!strncmp(ati->second->path().c_str(), prefix.c_str(), plen)) - ali.push_back(ati->second); - - ++ati; - } - - return ali; -} - -ObjectAdaptor::ObjectAdaptor( Connection& conn, const Path& path ) -: Object(conn, path, conn.unique_name()) -{ - register_obj(); -} - -ObjectAdaptor::~ObjectAdaptor() -{ - unregister_obj(); -} - -void ObjectAdaptor::register_obj() -{ - debug_log("registering local object %s", path().c_str()); - - if(!dbus_connection_register_object_path(conn()._pvt->conn, path().c_str(), &_vtable, this)) - { - throw ErrorNoMemory("unable to register object path"); - } - else - { - InterfaceAdaptorTable::const_iterator ii = _interfaces.begin(); - while( ii != _interfaces.end() ) - { - std::string im = "type='method_call',interface='"+ii->first+"',path='"+path()+"'"; - conn().add_match(im.c_str()); - ++ii; - } - } - - _adaptor_table[path()] = this; -} - -void ObjectAdaptor::unregister_obj() -{ - _adaptor_table.erase(path()); - - debug_log("unregistering local object %s", path().c_str()); - - dbus_connection_unregister_object_path(conn()._pvt->conn, path().c_str()); - - InterfaceAdaptorTable::const_iterator ii = _interfaces.begin(); - while( ii != _interfaces.end() ) - { - std::string im = "type='method_call',interface='"+ii->first+"',path='"+path()+"'"; - conn().remove_match(im.c_str()); - ++ii; - } -} - -void ObjectAdaptor::_emit_signal( SignalMessage& sig ) -{ - sig.path(path().c_str()); - - conn().send(sig); -} - -struct ReturnLaterError -{ - const Tag* tag; -}; - -bool ObjectAdaptor::handle_message( const Message& msg ) -{ - switch( msg.type() ) - { - case DBUS_MESSAGE_TYPE_METHOD_CALL: - { - const CallMessage& cmsg = reinterpret_cast<const CallMessage&>(msg); - const char* member = cmsg.member(); - const char* interface = cmsg.interface(); - - debug_log(" invoking method %s.%s", interface, member); - - InterfaceAdaptor* ii = find_interface(interface); - if( ii ) - { - try - { - Message ret = ii->dispatch_method(cmsg); - conn().send(ret); - } - catch(Error& e) - { - ErrorMessage em(cmsg, e.name(), e.message()); - conn().send(em); - } - catch(ReturnLaterError& rle) - { - _continuations[rle.tag] = new Continuation(conn(), cmsg, rle.tag); - } - return true; - } - else - { - return false; - } - } - default: - { - return false; - } - } -} - -void ObjectAdaptor::return_later( const Tag* tag ) -{ - ReturnLaterError rle = { tag }; - throw rle; -} - -void ObjectAdaptor::return_now( Continuation* ret ) -{ - ret->_conn.send(ret->_return); - - ContinuationMap::iterator di = _continuations.find(ret->_tag); - - delete di->second; - - _continuations.erase(di); -} - -void ObjectAdaptor::return_error( Continuation* ret, const Error error ) -{ - ret->_conn.send(ErrorMessage(ret->_call, error.name(), error.message())); - - ContinuationMap::iterator di = _continuations.find(ret->_tag); - - delete di->second; - - _continuations.erase(di); -} - -ObjectAdaptor::Continuation* ObjectAdaptor::find_continuation( const Tag* tag ) -{ - ContinuationMap::iterator di = _continuations.find(tag); - - return di != _continuations.end() ? di->second : NULL; -} - -ObjectAdaptor::Continuation::Continuation( Connection& conn, const CallMessage& call, const Tag* tag ) -: _conn(conn), _call(call), _return(_call), _tag(tag) -{ - _writer = _return.writer(); //todo: verify -} - -/* -*/ - -ObjectProxy::ObjectProxy( Connection& conn, const Path& path, const char* service ) -: Object(conn, path, service) -{ - register_obj(); -} - -ObjectProxy::~ObjectProxy() -{ - unregister_obj(); -} - -void ObjectProxy::register_obj() -{ - debug_log("registering remote object %s", path().c_str()); - - _filtered = new Callback<ObjectProxy, bool, const Message&>(this, &ObjectProxy::handle_message); - - conn().add_filter(_filtered); - - InterfaceProxyTable::const_iterator ii = _interfaces.begin(); - while( ii != _interfaces.end() ) - { - std::string im = "type='signal',interface='"+ii->first+"',path='"+path()+"'"; - conn().add_match(im.c_str()); - ++ii; - } -} - -void ObjectProxy::unregister_obj() -{ - debug_log("unregistering remote object %s", path().c_str()); - - InterfaceProxyTable::const_iterator ii = _interfaces.begin(); - while( ii != _interfaces.end() ) - { - std::string im = "type='signal',interface='"+ii->first+"',path='"+path()+"'"; - conn().remove_match(im.c_str()); - ++ii; - } - conn().remove_filter(_filtered); -} - -Message ObjectProxy::_invoke_method( CallMessage& call ) -{ - call.path(path().c_str()); - call.destination(service().c_str()); - - return conn().send_blocking(call, 2000); -} - -bool ObjectProxy::handle_message( const Message& msg ) -{ - switch( msg.type() ) - { - case DBUS_MESSAGE_TYPE_SIGNAL: - { - const SignalMessage& smsg = reinterpret_cast<const SignalMessage&>(msg); - const char* interface = smsg.interface(); - const char* member = smsg.member(); - const char* objpath = smsg.path(); - - if( objpath != path() ) return false; - - debug_log("filtered signal %s(in %s) from %s to object %s", - member, interface, msg.sender(), objpath); - - InterfaceProxy* ii = find_interface(interface); - if( ii ) - { - return ii->dispatch_signal(smsg); - } - else - { - return false; - } - } - default: - { - return false; - } - } -} diff --git a/libs/dbus/src/pendingcall.cpp b/libs/dbus/src/pendingcall.cpp deleted file mode 100644 index 4696983f20f53023d687d56ae5dd2c2aa316d0f6..0000000000000000000000000000000000000000 --- a/libs/dbus/src/pendingcall.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/pendingcall.h> - -#include <dbus/dbus.h> - -#include "internalerror.h" -#include "pendingcall_p.h" -#include "message_p.h" - -using namespace DBus; - -PendingCall::Private::Private( DBusPendingCall* dpc ) -: call(dpc), dataslot(-1) -{ - if(!dbus_pending_call_allocate_data_slot(&dataslot)) - { - throw ErrorNoMemory("Unable to allocate data slot"); - } -} - -PendingCall::Private::~Private() -{ - if(dataslot != -1) - { - dbus_pending_call_allocate_data_slot(&dataslot); - } -} - -void PendingCall::Private::notify_stub( DBusPendingCall* dpc, void* data ) -{ - PendingCall::Private* pvt = static_cast<PendingCall::Private*>(data); - - PendingCall pc(pvt); - pvt->slot(pc); -} - -PendingCall::PendingCall( PendingCall::Private* p ) -: _pvt(p) -{ - if(!dbus_pending_call_set_notify(_pvt->call, Private::notify_stub, p, NULL)) - { - throw ErrorNoMemory("Unable to initialize pending call"); - } -} - -PendingCall::PendingCall( const PendingCall& c ) -: _pvt(c._pvt) -{ - dbus_pending_call_ref(_pvt->call); -} - -PendingCall::~PendingCall() -{ - dbus_pending_call_unref(_pvt->call); -} - -PendingCall& PendingCall::operator = ( const PendingCall& c ) -{ - if(&c != this) - { - dbus_pending_call_unref(_pvt->call); - _pvt = c._pvt; - dbus_pending_call_ref(_pvt->call); - } - return *this; -} - -bool PendingCall::completed() -{ - return dbus_pending_call_get_completed(_pvt->call); -} - -void PendingCall::cancel() -{ - dbus_pending_call_cancel(_pvt->call); -} - -void PendingCall::block() -{ - dbus_pending_call_block(_pvt->call); -} - -void PendingCall::data( void* p ) -{ - if(!dbus_pending_call_set_data(_pvt->call, _pvt->dataslot, p, NULL)) - { - throw ErrorNoMemory("Unable to initialize data slot"); - } -} - -void* PendingCall::data() -{ - return dbus_pending_call_get_data(_pvt->call, _pvt->dataslot); -} - -Slot<void, PendingCall&>& PendingCall::slot() -{ - return _pvt->slot; -} - -Message PendingCall::steal_reply() -{ - DBusMessage* dmsg = dbus_pending_call_steal_reply(_pvt->call); - if(!dmsg) - { - dbus_bool_t callComplete = dbus_pending_call_get_completed(_pvt->call); - - if(callComplete) - throw ErrorNoReply("No reply available"); - else - throw ErrorNoReply("Call not complete"); - } - - return Message( new Message::Private(dmsg) ); -} - diff --git a/libs/dbus/src/pendingcall_p.h b/libs/dbus/src/pendingcall_p.h deleted file mode 100644 index 0c5e7bc44917e09108add29b6854cfea2208da79..0000000000000000000000000000000000000000 --- a/libs/dbus/src/pendingcall_p.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_PENDING_CALL_P_H -#define __DBUSXX_PENDING_CALL_P_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/pendingcall.h> -#include <dbus-c++/refptr_impl.h> - -#include <dbus/dbus.h> - -namespace DBus { - -struct DXXAPILOCAL PendingCall::Private -{ - DBusPendingCall* call; - int dataslot; - Slot<void, PendingCall&> slot; - - Private( DBusPendingCall* ); - - ~Private(); - - static void notify_stub( DBusPendingCall* dpc, void* data ); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_PENDING_CALL_P_H diff --git a/libs/dbus/src/property.cpp b/libs/dbus/src/property.cpp deleted file mode 100644 index bd196cd9b04311e041857f973f83025bd9a84f94..0000000000000000000000000000000000000000 --- a/libs/dbus/src/property.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include <dbus-c++/debug.h> -#include <dbus-c++/property.h> - -#include <dbus-c++/introspection.h> - -using namespace DBus; - -static const char* properties_name = "org.freedesktop.DBus.Properties"; - -PropertiesAdaptor::PropertiesAdaptor() -: InterfaceAdaptor(properties_name) -{ - register_method(PropertiesAdaptor, Get, Get); - register_method(PropertiesAdaptor, Set, Set); -} - -Message PropertiesAdaptor::Get( const CallMessage& call ) -{ - MessageIter ri = call.reader(); - - String iface_name; - String property_name; - - ri >> iface_name >> property_name; - - debug_log("requesting property %s on interface %s", property_name.c_str(), iface_name.c_str()); - - InterfaceAdaptor* interface = (InterfaceAdaptor*) find_interface(iface_name); - - if(!interface) - throw ErrorFailed("requested interface not found"); - - Variant* value = interface->get_property(property_name); - - if(!value) - throw ErrorFailed("requested property not found"); - - on_get_property(*interface, property_name, *value); - - ReturnMessage reply(call); - - MessageIter wi = reply.writer(); - - wi << *value; - return reply; -} - -Message PropertiesAdaptor::Set( const CallMessage& call ) -{ - MessageIter ri = call.reader(); - - String iface_name; - String property_name; - Variant value; - - ri >> iface_name >> property_name >> value; - - InterfaceAdaptor* interface = (InterfaceAdaptor*) find_interface(iface_name); - - if(!interface) - throw ErrorFailed("requested interface not found"); - - on_set_property(*interface, property_name, value); - - interface->set_property(property_name, value); - - ReturnMessage reply(call); - - return reply; -} - -IntrospectedInterface* const PropertiesAdaptor::introspect() const -{ - static IntrospectedArgument Get_args[] = - { - { "interface_name", "s", true }, - { "property_name", "s", true }, - { "value", "v", false }, - { 0, 0, 0 } - }; - static IntrospectedArgument Set_args[] = - { - { "interface_name", "s", true }, - { "property_name", "s", true }, - { "value", "v", true }, - { 0, 0, 0 } - }; - static IntrospectedMethod Properties_methods[] = - { - { "Get", Get_args }, - { "Set", Set_args }, - { 0, 0 } - }; - static IntrospectedMethod Properties_signals[] = - { - { 0, 0 } - }; - static IntrospectedProperty Properties_properties[] = - { - { 0, 0, 0, 0 } - }; - static IntrospectedInterface Properties_interface = - { - properties_name, - Properties_methods, - Properties_signals, - Properties_properties - }; - return &Properties_interface; -} - -PropertiesProxy::PropertiesProxy() -: InterfaceProxy(properties_name) -{ -} - -Variant PropertiesProxy::Get( const String& iface, const String& property ) -{ -//todo - Variant v; - return v; -} - -void PropertiesProxy::Set( const String& iface, const String& property, const Variant& value ) -{ -//todo -} - diff --git a/libs/dbus/src/server.cpp b/libs/dbus/src/server.cpp deleted file mode 100644 index b45845d19f4f315524aa8deb917e1dfe6ccd3f57..0000000000000000000000000000000000000000 --- a/libs/dbus/src/server.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/debug.h> -#include <dbus-c++/server.h> - -#include "internalerror.h" -#include "server_p.h" -#include "connection_p.h" -#include "dispatcher_p.h" - -using namespace DBus; - -Server::Private::Private( DBusServer* s ) -: server(s) -{ -} - -Server::Private::~Private() -{ -} - -void Server::Private::on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data ) -{ - Server* s = static_cast<Server*>(data); - - Connection nc (new Connection::Private(conn, s->_pvt.get())); - - s->_pvt->connections.push_back(nc); - - s->on_new_connection(nc); - - debug_log("incoming connection 0x%08x", conn); -} - -Server::Server( const char* address ) -{ - InternalError e; - DBusServer* server = dbus_server_listen(address, e); - - if(e) throw Error(e); - - debug_log("server 0x%08x listening on %s", server, address); - - _pvt = new Private(server); - - dbus_server_set_new_connection_function(_pvt->server, Private::on_new_conn_cb, this, NULL); - - setup(default_dispatcher); -} -/* -Server::Server( const Server& s ) -: _pvt(s._pvt) -{ - dbus_server_ref(_pvt->server); -} -*/ -Server::~Server() -{ - dbus_server_unref(_pvt->server); -} - -Dispatcher* Server::setup( Dispatcher* dispatcher ) -{ - debug_log("registering stubs for server %p", _pvt->server); - - Dispatcher* prev = _pvt->dispatcher; - - dbus_server_set_watch_functions( - _pvt->server, - Dispatcher::Private::on_add_watch, - Dispatcher::Private::on_rem_watch, - Dispatcher::Private::on_toggle_watch, - dispatcher, - 0 - ); - - dbus_server_set_timeout_functions( - _pvt->server, - Dispatcher::Private::on_add_timeout, - Dispatcher::Private::on_rem_timeout, - Dispatcher::Private::on_toggle_timeout, - dispatcher, - 0 - ); - - _pvt->dispatcher = dispatcher; - - return prev; -} - -bool Server::operator == ( const Server& s ) const -{ - return _pvt->server == s._pvt->server; -} - -bool Server::listening() const -{ - return dbus_server_get_is_connected(_pvt->server); -} -void Server::disconnect() -{ - dbus_server_disconnect(_pvt->server); -} - diff --git a/libs/dbus/src/server_p.h b/libs/dbus/src/server_p.h deleted file mode 100644 index 7eb460884c874fe4e6d862166befc3943fa82298..0000000000000000000000000000000000000000 --- a/libs/dbus/src/server_p.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_SERVER_P_H -#define __DBUSXX_SERVER_P_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/server.h> -#include <dbus-c++/dispatcher.h> -#include <dbus-c++/refptr_impl.h> - -#include <dbus/dbus.h> - -namespace DBus { - -struct DXXAPILOCAL Server::Private -{ - DBusServer* server; - - Dispatcher* dispatcher; - - ConnectionList connections; - - Private( DBusServer* ); - - ~Private(); - - static void on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data ); -}; - -} /* namespace DBus */ - -#endif//__DBUSXX_SERVER_P_H diff --git a/libs/dbus/src/types.cpp b/libs/dbus/src/types.cpp deleted file mode 100644 index fc85fa51a7704c9378ffa9d11c0b8b07b1a3b7da..0000000000000000000000000000000000000000 --- a/libs/dbus/src/types.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include <dbus-c++/types.h> -#include <dbus-c++/object.h> -#include <dbus/dbus.h> -#include <stdarg.h> - -#include "message_p.h" -#include "internalerror.h" - -using namespace DBus; - -Variant::Variant() -: _msg(CallMessage()) // dummy message used as temporary storage for variant data -{ -} - -Variant::Variant( MessageIter& it ) -: _msg(CallMessage()) -{ - MessageIter vi = it.recurse(); - MessageIter mi = _msg.writer(); - vi.copy_data(mi); -} - -Variant& Variant::operator = ( const Variant& v ) -{ - if(&v != this) - { - _msg = v._msg; - } - return *this; -} - -void Variant::clear() -{ - CallMessage empty; - _msg = empty; -} - -const Signature Variant::signature() const -{ - char* sigbuf = reader().signature(); - - Signature signature = sigbuf; - - free(sigbuf); - - return signature; -} - -MessageIter& operator << ( MessageIter& iter, const Variant& val ) -{ - const Signature sig = val.signature(); - - MessageIter rit = val.reader(); - MessageIter wit = iter.new_variant(sig.c_str()); - - rit.copy_data(wit); - - iter.close_container(wit); - - return iter; -} - -MessageIter& operator >> ( MessageIter& iter, Variant& val ) -{ - if(iter.type() != DBUS_TYPE_VARIANT) - throw ErrorInvalidArgs("variant type expected"); - - val.clear(); - - MessageIter vit = iter.recurse(); - MessageIter mit = val.writer(); - - vit.copy_data(mit); - - return ++iter; -} - diff --git a/libs/dbus/tools/Makefile.am b/libs/dbus/tools/Makefile.am deleted file mode 100644 index d6044a102a3985a514b13f4e8bb1e14ceb608945..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# hacky, but ... - -CXX = $(CXX_FOR_BUILD) - -AM_CPPFLAGS = \ - $(dbus_CFLAGS) \ - $(xml_CFLAGS) \ - -I$(top_srcdir)/include - -if CROSS_COMPILING -libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la -else -libdbus_cxx_la = $(top_builddir)/src/libdbus-c++-1.la -endif - -bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect - -dbusxx_xml2cpp_SOURCES = xml.h xml.cpp xml2cpp.h xml2cpp.cpp -dbusxx_xml2cpp_LDADD = $(libdbus_cxx_la) $(xml_LIBS) - -dbusxx_introspect_SOURCES = introspect.h introspect.cpp -dbusxx_introspect_LDADD = $(libdbus_cxx_la) - -MAINTAINERCLEANFILES = \ - Makefile.in diff --git a/libs/dbus/tools/introspect.cpp b/libs/dbus/tools/introspect.cpp deleted file mode 100644 index dcbf1f3dfd3485b2952ea1c1531af138b55070a0..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/introspect.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include <signal.h> -#include <unistd.h> -#include <iostream> -#include "introspect.h" - -DBus::BusDispatcher dispatcher; -static bool systembus; -static char* path; -static char* service; - -void niam( int sig ) -{ - DBus::Connection conn = systembus ? DBus::Connection::SystemBus() : DBus::Connection::SessionBus(); - - IntrospectedObject io(conn, path, service); - - std::cout << io.Introspect(); - - dispatcher.leave(); -} - -int main( int argc, char** argv ) -{ - signal(SIGTERM, niam); - signal(SIGINT, niam); - signal(SIGALRM, niam); - - if(argc == 1) - { - std::cerr << std::endl << "Usage: " << argv[0] << " [--system] <object_path> [<destination>]" << std::endl << std::endl; - } - else - { - if(strcmp(argv[1], "--system")) - { - systembus = false; - path = argv[1]; - service = argc > 2 ? argv[2] : 0; - } - else - { - systembus = true; - path = argv[2]; - service = argc > 3 ? argv[3] : 0; - } - - DBus::default_dispatcher = &dispatcher; - - alarm(1); - - dispatcher.enter(); - } - - return 0; -} diff --git a/libs/dbus/tools/introspect.h b/libs/dbus/tools/introspect.h deleted file mode 100644 index 36336115a4748fddf94e9cc87f0fe46074595c67..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/introspect.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_TOOLS_INTROSPECT_H -#define __DBUSXX_TOOLS_INTROSPECT_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/dbus.h> -#include <string> - -class IntrospectedObject : public DBus::IntrospectableProxy, public DBus::ObjectProxy -{ -public: - - IntrospectedObject( DBus::Connection& conn, const char* path, const char* service ) - : DBus::ObjectProxy(conn, path, service) - {} -}; - -#endif//__DBUSXX_TOOLS_INTROSPECT_H diff --git a/libs/dbus/tools/xml.cpp b/libs/dbus/tools/xml.cpp deleted file mode 100644 index 69b403e7bfaff49a9d8461babecb1cc3de785c10..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/xml.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include "xml.h" - -#include <dbus-c++/debug.h> - -#include <expat.h> - -std::istream& operator >> ( std::istream& in, DBus::Xml::Document& doc ) -{ - std::stringbuf xmlbuf; - in.get(xmlbuf, '\0'); - doc.from_xml(xmlbuf.str()); - - return in; -} - -std::ostream& operator << ( std::ostream& out, const DBus::Xml::Document& doc ) -{ - return out << doc.to_xml(); -} - -using namespace DBus; -using namespace DBus::Xml; - -Error::Error( const char* error, int line, int column ) -{ - std::ostringstream estream; - - estream << "line " << line << ", column " << column << ": " << error; - - _error = estream.str(); -} - -Node::Node( const char* n, const char** a ) -: name(n) -{ - if(a) - for(int i = 0; a[i]; i += 2) - { - _attrs[a[i]] = a[i+1]; - - //debug_log("xml:\t%s = %s", a[i], a[i+1]); - } -} - -Nodes Nodes::operator[]( const std::string& key ) -{ - Nodes result; - - for(iterator i = begin(); i != end(); ++i) - { - Nodes part = (**i)[key]; - - result.insert(result.end(), part.begin(), part.end()); - } - return result; -} - -Nodes Nodes::select( const std::string& attr, const std::string& value ) -{ - Nodes result; - - for(iterator i = begin(); i != end(); ++i) - { - if((*i)->get(attr) == value) - result.insert(result.end(), *i); - } - return result; -} - -Nodes Node::operator[]( const std::string& key ) -{ - Nodes result; - - if(key.length() == 0) return result; - - for(Children::iterator i = children.begin(); i != children.end(); ++i) - { - if(i->name == key) - result.push_back(&(*i)); - } - return result; -} - -std::string Node::get( const std::string& attribute ) -{ - if(_attrs.find(attribute) != _attrs.end()) - return _attrs[attribute]; - else - return ""; -} - -void Node::set( const std::string& attribute, std::string value ) -{ - if(value.length()) - _attrs[attribute] = value; - else - _attrs.erase(value); -} - -std::string Node::to_xml() const -{ - std::string xml; - int depth = 0; - - _raw_xml(xml, depth); - - return xml; -} - -void Node::_raw_xml( std::string& xml, int& depth ) const -{ - xml.append(depth*2, ' '); - xml.append("<"+name); - - for(Attributes::const_iterator i = _attrs.begin(); i != _attrs.end(); ++i) - { - xml.append(" "+i->first+"=\""+i->second+"\""); - } - - if(cdata.length() == 0 && children.size() == 0) - { - xml.append("/>\n"); - } - else - { - xml.append(">"); - - if(cdata.length()) - { - xml.append(cdata); - } - - if(children.size()) - { - xml.append("\n"); - depth++; - - for(Children::const_iterator i = children.begin(); i != children.end(); ++i) - { - i->_raw_xml(xml, depth); - } - - depth--; - xml.append(depth*2, ' '); - } - xml.append("</"+name+">\n"); - } -} - -Document::Document() -: root(0), _depth(0) -{ -} - -Document::Document( const std::string& xml ) -: root(0), _depth(0) -{ - from_xml(xml); -} - -Document::~Document() -{ - delete root; -} - -struct Document::Expat -{ - static void start_doctype_decl_handler( - void* data, const XML_Char* name, const XML_Char* sysid, const XML_Char* pubid, int has_internal_subset - ); - static void end_doctype_decl_handler( void* data ); - static void start_element_handler( void *data, const XML_Char *name, const XML_Char **atts ); - static void character_data_handler( void *data, const XML_Char* chars, int len ); - static void end_element_handler( void *data, const XML_Char *name ); -}; - -void Document::from_xml( const std::string& xml ) -{ - _depth = 0; - delete root; - root = 0; - - XML_Parser parser = XML_ParserCreate("UTF-8"); - - XML_SetUserData(parser, this); - - XML_SetDoctypeDeclHandler( - parser, - Document::Expat::start_doctype_decl_handler, - Document::Expat::end_doctype_decl_handler - ); - - XML_SetElementHandler( - parser, - Document::Expat::start_element_handler, - Document::Expat::end_element_handler - ); - - XML_SetCharacterDataHandler( - parser, - Document::Expat::character_data_handler - ); - - XML_Status status = XML_Parse(parser, xml.c_str(), xml.length(), true); - - if(status == XML_STATUS_ERROR) - { - const char* error = XML_ErrorString(XML_GetErrorCode(parser)); - int line = XML_GetCurrentLineNumber(parser); - int column = XML_GetCurrentColumnNumber(parser); - - XML_ParserFree(parser); - - throw Error(error, line, column); - } - else - { - XML_ParserFree(parser); - } -} - -std::string Document::to_xml() const -{ - return root->to_xml(); -} - -void Document::Expat::start_doctype_decl_handler( - void* data, const XML_Char* name, const XML_Char* sysid, const XML_Char* pubid, int has_internal_subset -) -{ -} - -void Document::Expat::end_doctype_decl_handler( void* data ) -{ -} - -void Document::Expat::start_element_handler( void *data, const XML_Char *name, const XML_Char **atts ) -{ - Document* doc = (Document*)data; - - //debug_log("xml:%d -> %s", doc->_depth, name); - - if(!doc->root) - { - doc->root = new Node(name, atts); - } - else - { - Node::Children* cld = &(doc->root->children); - - for(int i = 1; i < doc->_depth; ++i) - { - cld = &(cld->back().children); - } - cld->push_back(Node(name, atts)); - - //std::cerr << doc->to_xml() << std::endl; - } - doc->_depth++; -} - -void Document::Expat::character_data_handler( void *data, const XML_Char* chars, int len ) -{ - Document* doc = (Document*)data; - - Node* nod = doc->root; - - for(int i = 1; i < doc->_depth; ++i) - { - nod = &(nod->children.back()); - } - int x, y; - - x = 0; - y = len-1; - - while(isspace(chars[y]) && y > 0) --y; - while(isspace(chars[x]) && x < y) ++x; - - nod->cdata = std::string(chars, x, y+1); -} - -void Document::Expat::end_element_handler( void *data, const XML_Char *name ) -{ - Document* doc = (Document*)data; - - //debug_log("xml:%d <- %s", doc->_depth, name); - - doc->_depth--; -} - diff --git a/libs/dbus/tools/xml.h b/libs/dbus/tools/xml.h deleted file mode 100644 index 79574c0d1280a06e21d026867abec0962b4ae4f7..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/xml.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_XML_H -#define __DBUSXX_XML_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <exception> -#include <string> -#include <vector> -#include <map> -#include <iostream> -#include <sstream> - -namespace DBus { - -namespace Xml { - -class Error : public std::exception -{ -public: - - Error( const char* error, int line, int column ); - - ~Error() throw() - {} - - const char* what() const throw() - { - return _error.c_str(); - } - -private: - - std::string _error; -}; - -class Node; - -class Nodes : public std::vector<Node*> -{ -public: - - Nodes operator[]( const std::string& key ); - - Nodes select( const std::string& attr, const std::string& value ); -}; - -class Node -{ -public: - - typedef std::map<std::string, std::string> Attributes; - - typedef std::vector<Node> Children; - - std::string name; - std::string cdata; - Children children; - - Node( std::string& n, Attributes& a ) - : name(n), _attrs(a) - {} - - Node( const char* n, const char** a = NULL ); - - Nodes operator[]( const std::string& key ); - - std::string get( const std::string& attribute ); - - void set( const std::string& attribute, std::string value ); - - std::string to_xml() const; - - Node& add( Node child ) - { - children.push_back(child); - return children.back(); - } - -private: - - void _raw_xml( std::string& xml, int& depth ) const; - - Attributes _attrs; -}; - -class Document -{ -public: - - struct Expat; - - Node* root; - - Document(); - - Document( const std::string& xml ); - - ~Document(); - - void from_xml( const std::string& xml ); - - std::string to_xml() const; - -private: - - int _depth; -}; - -} /* namespace Xml */ - -} /* namespace DBus */ - -std::istream& operator >> ( std::istream&, DBus::Xml::Document& ); -std::ostream& operator << ( std::ostream&, DBus::Xml::Document& ); - -#endif//__DBUSXX_XML_H diff --git a/libs/dbus/tools/xml2cpp.cpp b/libs/dbus/tools/xml2cpp.cpp deleted file mode 100644 index 3b38c6c4e609552688e2368bbb18190d947fd3d8..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/xml2cpp.cpp +++ /dev/null @@ -1,973 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#include "xml2cpp.h" - -#include <dbus/dbus.h> - -#include <string> -#include <map> -#include <iostream> -#include <fstream> -#include <sstream> - -using namespace std; -using namespace DBus; - -static const char* tab = " "; - -static const char* header = "\n\ -/*\n\ - * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\ - */\n\ -\n\ -"; - -static const char* dbus_includes = "\n\ -#include <dbus-c++/dbus.h>\n\ -\n\ -"; - -typedef map<string,string> TypeCache; - -void usage( const char* argv0 ) -{ - cerr << endl << "Usage: " << argv0 << " <xmlfile> [ --proxy=<outfile.h> ] [ --adaptor=<outfile.h> ]" - << endl << endl; - exit(-1); -} - -void underscorize( string& str ) -{ - for(unsigned int i = 0; i < str.length(); ++i) - { - if(!isalpha(str[i]) && !isdigit(str[i])) str[i] = '_'; - } -} - -string stub_name( string name ) -{ - underscorize(name); - - return "_" + name + "_stub"; -} - -int char_to_atomic_type( char t ) -{ - if(strchr("ybnqiuxtdsgavre", t)) - return t; - - return DBUS_TYPE_INVALID; -} - -const char* atomic_type_to_string( char t ) -{ - static struct { char type; char* name; } atos[] = - { - { 'y', "::DBus::Byte" }, - { 'b', "::DBus::Bool" }, - { 'n', "::DBus::Int16" }, - { 'q', "::DBus::UInt16" }, - { 'i', "::DBus::Int32" }, - { 'u', "::DBus::UInt32" }, - { 'x', "::DBus::Int64" }, - { 't', "::DBus::UInt64" }, - { 'd', "::DBus::Double" }, - { 's', "::DBus::String" }, - { 'o', "::DBus::Path" }, - { 'g', "::DBus::Signature" }, - { 'v', "::DBus::Variant" }, - { '\0', "" } - }; - int i; - - for(i = 0; atos[i].type; ++i) - { - if(atos[i].type == t) break; - } - return atos[i].name; -} - -bool is_atomic_type( const string& type ) -{ - return type.length() == 1 && char_to_atomic_type(type[0]) != DBUS_TYPE_INVALID; -} - -void _parse_signature( const string& signature, string& type, unsigned int& i ) -{ - for(; i < signature.length(); ++i) - { - switch(signature[i]) - { - case 'a': - { - switch(signature[++i]) - { - case '{': - { - type += "std::map< "; - - const char* atom = atomic_type_to_string(signature[++i]); - if(!atom) - { - cerr << "invalid signature" << endl; - exit(-1); - } - type += atom; - type += ", "; - ++i; - break; - } - default: - { - type += "std::vector< "; - break; - } - } - _parse_signature(signature, type, i); - type += " >"; - continue; - } - case '(': - { - type += "::DBus::Struct< "; - ++i; - _parse_signature(signature, type, i); - type += " >"; - continue; - } - case ')': - case '}': - { - return; - } - default: - { - const char* atom = atomic_type_to_string(signature[i]); - if(!atom) - { - cerr << "invalid signature" << endl; - exit(-1); - } - type += atom; - - if(signature[i+1] != ')' && signature[i+1] != '}' && i+1 < signature.length()) - { - type += ", "; - } - break; - } - } - } -} - -string signature_to_type( const string& signature ) -{ - string type; - unsigned int i = 0; - _parse_signature(signature, type, i); - return type; -} - -void generate_proxy( Xml::Document& doc, const char* filename ) -{ - cerr << "writing " << filename << endl; - - ofstream file(filename); - if(file.bad()) - { - cerr << "unable to write file " << filename << endl; - exit(-1); - } - - file << header; - string filestring = filename; - underscorize(filestring); - - string cond_comp = "__dbusxx__" + filestring + "__PROXY_MARSHAL_H"; - - file << "#ifndef " << cond_comp << endl; - file << "#define " << cond_comp << endl; - - file << dbus_includes; - - Xml::Node& root = *(doc.root); - Xml::Nodes interfaces = root["interface"]; - - for(Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i) - { - Xml::Node& iface = **i; - Xml::Nodes methods = iface["method"]; - Xml::Nodes signals = iface["signal"]; - Xml::Nodes properties = iface["property"]; - Xml::Nodes ms; - ms.insert(ms.end(), methods.begin(), methods.end()); - ms.insert(ms.end(), signals.begin(), signals.end()); - - string ifacename = iface.get("name"); - if(ifacename == "org.freedesktop.DBus.Introspectable" - ||ifacename == "org.freedesktop.DBus.Properties") - { - cerr << "skipping interface " << ifacename << endl; - continue; - } - - istringstream ss(ifacename); - string nspace; - unsigned int nspaces = 0; - - while(ss.str().find('.', ss.tellg()) != string::npos) - { - getline(ss, nspace, '.'); - - file << "namespace " << nspace << " {" << endl; - - ++nspaces; - } - file << endl; - - string ifaceclass; - - getline(ss, ifaceclass); - - cerr << "generating code for interface " << ifacename << "..." << endl; - - file << "class " << ifaceclass << endl - << " : public ::DBus::InterfaceProxy" << endl - << "{" << endl - << "public:" << endl - << endl - << tab << ifaceclass << "()" << endl - << tab << ": ::DBus::InterfaceProxy(\"" << ifacename << "\")" << endl - << tab << "{" << endl; - - for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si) - { - Xml::Node& signal = **si; - - string marshname = "_" + signal.get("name") + "_stub"; - - file << tab << tab << "connect_signal(" - << ifaceclass << ", " << signal.get("name") << ", " << stub_name(signal.get("name")) - << ");" << endl; - } - - file << tab << "}" << endl - << endl; - - file << "public:" << endl - << endl - << tab << "/* methods exported by this interface," << endl - << tab << " * this functions will invoke the corresponding methods on the remote objects" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi) - { - Xml::Node& method = **mi; - Xml::Nodes args = method["arg"]; - Xml::Nodes args_in = args.select("direction","in"); - Xml::Nodes args_out = args.select("direction","out"); - - if(args_out.size() == 0 || args_out.size() > 1 ) - { - file << tab << "void "; - } - else if(args_out.size() == 1) - { - file << tab << signature_to_type(args_out.front()->get("type")) << " "; - } - - file << method.get("name") << "( "; - - unsigned int i = 0; - for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i) - { - Xml::Node& arg = **ai; - file << "const " << signature_to_type(arg.get("type")) << "& "; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << arg_name; - else - file << "argin" << i; - - if((i+1 != args_in.size() || args_out.size() > 1)) - file << ", "; - } - - if(args_out.size() > 1) - { - unsigned int i = 0; - for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i) - { - Xml::Node& arg = **ao; - file << signature_to_type(arg.get("type")) << "&"; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << " " << arg_name; - else - file << " argout" << i; - - if(i+1 != args_out.size()) - file << ", "; - } - } - file << " )" << endl; - - file << tab << "{" << endl - << tab << tab << "::DBus::CallMessage call;" << endl; - - if(args_in.size() > 0) - { - file << tab << tab << "::DBus::MessageIter wi = call.writer();" << endl - << endl; - } - - unsigned int j = 0; - for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++j) - { - Xml::Node& arg = **ai; - string arg_name = arg.get("name"); - if(arg_name.length()) - file << tab << tab << "wi << " << arg_name << ";" << endl; - else - file << tab << tab << "wi << argin" << j << ";" << endl; - } - - file << tab << tab << "call.member(\"" << method.get("name") << "\");" << endl - << tab << tab << "::DBus::Message ret = invoke_method(call);" << endl; - - - if(args_out.size() > 0) - { - file << tab << tab << "::DBus::MessageIter ri = ret.reader();" << endl - << endl; - } - - if(args_out.size() == 1) - { - file << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout;" << endl; - file << tab << tab << "ri >> argout;" << endl; - file << tab << tab << "return argout;" << endl; - } - else if(args_out.size() > 1) - { - unsigned int i = 0; - for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i) - { - Xml::Node& arg = **ao; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << tab << tab << "ri >> " << arg.get("name") << ";" << endl; - else - file << tab << tab << "ri >> argout" << i << ";" << endl; - } - } - - file << tab << "}" << endl - << endl; - } - - file << endl - << "public:" << endl - << endl - << tab << "/* signal handlers for this interface" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si) - { - Xml::Node& signal = **si; - Xml::Nodes args = signal["arg"]; - - file << tab << "virtual void " << signal.get("name") << "( "; - - unsigned int i = 0; - for(Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i) - { - Xml::Node& arg = **ai; - file << "const " << signature_to_type(arg.get("type")) << "& "; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << arg_name; - else - file << "argin" << i; - - if((ai+1 != args.end())) - file << ", "; - } - file << " ) = 0;" << endl; - } - - file << endl - << "private:" << endl - << endl - << tab << "/* unmarshalers (to unpack the DBus message before calling the actual signal handler)" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si) - { - Xml::Node& signal = **si; - Xml::Nodes args = signal["arg"]; - - file << tab << "void " << stub_name(signal.get("name")) << "( const ::DBus::SignalMessage& sig )" << endl - << tab << "{" << endl; - - if(args.size() > 0) - { - file << tab << tab << "::DBus::MessageIter ri = sig.reader();" << endl - << endl; - } - - unsigned int i = 0; - for(Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++i) - { - Xml::Node& arg = **ai; - file << tab << tab << signature_to_type(arg.get("type")) << " " ; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << arg_name << ";" << " ri >> " << arg_name << ";" << endl; - else - file << "arg" << i << ";" << " ri >> " << "arg" << i << ";" << endl; - } - - file << tab << tab << signal.get("name") << "("; - - unsigned int j = 0; - for(Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai, ++j) - { - Xml::Node& arg = **ai; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << arg_name; - else - file << "arg" << j; - - if(ai+1 != args.end()) - file << ", "; - } - - file << ");" << endl; - - file << tab << "}" << endl; - } - - - file << "};" << endl - << endl; - - for(unsigned int i = 0; i < nspaces; ++i) - { - file << "} "; - } - file << endl; - } - - file << "#endif//" << cond_comp << endl; - - file.close(); -} - -void generate_adaptor( Xml::Document& doc, const char* filename ) -{ - cerr << "writing " << filename << endl; - - ofstream file(filename); - if(file.bad()) - { - cerr << "unable to write file " << filename << endl; - exit(-1); - } - - file << header; - string filestring = filename; - underscorize(filestring); - - string cond_comp = "__dbusxx__" + filestring + "__ADAPTOR_MARSHAL_H"; - - file << "#ifndef " << cond_comp << endl - << "#define " << cond_comp << endl; - - file << dbus_includes; - - Xml::Node& root = *(doc.root); - Xml::Nodes interfaces = root["interface"]; - - for(Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i) - { - Xml::Node& iface = **i; - Xml::Nodes methods = iface["method"]; - Xml::Nodes signals = iface["signal"]; - Xml::Nodes properties = iface["property"]; - Xml::Nodes ms; - ms.insert(ms.end(), methods.begin(), methods.end()); - ms.insert(ms.end(), signals.begin(), signals.end()); - - string ifacename = iface.get("name"); - if(ifacename == "org.freedesktop.DBus.Introspectable" - ||ifacename == "org.freedesktop.DBus.Properties") - { - cerr << "skipping interface " << ifacename << endl; - continue; - } - - istringstream ss(ifacename); - string nspace; - unsigned int nspaces = 0; - - while(ss.str().find('.', ss.tellg()) != string::npos) - { - getline(ss, nspace, '.'); - - file << "namespace " << nspace << " {" << endl; - - ++nspaces; - } - file << endl; - - string ifaceclass; - - getline(ss, ifaceclass); - - cerr << "generating code for interface " << ifacename << "..." << endl; - - file << "class " << ifaceclass << endl - << ": public ::DBus::InterfaceAdaptor" << endl - << "{" << endl - << "public:" << endl - << endl - << tab << ifaceclass << "()" << endl - << tab << ": ::DBus::InterfaceAdaptor(\"" << ifacename << "\")" << endl - << tab << "{" << endl; - - for(Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi) - { - Xml::Node& property = **pi; - - file << tab << tab << "bind_property(" - << property.get("name") << ", " - << "\"" << property.get("type") << "\", " - << ( property.get("access").find("read") != string::npos - ? "true" - : "false" ) - << ", " - << ( property.get("access").find("write") != string::npos - ? "true" - : "false" ) - << ");" << endl; - } - - for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi) - { - Xml::Node& method = **mi; - - file << tab << tab << "register_method(" - << ifaceclass << ", " << method.get("name") << ", "<< stub_name(method.get("name")) - << ");" << endl; - } - - file << tab << "}" << endl - << endl; - - file << tab << "::DBus::IntrospectedInterface* const introspect() const " << endl - << tab << "{" << endl; - - for(Xml::Nodes::iterator mi = ms.begin(); mi != ms.end(); ++mi) - { - Xml::Node& method = **mi; - Xml::Nodes args = method["arg"]; - - file << tab << tab << "static ::DBus::IntrospectedArgument " << method.get("name") << "_args[] = " << endl - << tab << tab << "{" << endl; - - for(Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai) - { - Xml::Node& arg = **ai; - - file << tab << tab << tab << "{ "; - - if(arg.get("name").length()) - { - file << "\"" << arg.get("name") << "\", "; - } - else - { - file << "0, "; - } - file << "\"" << arg.get("type") << "\", " - << ( arg.get("direction") == "in" ? "true" : "false" ) - << " }," << endl; - } - file << tab << tab << tab << "{ 0, 0, 0 }" << endl - << tab << tab << "};" << endl; - } - - file << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_methods[] = " << endl - << tab << tab << "{" << endl; - - for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi) - { - Xml::Node& method = **mi; - - file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl; - } - - file << tab << tab << tab << "{ 0, 0 }" << endl - << tab << tab << "};" << endl; - - file << tab << tab << "static ::DBus::IntrospectedMethod " << ifaceclass << "_signals[] = " << endl - << tab << tab << "{" << endl; - - for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si) - { - Xml::Node& method = **si; - - file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl; - } - - file << tab << tab << tab << "{ 0, 0 }" << endl - << tab << tab << "};" << endl; - - file << tab << tab << "static ::DBus::IntrospectedProperty " << ifaceclass << "_properties[] = " << endl - << tab << tab << "{" << endl; - - for(Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi) - { - Xml::Node& property = **pi; - - file << tab << tab << tab << "{ " - << "\"" << property.get("name") << "\", " - << "\"" << property.get("type") << "\", " - << ( property.get("access").find("read") != string::npos - ? "true" - : "false" ) - << ", " - << ( property.get("access").find("write") != string::npos - ? "true" - : "false" ) - << " }," << endl; - } - - - file << tab << tab << tab << "{ 0, 0, 0, 0 }" << endl - << tab << tab << "};" << endl; - - file << tab << tab << "static ::DBus::IntrospectedInterface " << ifaceclass << "_interface = " << endl - << tab << tab << "{" << endl - << tab << tab << tab << "\"" << ifacename << "\"," << endl - << tab << tab << tab << ifaceclass << "_methods," << endl - << tab << tab << tab << ifaceclass << "_signals," << endl - << tab << tab << tab << ifaceclass << "_properties" << endl - << tab << tab << "};" << endl - << tab << tab << "return &" << ifaceclass << "_interface;" << endl - << tab << "}" << endl - << endl; - - file << "public:" << endl - << endl - << tab << "/* properties exposed by this interface, use" << endl - << tab << " * property() and property(value) to get and set a particular property" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator pi = properties.begin(); pi != properties.end(); ++pi) - { - Xml::Node& property = **pi; - string name = property.get("name"); - string type = property.get("type"); - string type_name = signature_to_type(type); - - file << tab << "::DBus::PropertyAdaptor< " << type_name << " > " << name << ";" << endl; - } - - file << endl; - - file << "public:" << endl - << endl - << tab << "/* methods exported by this interface," << endl - << tab << " * you will have to implement them in your ObjectAdaptor" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi) - { - Xml::Node& method = **mi; - Xml::Nodes args = method["arg"]; - Xml::Nodes args_in = args.select("direction","in"); - Xml::Nodes args_out = args.select("direction","out"); - - file << tab << "virtual "; - - if(args_out.size() == 0 || args_out.size() > 1 ) - { - file << "void "; - } - else if(args_out.size() == 1) - { - file << signature_to_type(args_out.front()->get("type")) << " "; - } - - file << method.get("name") << "( "; - - unsigned int i = 0; - for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i) - { - Xml::Node& arg = **ai; - file << "const " << signature_to_type(arg.get("type")) << "& "; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << arg_name; - - if((i+1 != args_in.size() || args_out.size() > 1)) - file << ", "; - } - - if(args_out.size() > 1) - { - unsigned int i = 0; - for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i) - { - Xml::Node& arg = **ao; - file << signature_to_type(arg.get("type")) << "&"; - - string arg_name = arg.get("name"); - if(arg_name.length()) - file << " " << arg_name; - - if(i+1 != args_out.size()) - file << ", "; - } - } - file << " ) = 0;" << endl; - } - - file << endl - << "public:" << endl - << endl - << tab << "/* signal emitters for this interface" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si) - { - Xml::Node& signal = **si; - Xml::Nodes args = signal["arg"]; - - file << tab << "void " << signal.get("name") << "( "; - - unsigned int i = 0; - for(Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i) - { - Xml::Node& arg = **a; - - file << "const " << signature_to_type(arg.get("type")) << "& arg" << i+1; - - if(i+1 != args.size()) - file << ", "; - } - - file << " )" << endl - << tab << "{" << endl - << tab << tab << "::DBus::SignalMessage sig(\"" << signal.get("name") <<"\");" << endl;; - - - if(args.size() > 0) - { - file << tab << tab << "::DBus::MessageIter wi = sig.writer();" << endl; - - for(unsigned int i = 0; i < args.size(); ++i) - { - file << tab << tab << "wi << arg" << i+1 << ";" << endl; - } - } - - file << tab << tab << "emit_signal(sig);" << endl - << tab << "}" << endl; - } - - file << endl - << "private:" << endl - << endl - << tab << "/* unmarshalers (to unpack the DBus message before calling the actual interface method)" << endl - << tab << " */" << endl; - - for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi) - { - Xml::Node& method = **mi; - Xml::Nodes args = method["arg"]; - Xml::Nodes args_in = args.select("direction","in"); - Xml::Nodes args_out = args.select("direction","out"); - - file << tab << "::DBus::Message " << stub_name(method.get("name")) << "( const ::DBus::CallMessage& call )" << endl - << tab << "{" << endl - << tab << tab << "::DBus::MessageIter ri = call.reader();" << endl - << endl; - - unsigned int i = 1; - for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i) - { - Xml::Node& arg = **ai; - file << tab << tab << signature_to_type(arg.get("type")) << " argin" << i << ";" - << " ri >> argin" << i << ";" << endl; - } - - if(args_out.size() == 0) - { - file << tab << tab; - } - else if(args_out.size() == 1) - { - file << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout1 = "; - } - else - { - unsigned int i = 1; - for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i) - { - Xml::Node& arg = **ao; - file << tab << tab << signature_to_type(arg.get("type")) << " argout" << i << ";" << endl; - } - file << tab << tab; - } - - file << method.get("name") << "("; - - for(unsigned int i = 0; i < args_in.size(); ++i) - { - file << "argin" << i+1; - - if((i+1 != args_in.size() || args_out.size() > 1)) - file << ", "; - } - - if(args_out.size() > 1) - for(unsigned int i = 0; i < args_out.size(); ++i) - { - file << "argout" << i+1; - - if(i+1 != args_out.size()) - file << ", "; - } - - file << ");" << endl; - - file << tab << tab << "::DBus::ReturnMessage reply(call);" << endl; - - if(args_out.size() > 0) - { - file << tab << tab << "::DBus::MessageIter wi = reply.writer();" << endl; - - for(unsigned int i = 0; i < args_out.size(); ++i) - { - file << tab << tab << "wi << argout" << i+1 << ";" << endl; - } - } - - file << tab << tab << "return reply;" << endl; - - file << tab << "}" << endl; - } - - file << "};" << endl - << endl; - - for(unsigned int i = 0; i < nspaces; ++i) - { - file << "} "; - } - file << endl; - } - - file << "#endif//" << cond_comp << endl; - - file.close(); -} - -int main( int argc, char** argv ) -{ - if(argc < 2) - { - usage(argv[0]); - } - - bool proxy_mode, adaptor_mode; - char *proxy, *adaptor; - - proxy_mode = false; - proxy = 0; - - adaptor_mode = false; - adaptor = 0; - - for(int a = 1; a < argc; ++a) - { - if(!strncmp(argv[a], "--proxy=", 8)) - { - proxy_mode = true; - proxy = argv[a] +8; - } - else - if(!strncmp(argv[a], "--adaptor=", 10)) - { - adaptor_mode = true; - adaptor = argv[a] +10; - } - } - - if(!proxy_mode && !adaptor_mode) usage(argv[0]); - - ifstream xmlfile(argv[1]); - - if(xmlfile.bad()) - { - cerr << "unable to open file " << argv[1] << endl; - return -1; - } - - Xml::Document doc; - - try - { - xmlfile >> doc; - //cout << doc.to_xml(); - } - catch(Xml::Error& e) - { - cerr << "error parsing " << argv[1] << ": " << e.what() << endl; - return -1; - } - - if(!doc.root) - { - cerr << "empty document" << endl; - return -1; - } - - if(proxy_mode) generate_proxy(doc, proxy); - if(adaptor_mode) generate_adaptor(doc, adaptor); - - return 0; -} diff --git a/libs/dbus/tools/xml2cpp.h b/libs/dbus/tools/xml2cpp.h deleted file mode 100644 index 84f53feacf4fc7f263f3802097e8ff45e9dea6bc..0000000000000000000000000000000000000000 --- a/libs/dbus/tools/xml2cpp.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * D-Bus++ - C++ bindings for D-Bus - * - * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> - * - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifndef __DBUSXX_TOOLS_XML2CPP_H -#define __DBUSXX_TOOLS_XML2CPP_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <dbus-c++/dbus.h> -#include <dbus/dbus.h> - -#include "xml.h" - -#endif//__DBUSXX_TOOLS_XML2CPP_H diff --git a/libs/libiax2/AUTHORS b/libs/libiax2/AUTHORS deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/libs/libiax2/COPYING b/libs/libiax2/COPYING deleted file mode 100644 index 67572846722bcb54024d64bbfa6caf06213be6d2..0000000000000000000000000000000000000000 --- a/libs/libiax2/COPYING +++ /dev/null @@ -1,416 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - - - - - - - - - - - - - - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - - - - - - - - - - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - - - - - - - - - - - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - - - - - - - - - - - - - - - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/libs/libiax2/COPYING.LIB b/libs/libiax2/COPYING.LIB deleted file mode 100644 index 161a3d1d47b94f5d092b4c5fa316007c6f22fe81..0000000000000000000000000000000000000000 --- a/libs/libiax2/COPYING.LIB +++ /dev/null @@ -1,482 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/libs/libiax2/ChangeLog b/libs/libiax2/ChangeLog deleted file mode 100644 index 311fecbd3830b243fbc3481b697febc59feb04fc..0000000000000000000000000000000000000000 --- a/libs/libiax2/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ -libiax -====== - -version 0.2.3: - * Allow password to be passed in connect - -version 0.2.2 (Nov 13th, 2001): - * HTML Unlink requests - * HTML Reject link requests - * Text frames - -version 0.2.1 (Oct 20th, 2001): - * More space for challenge in IAX - * Fixed strncpy security bug - * Accept larger packets - * Handle out of order packets better - * Implemented send_url - * Added an iax-config script :-) - -version 0.2.0 (Oct 10th, 2001): - * Initial Public Release diff --git a/libs/libiax2/INSTALL b/libs/libiax2/INSTALL deleted file mode 100644 index 23e5f25d0e5f85798dcfb368ecb2f04f59777f61..0000000000000000000000000000000000000000 --- a/libs/libiax2/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -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 -disabled by default to prevent problems with accidental use of stale -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 -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -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'. - -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. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -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 -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. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -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: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/libs/libiax2/Makefile.am b/libs/libiax2/Makefile.am deleted file mode 100644 index 40d3da560aa85acfb985fe1f6c4a6e1a96124274..0000000000000000000000000000000000000000 --- a/libs/libiax2/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -SUBDIRS = src - -bin_SCRIPTS=iax-config -BUILT_SCOURCES=iax-config -EXTRA_DIST=iax.spec libiax2.vcproj -iax-config: iax-config.in diff --git a/libs/libiax2/NEWS b/libs/libiax2/NEWS deleted file mode 100644 index 233df649e23e419bfe8dd51383c0b67398fafc57..0000000000000000000000000000000000000000 --- a/libs/libiax2/NEWS +++ /dev/null @@ -1,12 +0,0 @@ -libiax -====== - -0.2.3: - -0.2.2: - -0.2.1: - -0.2.0 (Oct 10th, 2001): - Initial Release. Hooray! Rejoice! :) - diff --git a/libs/libiax2/README b/libs/libiax2/README deleted file mode 100644 index 72f5e9e795b133f6699a84c59751f4c63d47b082..0000000000000000000000000000000000000000 --- a/libs/libiax2/README +++ /dev/null @@ -1,4 +0,0 @@ -libiax: An implementation of the Inter-Asterisk eXchange protocol distributed -under the terms of the GNU Lesser General Public License - -Written by Mark Spencer <markster@linux-support.net> diff --git a/libs/libiax2/bootstrap.sh b/libs/libiax2/bootstrap.sh deleted file mode 100755 index 640caa72679d71e456e769dd960fe186baacb8f0..0000000000000000000000000000000000000000 --- a/libs/libiax2/bootstrap.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo If this fails you probably need to download the latest -echo libtool,aclocal,autoconf and automake -libtoolize --force -aclocal --force -autoconf -f -automake -acf diff --git a/libs/libiax2/build.sh b/libs/libiax2/build.sh deleted file mode 100755 index 9dfda77c387d94481431b8be7c477ab6cf861aef..0000000000000000000000000000000000000000 --- a/libs/libiax2/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -echo configuring automake -./bootstrap.sh -echo configuring libiax2 -./configure --enable-newjb -echo building libiax2 -make -echo -echo -echo '##################################################################' -echo '# #' -echo '# If all is well, enter "make install" to complete installation. #' -echo '# #' -echo '##################################################################' diff --git a/libs/libiax2/configure.in b/libs/libiax2/configure.in deleted file mode 100644 index a4044b5876fa3b2f3cdbd9a7952111445b787468..0000000000000000000000000000000000000000 --- a/libs/libiax2/configure.in +++ /dev/null @@ -1,38 +0,0 @@ -dnl Yo Yo Yo -AC_INIT(src/iax.c) -AM_INIT_AUTOMAKE([iax], [0.2.3]) - - -dnl Check for various goodies -AC_PROG_CC -AM_PROG_LIBTOOL -dnl LIBTOOL="$LIBTOOL --silent" -AC_PROG_INSTALL - -dnl Check for libraries -dnl None available - -dnl Check header files -AC_HEADER_STDC - -AC_SUBST(LIBS) - -AC_ARG_ENABLE(snomhack, [ --enable-snomhack Use slower memset for SNOM phoneem ],,enable_snomhack=no) -AC_ARG_ENABLE(extreme_debug, [ --enable-extreme-debug Compile with extreme debugging code enabled ],,enable_extreme_debug=no) -if test "$enable_snomhack" = yes ; then - AC_DEFINE(SNOM_HACK) -fi - -if test "$enable_extreme_debug" = yes ; then - AC_DEFINE(EXTREME_DEBUG) -fi - -AC_SUBST(IAX_VERSION) - -AC_OUTPUT([ -Makefile -src/Makefile -iax.spec -iax-config],[case "$CONFIG_FILES" in -*iax-config*)chmod +x iax-config;; -esac]) diff --git a/libs/libiax2/depcomp b/libs/libiax2/depcomp deleted file mode 100755 index 04701da536f33a7c39d7bb01b87a70ae3a776df5..0000000000000000000000000000000000000000 --- a/libs/libiax2/depcomp +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2005-07-09.11 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 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 -# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -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" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # 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" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -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" - exit $stat - fi - - 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" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -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'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - 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 - # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism 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 - # 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 - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - 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 - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libs/libiax2/doc/Doxyfile-fullsource b/libs/libiax2/doc/Doxyfile-fullsource deleted file mode 100644 index 9727eade64acd8de939d149cc5dc990a6b14d87e..0000000000000000000000000000000000000000 --- a/libs/libiax2/doc/Doxyfile-fullsource +++ /dev/null @@ -1,1234 +0,0 @@ -# Doxyfile 1.4.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "libiax2" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO -EXTRACT_LOCAL_METHODS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is YES. - -SHOW_DIRECTORIES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the progam writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = src - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = *.cpp *.inl - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO -#FILTER_SOURCE_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = *.h *.hpp - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/libs/libiax2/gen.sh b/libs/libiax2/gen.sh deleted file mode 100755 index 08c7e931190882960806aa7444381ab56c596c12..0000000000000000000000000000000000000000 --- a/libs/libiax2/gen.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# -# Run this to generate a new configure script and such :) -# -# -- Rob -# - - -(libtoolize --version) < /dev/null > /dev/null 2>&1 || { - echo; - echo "You must have libtool installed to compile libiax"; - echo; - exit; -} - -libtoolize --copy --force -aclocal -autoconf -automake diff --git a/libs/libiax2/iax-config.in b/libs/libiax2/iax-config.in deleted file mode 100644 index a4e82c39b85a32c7f60c3d3254e9ead5768f27f6..0000000000000000000000000000000000000000 --- a/libs/libiax2/iax-config.in +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -iax_libs="-L/usr/lib -liax" -iax_cflags="" - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -exec_prefix_set=no - -usage="\ -Usage: iax-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" - -if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi - ;; - --prefix) - echo $prefix - ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo $exec_prefix - ;; - --version) - echo @VERSION@ - ;; - --cflags) -# if test ${prefix}/include/iax != /usr/include/iax ; then - includes=-I${prefix}/include/iax - for i in $iax_cflags ; do - if test $i = -I${prefix}/include ; then - includes="" - fi - done -# fi - echo $includes $iax_cflags - ;; - --libs) - my_iax_libs= - libdirs=-L${exec_prefix}/lib - for i in $iax_libs ; do - if test $i != -L${exec_prefix}/lib ; then - if test -z "$my_iax_libs" ; then - my_iax_libs="$i" - else - my_iax_libs="$my_iax_libs $i" - fi - fi - done - echo $libdirs $my_iax_libs - ;; - *) - echo "${usage}" 1>&2 - exit 1 - ;; - esac - shift -done diff --git a/libs/libiax2/iax.spec.in b/libs/libiax2/iax.spec.in deleted file mode 100644 index 1fc057d83cd1a467e602bf3d56804a1498449673..0000000000000000000000000000000000000000 --- a/libs/libiax2/iax.spec.in +++ /dev/null @@ -1,91 +0,0 @@ -%define name @PACKAGE@ -%define version @VERSION@ -%define release 1 -%define prefix /usr - -Summary: IAX (Inter Asterisk eXchange) Library -Name: %{name} -Version: %{version} -Release: %{release} -Copyright: LGPL -Group: Development/Libraries -Source: %{name}-%{version}.tar.gz -URL: http://www.linux-support.net/ -Distribution: RedHat Linux -Vendor: Linux Support Services -Packager: Rob Flynn <rob@linux-support.net> -BuildRoot: /var/tmp/%{name}-%{version}-root - -%description -Inter Asterisk eXchange, lovingly called IAX (pronounced: eeks), is the protocol used by the Asterisk PBX -system for inter-asterisk-communication. Other applications may use libiax to communicate with each other -and other asterisk servers. IAX is a high performance, feature rich protocol unrelated -to SIP or H.323. Its single-socket design allows it to interoperate with NAT and PAT -masquerade firewalls. It supports internationalization, remote dialplans, -and voice, HTML, image, DTMF, and video content. For more information see -http://www.gnophone.com. - -%package devel -Summary: IAX (Inter Asterisk eXchange) Development Package -Group: Development/Libraries -Requires: iax - -%description devel -Inter Asterisk eXchange, lovingly called IAX (pronounced: eeks), is the protocol used by the Asterisk PBX -system for inter-asterisk-communication. Other applications may use libiax to communicate with each other -and other asterisk servers. IAX is a high performance, feature rich protocol unrelated -to SIP or H.323. Its single-socket design allows it to interoperate with NAT and PAT -masquerade firewalls. It supports internationalization, remote dialplans, -and voice, HTML, image, DTMF, and video content. For more information see -http://www.gnophone.com. - -This package contains all of the development files that you will need in order to compile IAX applications. - -%prep - -%setup - -%build -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --enable-autoupdate -make - -%install -rm -rf $RPM_BUILD_ROOT -make prefix=$RPM_BUILD_ROOT%{prefix} install-strip - -%files -%defattr(-,root,root) -%doc NEWS COPYING AUTHORS README -%{prefix}/lib - -%files devel -%defattr(-,root,root) -%{prefix}/include/iax -%{prefix}/bin/* - -%clean -rm -r $RPM_BUILD_ROOT - -%changelog -* Tue Nov 13 2001 Rob Flynn <rob@linux-support.net> (0.2.2 release) -- HTML Unlink requests -- HTML Reject link requests -- Text frames - -* Sat Oct 20 2001 Rob Flynn <rob@linux-support.net> (0.2.1 release) -- More space for challenge in IAX -- Fixed strncpy security bug -- Accept larger packets -- Handle out of order packets better -- Implemented send_url -- Added an iax-config script :-) - -* Wed Oct 10 2001 Rob Flynn <rob@linux-support.net> (0.2.0 release) -- Initial public release - -%post - -%preun - -%postun - diff --git a/libs/libiax2/install-sh b/libs/libiax2/install-sh deleted file mode 100755 index 4d4a9519eaf88b18fb157dfe5fae59c1c5d005c7..0000000000000000000000000000000000000000 --- a/libs/libiax2/install-sh +++ /dev/null @@ -1,323 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2005-05-14.22 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# 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. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -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. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --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 - break;; - esac -done - -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - 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 '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) 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 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - 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 - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - 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 - fi - pathcomp=$pathcomp/ - done - 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"; } - - else - dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # 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" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # 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; } -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=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libs/libiax2/missing b/libs/libiax2/missing deleted file mode 100755 index 894e786e16c1d0d94dfc08d6b475270fe1418d6a..0000000000000000000000000000000000000000 --- a/libs/libiax2/missing +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2005-06-08.21 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - 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 - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to <bug-automake@gnu.org>." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -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 - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - 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'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - 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 - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - 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 - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`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 - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - 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'` - 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` - # ... 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 - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libs/libiax2/mkinstalldirs b/libs/libiax2/mkinstalldirs deleted file mode 100755 index 259dbfcd35789bd0f087803d193cfd924f9a5f34..0000000000000000000000000000000000000000 --- a/libs/libiax2/mkinstalldirs +++ /dev/null @@ -1,158 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2005-06-29.22 - -# Original author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to <bug-automake@gnu.org>." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libs/libiax2/src/Makefile.am b/libs/libiax2/src/Makefile.am deleted file mode 100644 index e2bb07fd63c7c57462c7b2e3be8c53e7ef409a0c..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -AM_CFLAGS = -Wall -O2 -AM_CFLAGS += -g -Wall -Wstrict-prototypes -I . -AM_CFLAGS += -DLIBIAX -AM_CFLAGS += -fsigned-char -# -DDEBUG_SUPPORT (doesn't compile with it) -# -DDEBUG_DEFAULT -AM_CFLAGS += $(UCFLAGS) - - -pkgdir = $(libdir) -pkg_LTLIBRARIES=libiax.la -libiax_la_SOURCES = iax2-parser.c iax.c md5.c jitterbuf.c -EXTRA_DIST = md5.h frame.h iax-client.h iax2.h iax2-parser.h jitterbuf.h - -install-data-local: - mkdir -p $(includedir)/iax - install -m 644 md5.h $(includedir)/iax - install -m 644 frame.h $(includedir)/iax - install -m 644 iax.h $(includedir)/iax - install -m 644 iax2.h $(includedir)/iax - install -m 644 iax2-parser.h $(includedir)/iax - install -m 644 iax-client.h $(includedir)/iax - diff --git a/libs/libiax2/src/answer.h b/libs/libiax2/src/answer.h deleted file mode 100644 index 2a034204cf93d853bda3f65a40988ade2ed45a7b..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/answer.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Signed 16-bit audio data - * - * Source: answer.raw - * - * Copyright (C) 1999, Mark Spencer and Linux Support Services - * - * Distributed under the terms of the GNU General Public License - * - */ - -static signed short answer[] = { -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 0x19b7, 0x0245, 0xeee5, 0xb875, 0xd9a4, 0x6018, 0x660a, 0xc3c6, -0x8741, 0xff55, 0x4c2e, 0x2146, 0xfed2, 0xf079, 0xcbd4, 0xe561, 0x3c41, 0x3166, -0xd425, 0xdc59, 0x2748, 0x087d, 0xc72b, 0xfe3a, 0x4681, 0x14c6, 0xcf45, 0xdd38, -0xf8dd, 0x0a39, 0x3a5a, 0x32b9, 0xbfec, 0x957f, 0x15a3, 0x70f4, 0x1d95, 0xbfc4, -0xd367, 0xfda0, 0x0dc0, 0x29eb, 0x1fc2, 0xd684, 0xcab1, 0x19c7, 0x29ef, 0xe679, -0xe9d0, 0x2b82, 0x151a, 0xca9f, 0xdb68, 0x1f4a, 0x271c, 0x0e2a, 0xfb32, 0xd1b2, -0xc8ff, 0x2382, 0x6380, 0x0a52, 0xa118, 0xccbf, 0x2ddc, 0x33fd, 0x0964, 0xf2a4, -0xdd81, 0xe092, 0x1a00, 0x325c, 0xf5e3, 0xd6a1, 0x0b6c, 0x1c75, 0xe4f8, 0xe07c, -0x2082, 0x2b3e, 0xf445, 0xdaa9, 0xea13, 0xff3c, 0x245c, 0x35c1, 0xf308, 0xab53, -0xdf59, 0x4698, 0x3f3b, 0xe7f7, 0xca84, 0xed4d, 0x0c3f, 0x1e94, 0x1c2d, 0xf06f, -0xd4df, 0xff34, 0x23d8, 0x001e, 0xe3f1, 0x0b15, 0x2113, 0xf3fd, 0xd768, 0xf9a0, -0x1d31, 0x1c6e, 0x0797, 0xe3a0, 0xce6c, 0xfd7b, 0x422a, 0x2c4c, 0xd364, 0xbf42, -0x0278, 0x303e, 0x1c51, 0xf737, 0xe25a, 0xe75f, 0x0a8f, 0x22ab, 0x05f4, 0xe3f9, -0xf8c4, 0x1705, 0x0162, 0xe49f, 0xfb8b, 0x1e2b, 0x13ac, 0xf044, 0xe07b, 0xf01a, -0x1567, 0x2cbf, 0x0b75, 0xd01b, 0xd206, 0x1563, 0x38d7, 0x0f2e, 0xdb32, 0xdc30, -0x023b, 0x1e44, 0x16eb, 0xf5f7, 0xe425, 0xfa33, 0x14d5, 0x0968, 0xeff2, 0xf762, -0x1137, 0x0e59, 0xf13a, 0xe651, 0xff41, 0x1d60, 0x18fd, 0xf1e6, 0xd75f, 0xf097, -0x20ec, 0x27fa, 0xfba4, 0xd5b8, 0xe68e, 0x1657, 0x2518, 0x04f6, 0xe5a3, 0xe976, -0x0578, 0x18fa, 0x0a92, 0xec0a, 0xef2a, 0x111f, 0x12f4, 0xeec3, 0xe95e, 0x0d3a, -0x18fd, 0xff72, 0xeefc, 0xf114, 0xfaaa, 0x14ee, 0x21db, 0xf56e, 0xcb49, 0xf621, -0x3323, 0x1947, 0xe017, 0xe7e9, 0x0819, 0x0707, 0x084c, 0x0f57, 0xf152, 0xdf92, -0x104a, 0x28eb, 0xedcc, 0xd4ad, 0x1415, 0x296d, 0xed9a, 0xdf57, 0x0cc2, 0x0d95, -0xf7b5, 0x0deb, 0x0b34, 0xd713, 0xea08, 0x38d6, 0x216d, 0xc727, 0xdc32, 0x2cd2, -0x1822, 0xe2d5, 0xfeb3, 0x106c, 0xe6e5, 0xf81e, 0x2fe8, 0x01af, 0xc180, 0x037a, -0x42d8, 0xf88d, 0xc344, 0x0a4f, 0x2c4e, 0xf19d, 0xebeb, 0x162c, 0xf9e9, 0xde93, -0x1b56, 0x2c60, 0xd8aa, 0xce3e, 0x2a41, 0x2eeb, 0xdab1, 0xde32, 0x1c32, 0x0aba, -0xeabe, 0x1008, 0x136d, 0xda2f, 0xec3b, 0x31dd, 0x1130, 0xca79, 0xf5b8, 0x3423, -0x0274, 0xd27d, 0x035e, 0x1e68, 0xf641, 0xf904, 0x1691, 0xef7d, 0xd57a, 0x1c3b, -0x3c23, 0xe881, 0xc274, 0x0af5, 0x2962, 0xfa34, 0xf676, 0x0f71, 0xefcc, 0xe01f, -0x19e7, 0x276f, 0xe694, 0xe134, 0x1c3a, 0x0e8b, 0xd8e7, 0xfa81, 0x2f8b, 0x07c5, -0xd904, 0xf6fa, 0x0ca5, 0xf9a2, 0x0dc7, 0x2623, 0xec54, 0xbe23, 0x02b6, 0x4296, -0x10cd, 0xda61, 0xf11c, 0x0103, 0xf41c, 0x10b4, 0x2a03, 0xf63c, 0xce1a, 0xfdbd, -0x1fb4, 0xfc51, 0xf727, 0x1c8a, 0x04ff, 0xcf41, 0xec05, 0x2913, 0x1ce8, 0xf70c, -0xf744, 0xede8, 0xdd77, 0x0d99, 0x43f1, 0x119c, 0xc14f, 0xd60e, 0x17cb, 0x1e19, -0x0d4e, 0x0c95, 0xeed1, 0xcdf4, 0xf7a5, 0x331f, 0x1cd0, 0xeb17, 0xf082, 0xfb19, -0xe899, 0xfdeb, 0x323c, 0x2036, 0xdad3, 0xd134, 0xfd03, 0x1345, 0x1c10, 0x2239, -0xf656, 0xbc22, 0xdc3f, 0x3392, 0x3d59, 0xfd77, 0xdb4d, 0xe23f, 0xedbe, 0x0f7e, -0x35cc, 0x1947, 0xd5dc, 0xd1bf, 0x035d, 0x16fc, 0x1174, 0x1675, 0x0249, 0xd2d4, -0xd851, 0x184d, 0x32fe, 0x0f91, 0xee14, 0xe1e6, 0xdf9b, 0x016b, 0x3668, 0x2b2b, -0xe20c, 0xc554, 0xf257, 0x1c05, 0x1fc5, 0x14f0, 0xf891, 0xd41c, 0xdf83, 0x1865, -0x2de1, 0x0b16, 0xed58, 0xea0c, 0xea79, 0xfbd9, 0x22af, 0x2732, 0xf62f, 0xd389, -0xe7d9, 0x0b39, 0x1cdc, 0x1de3, 0x038a, 0xd809, 0xd5f7, 0x0b55, 0x305e, 0x1910, -0xf02e, 0xe089, 0xe7c7, 0x0195, 0x2265, 0x21da, 0xf743, 0xd8f2, 0xe978, 0x09a1, -0x190a, 0x17c5, 0x045a, 0xe46d, 0xdd06, 0xffb2, 0x2293, 0x1cfe, 0xfd4d, 0xe4f9, -0xe310, 0xfaf1, 0x1d22, 0x2376, 0x0113, 0xde3a, 0xe21b, 0x0204, 0x1ba1, 0x1bd6, -0x0333, 0xe563, 0xe104, 0xfd51, 0x1bc1, 0x1ccf, 0x0285, 0xe757, 0xe35e, 0xfaf2, -0x185d, 0x1d46, 0x06b7, 0xec13, 0xe108, 0xef6e, 0x121d, 0x2a17, 0x16a6, 0xe32c, -0xc9a9, 0xf070, 0x2f48, 0x3788, 0xfa4e, 0xc32a, 0xd9c2, 0x1fa1, 0x36fe, 0x07fa, -0xd9e4, 0xe577, 0x0e5e, 0x1755, 0xfb53, 0xed71, 0x0540, 0x19e0, 0x0301, 0xdc97, -0xe391, 0x1937, 0x367c, 0x0bc9, 0xca4c, 0xc96b, 0x105d, 0x461f, 0x2416, 0xd481, -0xbc97, 0xf8b7, 0x39af, 0x2ec9, 0xecc6, 0xcb50, 0xeee3, 0x1ffe, 0x1e8e, 0xf700, -0xe66a, 0xff58, 0x149f, 0x02e5, 0xe792, 0xf2d8, 0x1a4d, 0x225a, 0xf642, 0xce7f, -0xe6a6, 0x25e2, 0x38f5, 0x01d0, 0xc50f, 0xd243, 0x19bd, 0x3fc6, 0x14f0, 0xd2d7, -0xcdb6, 0x069a, 0x2ffe, 0x1847, 0xe6f8, 0xdf0a, 0x0337, 0x1a90, 0x067a, 0xeb5b, -0xf541, 0x143b, 0x14f2, 0xf092, 0xdc02, 0xfb91, 0x28a3, 0x2274, 0xeaa8, 0xc9e7, -0xef48, 0x2d01, 0x322e, 0xf6d2, 0xc7cb, 0xe13b, 0x1fda, 0x3217, 0x0458, 0xd690, -0xe2bf, 0x11c4, 0x21d5, 0x0291, 0xe5c8, 0xf3a9, 0x12ba, 0x11aa, 0xf22b, 0xe627, -0x03ec, 0x219a, 0x1036, 0xe2f2, 0xd93f, 0x059c, 0x2ed6, 0x1b75, 0xe227, 0xce55, -0xfb19, 0x2de0, 0x2477, 0xed08, 0xd148, 0xf307, 0x21d4, 0x2002, 0xf543, 0xdeac, -0xf7f9, 0x18a9, 0x11d6, 0xf0ef, 0xe8e4, 0x05ea, 0x1ba5, 0x0727, 0xe448, 0xe748, -0x100e, 0x265e, 0x07fc, 0xdbae, 0xde78, 0x0efa, 0x2ce0, 0x0f94, 0xddf1, 0xd9ea, -0x0797, 0x28f6, 0x12eb, 0xe60c, 0xdf46, 0x0469, 0x1fbb, 0x0ced, 0xe9f6, 0xe95f, -0x09fe, 0x1ab9, 0x02cb, 0xe5a4, 0xef2a, 0x1327, 0x1d7b, 0xfd07, 0xde3d, 0xed9c, -0x17e5, 0x22e7, 0xfe3a, 0xdb38, 0xe9b9, 0x161a, 0x2416, 0x0175, 0xde3d, 0xe9de, -0x1294, 0x1fc9, 0x00ea, 0xe2a7, 0xeee2, 0x1298, 0x1a7d, 0xfc1d, 0xe3bb, 0xf47a, -0x1642, 0x185e, 0xf727, 0xe1af, 0xf709, 0x19c3, 0x18e7, 0xf50d, 0xe010, 0xf75b, -0x1a9c, 0x18d8, 0xf4c5, 0xe0c9, 0xf865, 0x1a1c, 0x16d5, 0xf3a6, 0xe257, 0xfaf2, -0x1a44, 0x14d5, 0xf34f, 0xe4b6, 0xfc77, 0x17d5, 0x0ff8, 0xf133, 0xe8b7, 0x0344, -0x1a37, 0x0ad5, 0xe95e, 0xe61a, 0x08a5, 0x227e, 0x0e33, 0xe4a7, 0xdd70, 0x03b0, -0x25f4, 0x17b2, 0xec0a, 0xdb4e, 0xf898, 0x1ba3, 0x18f6, 0xf973, 0xe87f, 0xf77a, -0x0b93, 0x096c, 0xfb0e, 0xfb03, 0x0896, 0x0940, 0xf51d, 0xe904, 0xfdc7, 0x1dda, -0x1bf9, 0xf29b, 0xd37f, 0xea1b, 0x1f37, 0x3175, 0x07eb, 0xd3f7, 0xd46b, 0x077d, -0x2eeb, 0x1e67, 0xeeae, 0xd8c7, 0xef85, 0x1119, 0x18d3, 0x088e, 0xf953, 0xf5ad, -0xf556, 0xf63d, 0x0234, 0x167a, 0x19a1, 0xfbf9, 0xd873, 0xdd4b, 0x0f06, 0x3748, -0x21e6, 0xe181, 0xc032, 0xe79a, 0x2bec, 0x3e76, 0x0b1b, 0xce41, 0xcb23, 0xff96, -0x2d79, 0x26d1, 0xfcc7, 0xdf8a, 0xe525, 0xfd83, 0x10f1, 0x16d7, 0x0f50, 0xfaea, -0xe3f1, 0xe20f, 0x0158, 0x27d9, 0x2866, 0xf96f, 0xcb34, 0xd563, 0x11d6, 0x3d25, -0x2424, 0xe254, 0xc2c9, 0xe7cd, 0x248d, 0x34f5, 0x0c42, 0xdcd0, 0xd827, 0xfa65, -0x19eb, 0x1b50, 0x0721, 0xf396, 0xeb9c, 0xefde, 0x0016, 0x1594, 0x1cc1, 0x0658, -0xe22b, 0xd852, 0xfb3e, 0x2923, 0x2c78, 0xfc87, 0xcdb5, 0xd69c, 0x0e3c, 0x3527, -0x201f, 0xe993, 0xcf9e, 0xeb21, 0x183f, 0x25ea, 0x0c93, 0xed4d, 0xe5f9, 0xf548, -0x07fb, 0x117c, 0x0ff2, 0x0398, 0xf08c, 0xe628, 0xf489, 0x143b, 0x2419, 0x0ccf, -0xe2cc, 0xd5a6, 0xf861, 0x2615, 0x2a1b, 0xfeb4, 0xd543, 0xdc53, 0x09b4, 0x2901, -0x19ff, 0xf24a, 0xde86, 0xeec4, 0x0b7b, 0x1733, 0x0d0a, 0xfc24, 0xf1bb, 0xf110, -0xfa03, 0x0a0f, 0x15d4, 0x0e21, 0xf435, 0xe17e, 0xee90, 0x1225, 0x2527, 0x0efa, -0xe61f, 0xd916, 0xf7b8, 0x1f50, 0x2326, 0x0099, 0xe01e, 0xe473, 0x0491, 0x1b37, -0x1360, 0xfb17, 0xecd9, 0xf20d, 0x0051, 0x0aec, 0x0d4a, 0x073d, 0xfa5a, 0xeeb8, -0xf165, 0x0516, 0x17dc, 0x12da, 0xf71b, 0xe213, 0xed85, 0x0eef, 0x20c8, 0x0e09, -0xebcc, 0xe0d4, 0xf848, 0x1637, 0x19d6, 0x026b, 0xec09, 0xed00, 0xff9b, 0x0e5a, -0x0d6b, 0x026c, 0xf865, 0xf4da, 0xf888, 0x025a, 0x0cbb, 0x0d53, 0xff96, 0xeefa, -0xee80, 0x021c, 0x15d6, 0x126a, 0xf9c1, 0xe724, 0xf017, 0x0aa1, 0x18b6, 0x0b4e, -0xf2d7, 0xea91, 0xf957, 0x0cac, 0x1061, 0x03f4, 0xf6ad, 0xf476, 0xfbdf, 0x0489, -0x08b1, 0x06df, 0xffcf, 0xf766, 0xf537, 0xfddf, 0x0ad4, 0x0e15, 0x01da, 0xf205, -0xf0a0, 0x0082, 0x1066, 0x0e41, 0xfc71, 0xef1b, 0xf4ad, 0x05cd, 0x0f32, 0x07ed, -0xf9c8, 0xf401, 0xfa93, 0x04af, 0x088c, 0x04a7, 0xfe15, 0xf9f1, 0xfa64, 0xff1e, -0x0539, 0x078c, 0x02af, 0xfa1a, 0xf69d, 0xfd09, 0x075b, 0x0a3d, 0x01f2, 0xf761, -0xf642, 0xffa7, 0x08f3, 0x0830, 0xff05, 0xf7db, 0xf9bc, 0x0174, 0x068b, 0x04b2, -0xfeff, 0xfb39, 0xfc1a, 000000, 0x0371, 0x03d7, 0x00fe, 0xfd37, 0xfbe0, 0xfe78, -0x02af, 0x044a, 0x0180, 0xfd43, 0xfc00, 0xfed1, 0x02aa, 0x0346, 0x00dd, 0xfde0, -0xfbfe, 0x0114, 0x0987, 0x04bc, 0xf49d, 0xf23a, 0x06ab, 0x162e, 0x0544, 0xe76b, -0xea25, 0x1015, 0x2474, 0x0431, 0xd7d3, 0xe1ec, 0x1923, 0x2df5, 0x01cd, 0xd386, -0xe3d9, 0x1b9d, 0x2c62, 0xfeb8, 0xd31a, 0xe6ba, 0x1dbd, 0x2abb, 0xfbab, 0xd2ed, -0xe9ab, 0x1fa7, 0x28ef, 0xf8b3, 0xd2f5, 0xeca5, 0x2160, 0x26fd, 0xf5d7, 0xd334, -0xefa1, 0x22e5, 0x24ea, 0xf31b, 0xd3a9, 0xf29f, 0x2435, 0x22b6, 0xf07e, 0xd44e, -0xf59b, 0x2551, 0x2067, 0xee08, 0xd527, 0xf88e, 0x2639, 0x1e00, 0xebb6, 0xd62d, -0xfb77, 0x26eb, 0x1b85, 0xe98b, 0xd75f, 0xfe51, 0x276b, 0x18f9, 0xe78e, 0xd8b9, -0x011a, 0x27b6, 0x1660, 0xe5bb, 0xda3a, 0x03cc, 0x27cf, 0x13bd, 0xe415, 0xdbdf, -0x066a, 0x27b7, 0x1117, 0xe29e, 0xdda5, 0x08ec, 0x276e, 0x0e6d, 0xe154, 0xdf89, -0x0b52, 0x26f6, 0x0bc7, 0xe039, 0xe185, 0x0d96, 0x2653, 0x0924, 0xdf4e, 0xe399, -0x0fb9, 0x2584, 0x068b, 0xde93, 0xe5c0, 0x11b8, 0x248e, 0x03fd, 0xde08, 0xe7f8, -0x1390, 0x2372, 0x0180, 0xddaa, 0xea3c, 0x1544, 0x2231, 0xff12, 0xdd7a, 0xec89, -0x16cf, 0x20d0, 0xfcb9, 0xdd77, 0xeedb, 0x1831, 0x1f52, 0xfa77, 0xdd9f, 0xf132, -0x1969, 0x1db7, 0xf850, 0xddf1, 0xf385, 0x1a75, 0x1c06, 0xf645, 0xde6b, 0xf5d7, -0x1b5b, 0x1a3f, 0xf457, 0xdf0d, 0xf820, 0x1c13, 0x1867, 0xf288, 0xdfd2, 0xfa5f, -0x1ca1, 0x167f, 0xf0db, 0xe0ba, 0xfc92, 0x1d06, 0x148b, 0xef50, 0xe1c1, 0xfeb5, -0x1d43, 0x1290, 0xede9, 0xe2e6, 0x00c6, 0x1d58, 0x108e, 0xeca7, 0xe426, 0x02c4, -0x1d45, 0x0e8a, 0xeb8a, 0xe57f, 0x04a9, 0x1d0e, 0x0c87, 0xea92, 0xe6ec, 0x0677, -0x1cb2, 0x0a87, 0xe9be, 0xe86e, 0x082a, 0x1c34, 0x088b, 0xe912, 0xe9fe, 0x09c1, -0x1b95, 0x069c, 0xe88c, 0xeb9c, 0x0b3a, 0x1ad9, 0x04b6, 0xe82a, 0xed43, 0x0c96, -0x1a00, 0x02df, 0xe7eb, 0xeef3, 0x0dd0, 0x190d, 0x0116, 0xe7d0, 0xf0a8, 0x0eec, -0x1804, 0xff61, 0xe7d8, 0xf25d, 0x0fe6, 0x16e3, 0xfdc0, 0xe800, 0xf412, 0x10bf, -0x15b1, 0xfc36, 0xe848, 0xf5c5, 0x1176, 0x146e, 0xfac2, 0xe8ad, 0xf771, 0x120d, -0x1320, 0xf969, 0xe92e, 0xf913, 0x1282, 0x11c4, 0xf828, 0xe9cb, 0xfaac, 0x12d8, -0x1062, 0xf703, 0xea7e, 0xfc38, 0x130e, 0x0efa, 0xf5fb, 0xeb49, 0xfdb5, 0x1325, -0x0d8e, 0xf50e, 0xec26, 0xff20, 0x131e, 0x0c21, 0xf43f, 0xed15, 0x007a, 0x12fa, -0x0ab6, 0xf38d, 0xee15, 0x01be, 0x12bd, 0x094f, 0xf2f9, 0xef22, 0x02ef, 0x1265, -0x07f0, 0xf283, 0xf037, 0x0408, 0x11f6, 0x0699, 0xf226, 0xf156, 0x050a, 0x1170, -0x054b, 0xf1e8, 0xf27a, 0x05f4, 0x10d8, 0x040c, 0xf1c5, 0xf3a3, 0x06c2, 0x102c, -0x02da, 0xf1bc, 0xf4cc, 0x0779, 0x0f71, 0x01b7, 0xf1cc, 0xf5f5, 0x0815, 0x0ea7, -0x00a8, 0xf1f4, 0xf719, 0x0899, 0x0dd2, 0xffab, 0xf233, 0xf839, 0x0902, 0x0cf4, -0xfec0, 0xf288, 0xf950, 0x0952, 0x0c0e, 0xfdec, 0xf2ee, 0xfa5d, 0x0989, 0x0b23, -0xfd2d, 0xf368, 0xfb62, 0x09a7, 0x0a35, 0xfc85, 0xf3f1, 0xfc58, 0x09af, 0x0946, -0xfbf2, 0xf488, 0xfd3f, 0x09a1, 0x0859, 0xfb77, 0xf52c, 0xfe17, 0x097d, 0x076f, -0xfb14, 0xf5d8, 0xfede, 0x0945, 0x068a, 0xfac6, 0xf68d, 0xff93, 0x08fb, 0x05ad, -0xfa8e, 0xf747, 0x0034, 0x08a1, 0x04da, 0xfa6f, 0xf805, 0x00c2, 0x0836, 0x0410, -0xfa63, 0xf8c6, 0x013c, 0x07bf, 0x0354, 0xfa6c, 0xf985, 0x01a1, 0x073b, 0x02a4, -0xfa8a, 0xfa43, 0x01f1, 0x06af, 0x0204, 0xfab9, 0xfafc, 0x022c, 0x0619, 0x0175, -0xfafa, 0xfbae, 0x0252, 0x057f, 0x00f6, 0xfb4b, 0xfc5a, 0x0263, 0x04e0, 0x008b, -0xfbaa, 0xfcfa, 0x0262, 0x0440, 0x0032, 0xfc16, 0xfd90, 0x024b, 0x03a0, 0xffec, -0xfc8c, 0xfe19, 0x0225, 0x0301, 0xffb9, 0xfd0c, 0xfe93, 0x01ea, 0x0267, 0xff9c, -0xfd95, 0xfefe, 0x01a0, 0x01d3, 0xff90, 0xfe22, 0xff5a, 0x0147, 0x0145, 0xff99, -0xfeb3, 0xffa1, 0x00e0, 0x00c3, 0xffb6, 0xff46, 0xffd9, 0x006d, 0x004b, 0xffe5, -0xffda, 0xfffc, 000000, 0xfffe, 000000, 0xffff, 000000, 0xffff, 0xffff, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000 }; diff --git a/libs/libiax2/src/busy.h b/libs/libiax2/src/busy.h deleted file mode 100644 index 2c642fae39e9d959201785e55b9e30be39e3425f..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/busy.h +++ /dev/null @@ -1,55 +0,0 @@ -/* busy.h: Generated from frequencies 480 and 620 - by gensound. 400 samples */ -static short busy[400] = { - 0, 13697, 24766, 31109, 31585, 26222, 16198, 3569, - -9162, -19575, -25812, -26935, -23069, -15322, -5493, 4339, - 12277, 16985, 17934, 15440, 10519, 4585, -908, -4827, - -6592, -6269, -4489, -2220, -467, 30, -983, -3203, - -5839, -7844, -8215, -6301, -2035, 3975, 10543, 16141, - 19260, 18787, 14322, 6338, -3845, -14296, -22858, -27611, - -27309, -21691, -11585, 1213, 14285, 25068, 31388, 31915, - 26457, 16010, 2568, -11282, -22885, -30054, -31509, -27120, - -17908, -5805, 6760, 17379, 24147, 26028, 23020, 16094, - 6931, -2478, -10279, -15136, -16474, -14538, -10253, -4949, - 0, 3515, 5052, 4688, 3045, 1069, -268, -272, - 1269, 3996, 7067, 9381, 9889, 7910, 3365, -3123, - -10320, -16622, -20424, -20510, -16384, -8448, 2006, 13026, - 22383, 28040, 28613, 23696, 13996, 1232, -12193, -23670, - -30918, -32459, -27935, -18190, -5103, 8795, 20838, 28764, - 31164, 27753, 19395, 7893, -4412, -15136, -22342, -24909, - -22717, -16609, -8143, 780, 8361, 13272, 14909, 13455, - 9758, 5067, 678, -2387, -3624, -3133, -1538, 224, - 1209, 751, -1315, -4580, -8145, -10848, -11585, -9628, - -4878, 2038, 9844, 16867, 21403, 22124, 18429, 10638, - 0, -11524, -21643, -28211, -29702, -25561, -16364, -3737, - 9946, 22044, 30180, 32733, 29182, 20210, 7573, -6269, - -18655, -27259, -30558, -28117, -20645, -9807, 2148, 12878, - 20426, 23599, 22173, 16865, 9117, 731, -6552, -11426, - -13269, -12216, -9050, -4941, -1118, 1460, 2335, 1635, - 0, -1635, -2335, -1460, 1118, 4941, 9050, 12216, - 13269, 11426, 6552, -731, -9117, -16865, -22173, -23599, - -20426, -12878, -2148, 9807, 20645, 28117, 30558, 27259, - 18655, 6269, -7573, -20210, -29182, -32733, -30180, -22044, - -9946, 3737, 16364, 25561, 29702, 28211, 21643, 11524, - 0, -10638, -18429, -22124, -21403, -16867, -9844, -2038, - 4878, 9628, 11585, 10848, 8145, 4580, 1315, -751, - -1209, -224, 1538, 3133, 3624, 2387, -678, -5067, - -9758, -13455, -14909, -13272, -8361, -780, 8143, 16609, - 22717, 24909, 22342, 15136, 4412, -7893, -19395, -27753, - -31164, -28764, -20838, -8795, 5103, 18190, 27935, 32459, - 30918, 23670, 12193, -1232, -13996, -23696, -28613, -28040, - -22383, -13026, -2006, 8448, 16384, 20510, 20424, 16622, - 10320, 3123, -3365, -7910, -9889, -9381, -7067, -3996, - -1269, 272, 268, -1069, -3045, -4688, -5052, -3515, - 0, 4949, 10253, 14538, 16474, 15136, 10279, 2478, - -6931, -16094, -23020, -26028, -24147, -17379, -6760, 5805, - 17908, 27120, 31509, 30054, 22885, 11282, -2568, -16010, - -26457, -31915, -31388, -25068, -14285, -1213, 11585, 21691, - 27309, 27611, 22858, 14296, 3845, -6338, -14322, -18787, - -19260, -16141, -10543, -3975, 2035, 6301, 8215, 7844, - 5839, 3203, 983, -30, 467, 2220, 4489, 6269, - 6592, 4827, 908, -4585, -10519, -15440, -17934, -16985, - -12277, -4339, 5493, 15322, 23069, 26935, 25812, 19575, - 9162, -3569, -16198, -26222, -31585, -31109, -24766, -13697, - -}; diff --git a/libs/libiax2/src/dialtone.h b/libs/libiax2/src/dialtone.h deleted file mode 100644 index 09b881487da06b420fd96c0b3e65dd697c927599..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/dialtone.h +++ /dev/null @@ -1,105 +0,0 @@ -/* dialtone.h: Generated from frequencies 350 and 440 - by gensound. 800 samples */ -static short dialtone[800] = { - 0, 9997, 19004, 26133, 30692, 32251, 30690, 26206, - 19286, 10657, 1206, -8116, -16396, -22848, -26895, -28221, - -26797, -22878, -16960, -9723, -1954, 5545, 12044, 16954, - 19887, 20687, 19434, 16420, 12107, 7061, 1881, -2866, - -6721, -9365, -10657, -10634, -9491, -7547, -5190, -2822, - -801, 607, 1263, 1168, 454, -633, -1784, -2669, - -2993, -2548, -1247, 855, 3558, 6538, 9388, 11665, - 12955, 12933, 11408, 8370, 3996, -1349, -7152, -12797, - -17635, -21060, -22583, -21895, -18914, -13807, -6985, 934, - 9180, 16913, 23309, 27654, 29422, 28342, 24429, 17998, - 9630, 123, -9589, -18538, -25813, -30667, -32588, -31360, - -27088, -20185, -11332, -1411, 8594, 17694, 24997, 29805, - 31675, 30473, 26374, 19844, 11585, 2455, -6618, -14745, - -21156, -25284, -26815, -25713, -22213, -16785, -10073, -2824, - 4203, 10318, 14969, 17794, 18653, 17628, 14998, 11197, - 6753, 2217, -1899, -5189, -7386, -8388, -8261, -7212, - -5555, -3657, -1881, -536, 169, 157, -515, -1664, - -3009, -4217, -4954, -4940, -3996, -2080, 697, 4081, - 7689, 11059, 13710, 15199, 15187, 13489, 10114, 5272, - -630, -7031, -13263, -18632, -22491, -24320, -23794, -20823, - -15582, -8498, -218, 8457, 16651, 23507, 28276, 30407, - 29606, 25876, 19524, 11134, 1511, -8401, -17616, -25208, - -30406, -32682, -31800, -27845, -21215, -12576, -2796, 7150, - 16278, 23700, 28713, 30868, 30015, 26312, 20199, 12351, - 3598, -5164, -13071, -19378, -23531, -25223, -24413, -21318, - -16384, -10218, -3526, 2980, 8655, 12985, 15642, 16505, - 15661, 13381, 10073, 6228, 2348, -1110, -3796, -5495, - -6152, -5863, -4853, -3434, -1954, -744, -62, -60, - -757, -2037, -3664, -5317, -6637, -7283, -6985, -5590, - -3096, 334, 4390, 8631, 12544, 15605, 17339, 17393, - 15582, 11928, 6672, 258, -6705, -13506, -19403, -23711, - -25879, -25558, -22653, -17341, -10061, -1480, 7570, 16185, - 23475, 28661, 31164, 30670, 27167, 20951, 12603, 2930, - -7116, -16540, -24401, -29915, -32533, -32003, -28391, -22075, - -13704, -4128, 5690, 14781, 22262, 27432, 29838, 29319, - 26014, 20339, 12940, 4614, -3777, -11401, -17540, -21660, - -23463, -22908, -20199, -15755, -10150, -4044, 1898, 7079, - 11030, 13459, 14268, 13555, 11585, 8745, 5487, 2268, - -511, -2559, -3716, -3975, -3468, -2440, -1206, -101, - 578, 618, -78, -1470, -3382, -5524, -7531, -9018, - -9630, -9103, -7308, -4280, -226, 4483, 9357, 13829, - 17329, 19352, 19524, 17659, 13788, 8177, 1302, -6184, - -13528, -19945, -24710, -27240, -27167, -24381, -19058, -11646, - -2830, 6539, 15528, 23219, 28806, 31685, 31520, 28282, - 22254, 14010, 4355, -5759, -15331, -23411, -29203, -32144, - -31966, -28714, -22748, -14695, -5384, 4241, 13228, 20707, - 25981, 28600, 28391, 25479, 20256, 13337, 5482, -2482, - -9761, -15668, -19694, -21556, -21215, -18865, -14902, -9864, - -4366, 975, 5614, 9130, 11270, 11967, 11332, 9628, - 7223, 4536, 1976, -113, -1495, -2071, -1882, -1102, - 0, 1102, 1882, 2071, 1495, 113, -1976, -4536, - -7223, -9628, -11332, -11967, -11270, -9130, -5614, -975, - 4366, 9864, 14902, 18865, 21215, 21556, 19694, 15668, - 9761, 2482, -5482, -13337, -20256, -25479, -28391, -28600, - -25981, -20707, -13228, -4241, 5384, 14695, 22748, 28714, - 31966, 32144, 29203, 23411, 15331, 5759, -4355, -14010, - -22254, -28282, -31520, -31685, -28806, -23219, -15528, -6539, - 2830, 11646, 19058, 24381, 27167, 27240, 24710, 19945, - 13528, 6184, -1302, -8177, -13788, -17659, -19524, -19352, - -17329, -13829, -9357, -4483, 226, 4280, 7308, 9103, - 9630, 9018, 7531, 5524, 3382, 1470, 78, -618, - -578, 101, 1206, 2440, 3468, 3975, 3716, 2559, - 511, -2268, -5487, -8745, -11585, -13555, -14268, -13459, - -11030, -7079, -1898, 4044, 10150, 15755, 20199, 22908, - 23463, 21660, 17540, 11401, 3777, -4614, -12940, -20339, - -26014, -29319, -29838, -27432, -22262, -14781, -5690, 4128, - 13704, 22075, 28391, 32003, 32533, 29915, 24401, 16540, - 7116, -2930, -12603, -20951, -27167, -30670, -31164, -28661, - -23475, -16185, -7570, 1480, 10061, 17341, 22653, 25558, - 25879, 23711, 19403, 13506, 6705, -258, -6672, -11928, - -15582, -17393, -17339, -15605, -12544, -8631, -4390, -334, - 3096, 5590, 6985, 7283, 6637, 5317, 3664, 2037, - 757, 60, 62, 744, 1954, 3434, 4853, 5863, - 6152, 5495, 3796, 1110, -2348, -6228, -10073, -13381, - -15661, -16505, -15642, -12985, -8655, -2980, 3526, 10218, - 16384, 21318, 24413, 25223, 23531, 19378, 13071, 5164, - -3598, -12351, -20199, -26312, -30015, -30868, -28713, -23700, - -16278, -7150, 2796, 12576, 21215, 27845, 31800, 32682, - 30406, 25208, 17616, 8401, -1511, -11134, -19524, -25876, - -29606, -30407, -28276, -23507, -16651, -8457, 218, 8498, - 15582, 20823, 23794, 24320, 22491, 18632, 13263, 7031, - 630, -5272, -10114, -13489, -15187, -15199, -13710, -11059, - -7689, -4081, -697, 2080, 3996, 4940, 4954, 4217, - 3009, 1664, 515, -157, -169, 536, 1881, 3657, - 5555, 7212, 8261, 8388, 7386, 5189, 1899, -2217, - -6753, -11197, -14998, -17628, -18653, -17794, -14969, -10318, - -4203, 2824, 10073, 16785, 22213, 25713, 26815, 25284, - 21156, 14745, 6618, -2455, -11585, -19844, -26374, -30473, - -31675, -29805, -24997, -17694, -8594, 1411, 11332, 20185, - 27088, 31360, 32588, 30667, 25813, 18538, 9589, -123, - -9630, -17998, -24429, -28342, -29422, -27654, -23309, -16913, - -9180, -934, 6985, 13807, 18914, 21895, 22583, 21060, - 17635, 12797, 7152, 1349, -3996, -8370, -11408, -12933, - -12955, -11665, -9388, -6538, -3558, -855, 1247, 2548, - 2993, 2669, 1784, 633, -454, -1168, -1263, -607, - 801, 2822, 5190, 7547, 9491, 10634, 10657, 9365, - 6721, 2866, -1881, -7061, -12107, -16420, -19434, -20687, - -19887, -16954, -12044, -5545, 1954, 9723, 16960, 22878, - 26797, 28221, 26895, 22848, 16396, 8116, -1206, -10657, - -19286, -26206, -30690, -32251, -30692, -26133, -19004, -9997, - -}; diff --git a/libs/libiax2/src/frame.h b/libs/libiax2/src/frame.h deleted file mode 100644 index efc91d6af9cdb1fd22aa9501ba36bce6951feb0a..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/frame.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * libiax: An implementation of the Inter-Asterisk eXchange protocol - * - * Asterisk internal frame definitions. - * - * Copyright (C) 1999, Mark Spencer - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU Lesser General Public License. Other components of - * Asterisk are distributed under The GNU General Public License - * only. - */ - -#ifndef _LIBIAX_FRAME_H -#define _LIBIAX_FRAME_H - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -/* Frame types */ -#define AST_FRAME_DTMF 1 /* A DTMF digit, subclass is the digit */ -#define AST_FRAME_VOICE 2 /* Voice data, subclass is AST_FORMAT_* */ -#define AST_FRAME_VIDEO 3 /* Video frame, maybe?? :) */ -#define AST_FRAME_CONTROL 4 /* A control frame, subclass is AST_CONTROL_* */ -#define AST_FRAME_NULL 5 /* An empty, useless frame */ -#define AST_FRAME_IAX 6 /* Inter Aterisk Exchange private frame type */ -#define AST_FRAME_TEXT 7 /* Text messages */ -#define AST_FRAME_IMAGE 8 /* Image Frames */ -#define AST_FRAME_HTML 9 /* HTML Frames */ -#define AST_FRAME_CNG 10 /* Comfort Noise frame (subclass is level of CNG in -dBov) */ - -/* HTML subclasses */ -#define AST_HTML_URL 1 /* Sending a URL */ -#define AST_HTML_DATA 2 /* Data frame */ -#define AST_HTML_BEGIN 4 /* Beginning frame */ -#define AST_HTML_END 8 /* End frame */ -#define AST_HTML_LDCOMPLETE 16 /* Load is complete */ -#define AST_HTML_NOSUPPORT 17 /* Peer is unable to support HTML */ -#define AST_HTML_LINKURL 18 /* Send URL and track */ -#define AST_HTML_UNLINK 19 /* Request no more linkage */ -#define AST_HTML_LINKREJECT 20 /* Reject LINKURL */ - -/* Data formats for capabilities and frames alike */ -/*! G.723.1 compression */ -#define AST_FORMAT_G723_1 (1 << 0) - /*! GSM compression */ -#define AST_FORMAT_GSM (1 << 1) - /*! Raw mu-law data (G.711) */ -#define AST_FORMAT_ULAW (1 << 2) - /*! Raw A-law data (G.711) */ -#define AST_FORMAT_ALAW (1 << 3) - /*! ADPCM (G.726, 32kbps) */ -#define AST_FORMAT_G726 (1 << 4) - /*! ADPCM (IMA) */ -#define AST_FORMAT_ADPCM (1 << 5) - /*! Raw 16-bit Signed Linear (8000 Hz) PCM */ -#define AST_FORMAT_SLINEAR (1 << 6) - /*! LPC10, 180 samples/frame */ -#define AST_FORMAT_LPC10 (1 << 7) - /*! G.729A audio */ -#define AST_FORMAT_G729A (1 << 8) - /*! SpeeX Free Compression */ -#define AST_FORMAT_SPEEX (1 << 9) - /*! iLBC Free Compression */ -#define AST_FORMAT_ILBC (1 << 10) - /*! Maximum audio format */ -#define AST_FORMAT_MAX_AUDIO (1 << 15) - /*! JPEG Images */ -#define AST_FORMAT_JPEG (1 << 16) - /*! PNG Images */ -#define AST_FORMAT_PNG (1 << 17) - /*! H.261 Video */ -#define AST_FORMAT_H261 (1 << 18) - /*! H.263 Video */ -#define AST_FORMAT_H263 (1 << 19) - /*! H.263+ Video */ -#define AST_FORMAT_H263p (1 << 20) - /*! H.264 Video*/ -#define AST_FORMAT_H264 (1 << 21) - /*! MPEG4 Video*/ -#define AST_FORMAT_MPEG4 (1 << 22) - /*! Theora Video */ -#define AST_FORMAT_THEORA (1 << 24) - /*! Max one */ -#define AST_FORMAT_MAX_VIDEO (1 << 24) - -/* Control frame types */ -#define AST_CONTROL_HANGUP 1 /* Other end has hungup */ -#define AST_CONTROL_RING 2 /* Local ring */ -#define AST_CONTROL_RINGING 3 /* Remote end is ringing */ -#define AST_CONTROL_ANSWER 4 /* Remote end has answered */ -#define AST_CONTROL_BUSY 5 /* Remote end is busy */ -#define AST_CONTROL_TAKEOFFHOOK 6 /* Make it go off hook */ -#define AST_CONTROL_OFFHOOK 7 /* Line is off hook */ -#define AST_CONTROL_CONGESTION 8 /* Congestion (circuits busy) */ -#define AST_CONTROL_FLASH 9 /* Flash hook */ -#define AST_CONTROL_WINK 10 /* Wink */ -#define AST_CONTROL_OPTION 11 /* Set an option */ -#define AST_CONTROL_KEY_RADIO 12 /* Key Radio */ -#define AST_CONTROL_UNKEY_RADIO 13 /* Unkey Radio */ -#define AST_CONTROL_CALL_PROGRESS 14 /* Call is in progress */ -#define AST_CONTROL_CALL_PROCEEDING 15 /* Call is proceeding */ -#define AST_CONTROL_HOLD 16 /* Call is placed on hold */ -#define AST_CONTROL_UNHOLD 17 /* Call is taken off hold */ - -#define AST_FRIENDLY_OFFSET 64 /* Reserved header space */ - -struct ast_frame { - /*! Kind of frame */ - int frametype; - /*! Subclass, frame dependent */ - int subclass; - /*! Length of data */ - int datalen; - /*! Number of 8khz samples in this frame */ - int samples; - /*! Was the data malloc'd? i.e. should we free it when we discard the f -rame? */ - int mallocd; - /*! How far into "data" the data really starts */ - int offset; - /*! Optional source of frame for debugging */ - char *src; - /*! Pointer to actual data */ - void *data; - /*! Next/Prev for linking stand alone frames */ - struct ast_frame *prev; - /*! Next/Prev for linking stand alone frames */ - struct ast_frame *next; - /* Unused except - if debugging is turned on, but left - in the struct - so that it can be turned on without - requiring a r -ecompile of the whole thing */ -}; - - - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - - -#endif diff --git a/libs/libiax2/src/iax-client.h b/libs/libiax2/src/iax-client.h deleted file mode 100644 index bd5bf609b768ef55b502e2ae00158f17fe78d5f4..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax-client.h +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Asterisk -- A telephony toolkit for Linux. - * - * Implementation of Inter-Asterisk eXchange - * - * Copyright (C) 1999, Mark Spencer - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU Lesser General Public License (LGPL) - */ - -#ifndef _ASTERISK_IAX_CLIENT_H -#define _ASTERISK_IAX_CLIENT_H - -#if defined(_MSC_VER) -/* disable zero-sized array in struct/union warning */ -#pragma warning(disable:4200) -#endif - -#ifndef LINUX -#define socklen_t int -#endif - -#include "frame.h" -#include "iax2.h" -#include "iax2-parser.h" - -#define MAXSTRLEN 80 - -#define IAX_AUTHMETHOD_PLAINTEXT IAX_AUTH_PLAINTEXT -#define IAX_AUTHMETHOD_MD5 IAX_AUTH_MD5 - -extern char iax_errstr[]; - -struct iax_session; - - -#define IAX_EVENT_CONNECT 0 /* Connect a new call */ -#define IAX_EVENT_ACCEPT 1 /* Accept a call */ -#define IAX_EVENT_HANGUP 2 /* Hang up a call */ -#define IAX_EVENT_REJECT 3 /* Rejected call */ -#define IAX_EVENT_VOICE 4 /* Voice Data */ -#define IAX_EVENT_DTMF 5 /* A DTMF Tone */ -#define IAX_EVENT_TIMEOUT 6 /* Connection timeout... session - will be a pointer to free()'d - memory! */ -#define IAX_EVENT_LAGRQ 7 /* Lag request -- Internal use only */ -#define IAX_EVENT_LAGRP 8 /* Lag Measurement. See event.lag */ -#define IAX_EVENT_RINGA 9 /* Announce we/they are ringing */ -#define IAX_EVENT_PING 10 /* Ping -- internal use only */ -#define IAX_EVENT_PONG 11 /* Pong -- internal use only */ -#define IAX_EVENT_BUSY 12 /* Report a line busy */ -#define IAX_EVENT_ANSWER 13 /* Answer the line */ - -#define IAX_EVENT_IMAGE 14 /* Send/Receive an image */ -#define IAX_EVENT_AUTHRQ 15 /* Authentication request */ -#define IAX_EVENT_AUTHRP 16 /* Authentication reply */ - -#define IAX_EVENT_REGREQ 17 /* Registration request */ -#define IAX_EVENT_REGACK 18 /* Registration reply */ -#define IAX_EVENT_URL 19 /* URL received */ -#define IAX_EVENT_LDCOMPLETE 20 /* URL loading complete */ - -#define IAX_EVENT_TRANSFER 21 /* Transfer has taken place */ - -#define IAX_EVENT_DPREQ 22 /* Dialplan request */ -#define IAX_EVENT_DPREP 23 /* Dialplan reply */ -#define IAX_EVENT_DIAL 24 /* Dial on a TBD call */ - -#define IAX_EVENT_QUELCH 25 /* Quelch Audio */ -#define IAX_EVENT_UNQUELCH 26 /* Unquelch Audio */ - -#define IAX_EVENT_UNLINK 27 /* Unlink */ -#define IAX_EVENT_LINKREJECT 28 /* Link Rejection */ -#define IAX_EVENT_TEXT 29 /* Text Frame :-) */ -#define IAX_EVENT_REGREJ 30 /* Registration reply */ -#define IAX_EVENT_LINKURL 31 /* Unlink */ -#define IAX_EVENT_CNG 32 /* Comfort-noise (almost silence) */ -#define IAX_EVENT_POKE 33 -#define IAX_EVENT_VIDEO 34 /* Send/receive video */ - - -/* moved from iax.c to support attended transfer */ -#define IAX_EVENT_REREQUEST 999 -#define IAX_EVENT_TXREPLY 1000 -#define IAX_EVENT_TXREJECT 1001 -#define IAX_EVENT_TXACCEPT 1002 -#define IAX_EVENT_TXREADY 1003 - -/* - * Null event. We use it to notify back the caller that a frame has been - * received and is queued for delivery - * Applciations should simply ignore it - */ -#define IAX_EVENT_NULL 65535 - -#define IAX_SCHEDULE_FUZZ 0 /* ms of fuzz to drop */ - -#if defined(WIN32) || defined(_WIN32_WCE) -#if defined(_MSC_VER) -typedef int (__stdcall *iax_sendto_t)(SOCKET, const void *, size_t, int, - const struct sockaddr *, socklen_t); -typedef int (__stdcall *iax_recvfrom_t)(SOCKET, void *, size_t, int, - struct sockaddr *, socklen_t *); -#else -typedef int PASCAL (*iax_sendto_t)(SOCKET, const char *, int, int, - const struct sockaddr *, int); -typedef int PASCAL (*iax_recvfrom_t)(SOCKET, char *, int, int, - struct sockaddr *, int *); -#endif -#else -typedef int (*iax_sendto_t)(int, const void *, size_t, int, - const struct sockaddr *, socklen_t); -typedef int (*iax_recvfrom_t)(int, void *, size_t, int, - struct sockaddr *, socklen_t *); -#endif - -struct iax_event { - int etype; /* Type of event */ - int subclass; /* Subclass data (event specific) */ - unsigned int ts; /* Timestamp */ - struct iax_session *session; /* Applicable session */ - int datalen; /* Length of raw data */ - struct iax_ies ies; /* IE's for IAX2 frames */ - unsigned char data[0]; /* Raw data if applicable */ -}; - -#if defined(__cplusplus) -extern "C" -{ -#endif - -/* All functions return 0 on success and -1 on failure unless otherwise - specified */ - -/* Called to initialize IAX structures and sockets. Returns actual - portnumber (which it will try preferred portno first, but if not - take what it can get */ -extern int iax_init(int preferredportno); - -/* Get filedescriptor for IAX to use with select or gtk_input_add */ -extern int iax_get_fd(void); - -/* Find out how many milliseconds until the next scheduled event */ -extern int iax_time_to_next_event(void); - -/* Generate a new IAX session */ -extern struct iax_session *iax_session_new(void); - -/* Return exactly one iax event (if there is one pending). If blocking is - non-zero, IAX will block until some event is received */ -extern struct iax_event *iax_get_event(int blocking); - - -extern int iax_auth_reply(struct iax_session *session, char *password, - char *challenge, int methods); - -/* Free an event */ -extern void iax_event_free(struct iax_event *event); - -struct sockaddr_in; - -/* Front ends for sending events */ -extern int iax_send_dtmf(struct iax_session *session, char digit); -extern int iax_send_voice(struct iax_session *session, int format, unsigned char *data, int datalen, int samples); -extern int iax_send_cng(struct iax_session *session, int level, unsigned char *data, int datalen); -extern int iax_send_image(struct iax_session *session, int format, unsigned char *data, int datalen); -extern int iax_send_url(struct iax_session *session, const char *url, int link); -extern int iax_send_text(struct iax_session *session, const char *text); -extern int iax_send_ping(struct iax_session *session); -extern int iax_load_complete(struct iax_session *session); -extern int iax_reject(struct iax_session *session, char *reason); -extern int iax_busy(struct iax_session *session); -extern int iax_congestion(struct iax_session *session); -extern int iax_hangup(struct iax_session *session, char *byemsg); -extern int iax_call(struct iax_session *session, const char *cidnum, const char *cidname, const char *ich, const char *lang, int wait, int format, int capability); -extern int iax_accept(struct iax_session *session, int format); -extern int iax_answer(struct iax_session *session); -extern int iax_sendurl(struct iax_session *session, char *url); -extern int iax_send_unlink(struct iax_session *session); -extern int iax_send_link_reject(struct iax_session *session); -extern int iax_ring_announce(struct iax_session *session); -extern struct sockaddr_in iax_get_peer_addr(struct iax_session *session); -extern int iax_register(struct iax_session *session, const char *hostname, const char *peer, const char *secret, int refresh); -extern int iax_lag_request(struct iax_session *session); -extern int iax_dial(struct iax_session *session, char *number); /* Dial on a TBD call */ -extern int iax_dialplan_request(struct iax_session *session, char *number); /* Request dialplan status for number */ -extern int iax_quelch(struct iax_session *session); -extern int iax_unquelch(struct iax_session * session); -extern int iax_transfer(struct iax_session *session, const char *number); -extern int iax_quelch_moh(struct iax_session *session, int MOH); -extern int iax_send_video(struct iax_session *session, int format, unsigned char *data, int datalen, int fullframe); -extern int iax_send_video_trunk(struct iax_session *session, int format, char *data, int datalen, int fullframe, int ntrunk); - -extern void iax_destroy(struct iax_session * session); - -extern void iax_enable_debug(void); -extern void iax_disable_debug(void); - -/* For attended transfer, application create a new session, - * make a call on the new session. - * On answer of the new session, call iax_setup_transfer and wait for - * IAX_EVENT_TXREADY when both sides are completed succefully or - * IAX_EVENT_TXREJECT for either side. - * If there are music on hold the it will be stopped by this library. - */ -extern int iax_setup_transfer(struct iax_session *s0, struct iax_session *s1); - -struct iax_netstat { - int jitter; - int losspct; - int losscnt; - int packets; - int delay; - int dropped; - int ooo; -}; -/* fills in rtt, and an iax_netstat structure for each of local/remote directions of call */ -extern int iax_get_netstats(struct iax_session *s, int *rtt, struct iax_netstat *local, struct iax_netstat *remote); - - -extern void iax_set_private(struct iax_session *s, void *pvt); -extern void *iax_get_private(struct iax_session *s); -extern void iax_set_sendto(struct iax_session *s, iax_sendto_t sendto); - -/* to use application networking instead of internal, set call this instead of iax_init, - * and pass in sendto and recvfrom replacements. blocking reads may not be implemented */ -extern void iax_set_networking(iax_sendto_t st, iax_recvfrom_t rf); - -/* destroy an iax session */ -extern void iax_session_destroy(struct iax_session **session); - -/* To control use of jitter buffer for video event */ -int iax_video_bypass_jitter(struct iax_session*, int ); - -/* Handle externally received frames */ -struct iax_event *iax_net_process(unsigned char *buf, int len, struct sockaddr_in *sin); -extern unsigned int iax_session_get_capability(struct iax_session *s); -extern char iax_pref_codec_add(struct iax_session *session, unsigned int format); -extern void iax_pref_codec_del(struct iax_session *session, unsigned int format); -extern int iax_pref_codec_get(struct iax_session *session, unsigned int *array, int len); - -/* Fine tune jitterbuffer */ -extern void iax_set_jb_target_extra( long value ); - -#if defined(__cplusplus) -} -#endif - -#endif /* _ASTERISK_IAX_CLIENT_H */ diff --git a/libs/libiax2/src/iax.c b/libs/libiax2/src/iax.c deleted file mode 100644 index 5c184a1de6727ce75b0ed00ffa588b593cbeb4d1..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax.c +++ /dev/null @@ -1,3384 +0,0 @@ - /* - * libiax: An implementation of Inter-Asterisk eXchange - * - * Copyright (C) 2001, Linux Support Services, Inc. - * - * Mark Spencer <markster@linux-support.net> - * Frik Strecker <frik@gatherworks.com> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if defined(WIN32) || defined(_WIN32_WCE) -#undef __STRICT_ANSI__ //for strdup with ms - -#if defined(_WIN32_WCE) -#define strdup _strdup -#else -#include <process.h> -#include <fcntl.h> -#include <io.h> -#include <errno.h> -#endif -#include <string.h> -#include <windows.h> -#include <winsock.h> -#include <time.h> -#include <stdlib.h> -#include <malloc.h> -#include <stdarg.h> -#include <stdio.h> -#include <limits.h> - - -#define snprintf _snprintf - -#if defined(_MSC_VER) -#define close closesocket -#if !defined(_WIN32_WCE) -#define inline __inline -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif -void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz); -#ifdef __cplusplus -} -#endif - -#else - -#include <netdb.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <sys/time.h> -#include <stdlib.h> -#ifdef __GNUC__ -#ifndef __USE_SVID -#define __USE_SVID -#endif -#endif -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/select.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <time.h> - -#ifndef MACOSX -#include <malloc.h> -#ifndef SOLARIS -#include <error.h> -#endif -#endif - -#endif - -#include "jitterbuf.h" -#include "iax-client.h" -#include "md5.h" - -/* Define socket options for IAX2 sockets, based on platform - * availability of flags */ -#if defined(WIN32) || defined(_WIN32_WCE) -#define IAX_SOCKOPTS 0 -#else -#ifdef MACOSX -#define IAX_SOCKOPTS MSG_DONTWAIT -#else -#ifdef SOLARIS -#define IAX_SOCKOPTS MSG_DONTWAIT -#else /* Linux and others */ -#define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL -#endif -#endif -#endif - - -#ifdef SNOM_HACK -/* The snom phone seems to improperly execute memset in some cases */ -#include "../../snom_phonecore2/include/snom_memset.h" -#endif - -/* Voice TS Prediction causes libiax2 to clean up the timestamps on - * outgoing frames. It works best with either continuous voice, or - * callers who call iax_send_cng to indicate DTX for silence */ -#define USE_VOICE_TS_PREDICTION - -#define MIN_RETRY_TIME 10 -#define MAX_RETRY_TIME 4000 -#define MEMORY_SIZE 1000 - -#define TRANSFER_NONE 0 -#define TRANSFER_BEGIN 1 -#define TRANSFER_READY 2 -#define TRANSFER_REL 3 - -/* Video frames bypass jitterbuffer */ -static int video_bypass_jitterbuffer = 0; - -/* UDP Socket (file descriptor) */ -static int netfd = -1; - -/* Max timeouts */ -static const int maxretries = 10; - -/* configurable jitterbuffer options */ -static long jb_target_extra = -1; - -/* external global networking replacements */ -static iax_sendto_t iax_sendto = (iax_sendto_t) sendto; -static iax_recvfrom_t iax_recvfrom = (iax_recvfrom_t) recvfrom; - -/* ping interval (seconds) */ -static int ping_time = 10; -static void send_ping(void *session); - -struct iax_session { - /** Private data */ - void *pvt; - /** session-local Sendto function */ - iax_sendto_t sendto; - /** Is voice quelched (e.g. hold) */ - int quelch; - /** Codec Pref Order */ - char codec_order[32]; - /** Codec Pref Order Index*/ - int codec_order_len; - /** Last received voice format */ - int voiceformat; - /** Last transmitted voice format */ - int svoiceformat; - /** Last received video format */ - int videoformat; - /** Last transmitted video format */ - int svideoformat; - /** Per session capability */ - int capability; - /** Last received timestamp */ - unsigned int last_ts; - /** Last transmitted timestamp */ - unsigned int lastsent; -#ifdef USE_VOICE_TS_PREDICTION - /** Next predicted voice ts */ - unsigned int nextpred; - /** True if the last voice we transmitted was not silence/CNG */ - int notsilenttx; -#endif - /** Our last measured ping time */ - unsigned int pingtime; - /** Address of peer */ - struct sockaddr_in peeraddr; - /** Our call number */ - int callno; - /** Peer's call number */ - int peercallno; - /** Our next outgoing sequence number */ - unsigned char oseqno; - /** Next sequence number they have not yet acknowledged */ - unsigned char rseqno; - /** Our last received incoming sequence number */ - unsigned char iseqno; - /** Last acknowledged sequence number */ - unsigned char aseqno; - /** Last sequence number we VNAKd */ - unsigned char lastvnak; - /** Time value that we base our transmission on */ - struct timeval offset; - /** Time value we base our delivery on */ - struct timeval rxcore; - /** Current link state */ - int state; - /** Expected Username */ - char username[MAXSTRLEN]; - /** Expected Secret */ - char secret[MAXSTRLEN]; - /** Refresh if applicable */ - int refresh; - - /** ping scheduler id */ - int pingid; - - /** Transfer stuff */ - struct sockaddr_in transfer; - int transferring; - int transfercallno; - int transferid; - int transferpeer; /** for attended transfer */ - int transfer_moh; /** for music on hold while performing attended transfer */ - - jitterbuf *jb; - - struct iax_netstat remote_netstats; - - /** For linking if there are multiple connections */ - struct iax_session *next; -}; - -char iax_errstr[256]; - - -#define IAXERROR snprintf(iax_errstr, sizeof(iax_errstr), - -#ifdef DEBUG_SUPPORT - -#ifdef DEBUG_DEFAULT -static int debug = 1; -#else -static int debug = 0; -#endif - -void iax_enable_debug(void) -{ - debug = 1; -} - -void iax_disable_debug(void) -{ - debug = 0; -} - - -/* This is a little strange, but to debug you call DEBU(G "Hello World!\n"); */ -#if defined(WIN32) || defined(_WIN32_WCE) -#define G __FILE__, __LINE__, -#else -#define G __FILE__, __LINE__, __PRETTY_FUNCTION__, -#endif - -#define DEBU __debug -#if defined(WIN32) || defined(_WIN32_WCE) -static int __debug(char *file, int lineno, char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - if (debug) { - fprintf(stderr, "%s line %d: ", file, lineno); - vfprintf(stderr, fmt, args); - } - va_end(args); - return 0; -} -#else -static int __debug(char *file, int lineno, char *func, char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - if (debug) { - fprintf(stderr, "%s line %d in %s: ", file, lineno, func); - vfprintf(stderr, fmt, args); - } - va_end(args); - return 0; -} -#endif -#else /* No debug support */ - -#if defined(WIN32) || defined(_WIN32_WCE) -#define DEBU -#else -#define DEBU(fmt...) \ - do {} while(0) -#endif -#define G -#endif - -typedef void (*sched_func)(void *); - -struct iax_sched { - /** These are scheduled things to be delivered */ - struct timeval when; - /** If event is non-NULL then we're delivering an event */ - struct iax_event *event; - /** If frame is non-NULL then we're transmitting a frame */ - struct iax_frame *frame; - /** If func is non-NULL then we should call it */ - sched_func func; - /** and pass it this argument */ - void *arg; - /** Easy linking */ - struct iax_sched *next; -}; - -static struct iax_sched *schedq = NULL; -static struct iax_session *sessions = NULL; -static int callnums = 1; -static int transfer_id = 1; /** for attended transfer */ - - -void iax_set_private(struct iax_session *s, void *ptr) -{ - s->pvt = ptr; -} - -void *iax_get_private(struct iax_session *s) -{ - return s->pvt; -} - -void iax_set_sendto(struct iax_session *s, iax_sendto_t ptr) -{ - s->sendto = ptr; -} - - -unsigned int iax_session_get_capability(struct iax_session *s) -{ - return s->capability; -} - - -static int inaddrcmp(struct sockaddr_in *sin1, struct sockaddr_in *sin2) -{ - return (sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) || (sin1->sin_port != sin2->sin_port); -} - -static int iax_sched_add(struct iax_event *event, struct iax_frame *frame, sched_func func, void *arg, int ms) -{ - - /* Schedule event to be delivered to the client - in ms milliseconds from now, or a reliable frame to be retransmitted */ - struct iax_sched *sched, *cur, *prev = NULL; - - if (!event && !frame && !func) { - DEBU(G "No event, no frame, no func? what are we scheduling?\n"); - return -1; - } - - //fprintf(stderr, "scheduling event %d ms from now\n", ms); - sched = (struct iax_sched*)malloc(sizeof(struct iax_sched)); - if (sched) { - memset(sched, 0, sizeof(struct iax_sched)); - gettimeofday(&sched->when, NULL); - sched->when.tv_sec += (ms / 1000); - ms = ms % 1000; - sched->when.tv_usec += (ms * 1000); - if (sched->when.tv_usec > 1000000) { - sched->when.tv_usec -= 1000000; - sched->when.tv_sec++; - } - sched->event = event; - sched->frame = frame; - sched->func = func; - sched->arg = arg; - /* Put it in the list, in order */ - cur = schedq; - while(cur && ((cur->when.tv_sec < sched->when.tv_sec) || - ((cur->when.tv_usec <= sched->when.tv_usec) && - (cur->when.tv_sec == sched->when.tv_sec)))) { - prev = cur; - cur = cur->next; - } - sched->next = cur; - if (prev) { - prev->next = sched; - } else { - schedq = sched; - } - return 0; - } else { - DEBU(G "Out of memory!\n"); - return -1; - } -} - -static int iax_sched_del(struct iax_event *event, struct iax_frame *frame, sched_func func, void *arg, int all) -{ - struct iax_sched *cur, *tmp, *prev = NULL; - - cur = schedq; - while (cur) { - if (cur->event == event && cur->frame == frame && cur->func == func && cur->arg == arg) { - if (prev) - prev->next = cur->next; - else - schedq = cur->next; - tmp = cur; - cur = cur->next; - free(tmp); - if (!all) - return -1; - } else { - prev = cur; - cur = cur->next; - } - } - return 0; -} - - -int iax_time_to_next_event(void) -{ - struct timeval tv; - struct iax_sched *cur = schedq; - int ms, min = 999999999; - - /* If there are no pending events, we don't need to timeout */ - if (!cur) - return -1; - gettimeofday(&tv, NULL); - while(cur) { - ms = (cur->when.tv_sec - tv.tv_sec) * 1000 + - (cur->when.tv_usec - tv.tv_usec) / 1000; - if (ms < min) - min = ms; - cur = cur->next; - } - if (min < 0) - min = 0; - return min; -} - -struct iax_session *iax_session_new(void) -{ - struct iax_session *s; - s = (struct iax_session *)malloc(sizeof(struct iax_session)); - if (s) { - jb_conf jbconf; - - memset(s, 0, sizeof(struct iax_session)); - /* Initialize important fields */ - s->voiceformat = -1; - s->svoiceformat = -1; - s->videoformat = -1; - /* Default pingtime to 100 ms -- should cover most decent net connections */ - s->pingtime = 100; - /* XXX Not quite right -- make sure it's not in use, but that won't matter - unless you've had at least 65k calls. XXX */ - s->callno = callnums++; - if (callnums > 32767) - callnums = 1; - s->peercallno = 0; - s->lastvnak = -1; - s->transferpeer = 0; /* for attended transfer */ - s->next = sessions; - s->sendto = iax_sendto; - s->pingid = -1; - - s->jb = jb_new(); - if ( !s->jb ) - { - free(s); - return 0; - } - jbconf.max_jitterbuf = 0; - jbconf.resync_threshold = 1000; - jbconf.max_contig_interp = 0; - jbconf.target_extra = jb_target_extra; - jb_setconf(s->jb, &jbconf); - - sessions = s; - } - return s; -} - -static int iax_session_valid(struct iax_session *session) -{ - /* Return -1 on a valid iax session pointer, 0 on a failure */ - struct iax_session *cur = sessions; - while(cur) { - if (session == cur) - return -1; - cur = cur->next; - } - return 0; -} - -int iax_get_netstats(struct iax_session *session, int *rtt, struct iax_netstat *local, struct iax_netstat *remote) -{ - jb_info stats; - - if(!iax_session_valid(session)) return -1; - - *rtt = session->pingtime; - - *remote = session->remote_netstats; - - jb_getinfo(session->jb, &stats); - - local->jitter = stats.jitter; - /* XXX: should be short-term loss pct.. */ - if(stats.frames_in == 0) stats.frames_in = 1; - local->losspct = stats.losspct/1000; - local->losscnt = stats.frames_lost; - local->packets = stats.frames_in; - local->delay = stats.current - stats.min; - local->dropped = stats.frames_dropped; - local->ooo = stats.frames_ooo; - - return 0; -} - -#ifdef USE_VOICE_TS_PREDICTION -static void add_ms(struct timeval *tv, int ms) -{ - tv->tv_usec += ms * 1000; - if(tv->tv_usec > 1000000) { - tv->tv_usec -= 1000000; - tv->tv_sec++; - } - if(tv->tv_usec < 0) { - tv->tv_usec += 1000000; - tv->tv_sec--; - } -} -#endif - -static int calc_timestamp(struct iax_session *session, unsigned int ts, struct ast_frame *f) -{ - int ms; - struct timeval tv; - int voice = 0; - int video = 0; - int genuine = 0; - - if ( f && f->frametype == AST_FRAME_VOICE ) - { - voice = 1; - } else if ( f && f->frametype == AST_FRAME_VIDEO ) - { - video = 1; - } else if (!f || f->frametype == AST_FRAME_IAX) - { - genuine = 1; - } - - /* If this is the first packet we're sending, get our - offset now. */ - if (!session->offset.tv_sec && !session->offset.tv_usec) - gettimeofday(&session->offset, NULL); - - /* If the timestamp is specified, just use their specified - timestamp no matter what. Usually this is done for - special cases. */ - if (ts) - { - if ( f && session ) - session->lastsent = ts; - return ts; - } - - /* Otherwise calculate the timestamp from the current time */ - gettimeofday(&tv, NULL); - - /* Calculate the number of milliseconds since we sent the first packet */ - ms = (tv.tv_sec - session->offset.tv_sec) * 1000 + - (tv.tv_usec - session->offset.tv_usec) / 1000; - - if (ms < 0) - ms = 0; - - if(voice) { -#ifdef USE_VOICE_TS_PREDICTION - /* If we haven't most recently sent silence, and we're - * close in time, use predicted time */ - if(session->notsilenttx && abs(ms - session->nextpred) <= 240) { - /* Adjust our txcore, keeping voice and non-voice - * synchronized */ - add_ms(&session->offset, (int)(ms - session->nextpred)/10); - - if(!session->nextpred) - session->nextpred = ms; - ms = session->nextpred; - } else { - /* in this case, just use the actual time, since - * we're either way off (shouldn't happen), or we're - * ending a silent period -- and seed the next predicted - * time. Also, round ms to the next multiple of - * frame size (so our silent periods are multiples - * of frame size too) */ - int diff = ms % (f->samples / 8); - if(diff) - ms += f->samples/8 - diff; - session->nextpred = ms; - } - session->notsilenttx = 1; -#else - if(ms <= session->lastsent) - ms = session->lastsent + 3; -#endif - } else if (video) { - if ((unsigned int)ms <= session->lastsent) - ms = session->lastsent + 3; - } else { - /* On a dataframe, use last value + 3 (to accomodate jitter buffer shrinking) - if appropriate unless it's a genuine frame */ - if (genuine) { - if ((unsigned int)ms <= session->lastsent) - ms = session->lastsent + 3; - } else if (abs(ms - session->lastsent) <= 240) { - ms = session->lastsent + 3; - } - - } - - /* Record the last sent packet for future reference */ - /* unless an AST_FRAME_IAX */ - if (!genuine) - session->lastsent = ms; - -#ifdef USE_VOICE_TS_PREDICTION - /* set next predicted ts based on 8khz samples */ - if(voice) - session->nextpred = session->nextpred + f->samples / 8; -#endif - - return ms; -} - -static unsigned char get_n_bits_at(unsigned char *data, int n, int bit) -{ - int byte = bit / 8; /* byte containing first bit */ - int rem = 8 - (bit % 8); /* remaining bits in first byte */ - unsigned char ret = 0; - - if (n <= 0 || n > 8) - return 0; - - if (rem < n) { - ret = (data[byte] << (n - rem)); - ret |= (data[byte + 1] >> (8 - n + rem)); - } else { - ret = (data[byte] >> (rem - n)); - } - - return (ret & (0xff >> (8 - n))); -} - -static int speex_get_wb_sz_at(unsigned char *data, int len, int bit) -{ - static int SpeexWBSubModeSz[] = { - 0, 36, 112, 192, - 352, 0, 0, 0 }; - int off = bit; - unsigned char c; - - /* skip up to two wideband frames */ - if (((len * 8 - off) >= 5) && - get_n_bits_at(data, 1, off)) { - c = get_n_bits_at(data, 3, off + 1); - off += SpeexWBSubModeSz[c]; - - if (((len * 8 - off) >= 5) && - get_n_bits_at(data, 1, off)) { - c = get_n_bits_at(data, 3, off + 1); - off += SpeexWBSubModeSz[c]; - - if (((len * 8 - off) >= 5) && - get_n_bits_at(data, 1, off)) { - /* too many in a row */ - DEBU(G "\tCORRUPT too many wideband streams in a row\n"); - return -1; - } - } - - } - return off - bit; -} - -static int speex_get_samples(unsigned char *data, int len) -{ - static int SpeexSubModeSz[] = { - 0, 43, 119, 160, - 220, 300, 364, 492, - 79, 0, 0, 0, - 0, 0, 0, 0 }; - static int SpeexInBandSz[] = { - 1, 1, 4, 4, - 4, 4, 4, 4, - 8, 8, 16, 16, - 32, 32, 64, 64 }; - int bit = 0; - int cnt = 0; - int off = 0; - unsigned char c; - - DEBU(G "speex_get_samples(%d)\n", len); - while ((len * 8 - bit) >= 5) { - /* skip wideband frames */ - off = speex_get_wb_sz_at(data, len, bit); - if (off < 0) { - DEBU(G "\tERROR reading wideband frames\n"); - break; - } - bit += off; - - if ((len * 8 - bit) < 5) { - DEBU(G "\tERROR not enough bits left after wb\n"); - break; - } - - /* get control bits */ - c = get_n_bits_at(data, 5, bit); - DEBU(G "\tCONTROL: %d at %d\n", c, bit); - bit += 5; - - if (c == 15) { - DEBU(G "\tTERMINATOR\n"); - break; - } else if (c == 14) { - /* in-band signal; next 4 bits contain signal id */ - c = get_n_bits_at(data, 4, bit); - bit += 4; - DEBU(G "\tIN-BAND %d bits\n", SpeexInBandSz[c]); - bit += SpeexInBandSz[c]; - } else if (c == 13) { - /* user in-band; next 5 bits contain msg len */ - c = get_n_bits_at(data, 5, bit); - bit += 5; - DEBU(G "\tUSER-BAND %d bytes\n", c); - bit += c * 8; - } else if (c > 8) { - DEBU(G "\tUNKNOWN sub-mode %d\n", c); - break; - } else { - /* skip number bits for submode (less the 5 control bits) */ - DEBU(G "\tSUBMODE %d %d bits\n", c, SpeexSubModeSz[c]); - bit += SpeexSubModeSz[c] - 5; - - cnt += 160; /* new frame */ - } - } - DEBU(G "\tSAMPLES: %d\n", cnt); - return cnt; -} - -static inline int get_interp_len(int format) -{ - return (format == AST_FORMAT_ILBC) ? 30 : 20; -} - -static int get_sample_cnt(struct iax_event *e) -{ - int cnt = 0; - - /* - * In the case of zero length frames, do not return a cnt of 0 - */ - if ( e->datalen == 0 ) { - return get_interp_len( e->subclass ) * 8; - } - - switch (e->subclass) { - case AST_FORMAT_SPEEX: - cnt = speex_get_samples(e->data, e->datalen); - break; - case AST_FORMAT_G723_1: - cnt = 240; /* FIXME Not always the case */ - break; - case AST_FORMAT_ILBC: - cnt = 240 * (e->datalen / 50); - break; - case AST_FORMAT_GSM: - cnt = 160 * (e->datalen / 33); - break; - case AST_FORMAT_G729A: - cnt = 160 * (e->datalen / 20); - break; - case AST_FORMAT_SLINEAR: - cnt = e->datalen / 2; - break; - case AST_FORMAT_LPC10: - cnt = 22 * 8 + (((char *)(e->data))[7] & 0x1) * 8; - break; - case AST_FORMAT_ULAW: - case AST_FORMAT_ALAW: - cnt = e->datalen; - break; - case AST_FORMAT_ADPCM: - case AST_FORMAT_G726: - cnt = e->datalen * 2; - break; - default: - return 0; - } - return cnt; -} - -static int iax_xmit_frame(struct iax_frame *f) -{ - int res; -#ifdef DEBUG_SUPPORT - struct ast_iax2_full_hdr *h = (struct ast_iax2_full_hdr *)(f->data); - - if (ntohs(h->scallno) & IAX_FLAG_FULL) - iax_showframe(f, NULL, 0, f->transfer ? - &(f->session->transfer) : - &(f->session->peeraddr), - f->datalen - sizeof(struct ast_iax2_full_hdr)); -#endif - /* Send the frame raw */ - res = f->session->sendto(netfd, (const char *) f->data, f->datalen, IAX_SOCKOPTS, - f->transfer ? (struct sockaddr *)&(f->session->transfer) : - (struct sockaddr *)&(f->session->peeraddr), - sizeof(f->session->peeraddr)); - return res; -} - -static int iax_reliable_xmit(struct iax_frame *f) -{ - struct iax_frame *fc; - struct ast_iax2_full_hdr *fh; - fh = (struct ast_iax2_full_hdr *) f->data; - if (!fh->type) { - return -2; - } - fc = (struct iax_frame *)malloc(sizeof(struct iax_frame)); - if (fc) { - /* Make a copy of the frame */ - memcpy(fc, f, sizeof(struct iax_frame)); - /* And a copy of the data if applicable */ - if (!fc->data || !fc->datalen) { - IAXERROR "No frame data?"); - DEBU(G "No frame data?\n"); - return -1; - } else { - fc->data = (char *)malloc(fc->datalen); - if (!fc->data) { - DEBU(G "Out of memory\n"); - IAXERROR "Out of memory\n"); - return -1; - } - memcpy(fc->data, f->data, f->datalen); - iax_sched_add(NULL, fc, NULL, NULL, fc->retrytime); - return iax_xmit_frame(fc); - } - } else - return -1; -} - -void iax_set_networking(iax_sendto_t st, iax_recvfrom_t rf) -{ - iax_sendto = st; - iax_recvfrom = rf; -} - -void iax_set_jb_target_extra( long value ) -{ - /* store in jb_target_extra, a static global */ - jb_target_extra = value ; -} - -int iax_init(int preferredportno) -{ - int portno = preferredportno; - - if (iax_recvfrom == (iax_recvfrom_t)recvfrom) - { - struct sockaddr_in sin; - socklen_t sinlen; - int flags; - int bufsize = 256 * 1024; - - if (netfd > -1) - { - /* Okay, just don't do anything */ - DEBU(G "Already initialized."); - return 0; - } - netfd = (int)socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); - if (netfd < 0) - { - DEBU(G "Unable to allocate UDP socket\n"); - IAXERROR "Unable to allocate UDP socket\n"); - return -1; - } - - if (preferredportno == 0) - preferredportno = IAX_DEFAULT_PORTNO; - - if (preferredportno < 0) - preferredportno = 0; - - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = 0; - sin.sin_port = htons((short)preferredportno); - if (bind(netfd, (struct sockaddr *) &sin, sizeof(sin)) < 0) - { -#if defined(WIN32) || defined(_WIN32_WCE) - if (WSAGetLastError() == WSAEADDRINUSE) -#else - if (errno == EADDRINUSE) -#endif - { - /*the port is already in use, so bind to a free port chosen by the IP stack*/ - DEBU(G "Unable to bind to preferred port - port is in use. Trying to bind to a free one"); - sin.sin_port = htons((short)0); - if (bind(netfd, (struct sockaddr *) &sin, sizeof(sin)) < 0) - { - IAXERROR "Unable to bind UDP socket\n"); - return -1; - } - } else - { - IAXERROR "Unable to bind UDP socket\n"); - return -1; - } - } - - sinlen = sizeof(sin); - if (getsockname(netfd, (struct sockaddr *) &sin, &sinlen) < 0) - { - close(netfd); - netfd = -1; - DEBU(G "Unable to figure out what I'm bound to."); - IAXERROR "Unable to determine bound port number."); - return -1; - } -#if defined(WIN32) || defined(_WIN32_WCE) - flags = 1; - if (ioctlsocket(netfd,FIONBIO,(unsigned long *) &flags)) - { - closesocket(netfd); - netfd = -1; - DEBU(G "Unable to set non-blocking mode."); - IAXERROR "Unable to set non-blocking mode."); - return -1; - } - -#else - if ((flags = fcntl(netfd, F_GETFL)) < 0) - { - close(netfd); - netfd = -1; - DEBU(G "Unable to retrieve socket flags."); - IAXERROR "Unable to retrieve socket flags."); - return -1; - } - if (fcntl(netfd, F_SETFL, flags | O_NONBLOCK) < 0) - { - close(netfd); - netfd = -1; - DEBU(G "Unable to set non-blocking mode."); - IAXERROR "Unable to set non-blocking mode."); - return -1; - } -#endif - /* Mihai: increase UDP socket buffers to avoid packet loss. */ - if (setsockopt(netfd, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, - sizeof(bufsize)) < 0) - { - DEBU(G "Unable to set buffer size."); - IAXERROR "Unable to set buffer size."); - } - - portno = ntohs(sin.sin_port); - DEBU(G "Started on port %d\n", portno); - } - - srand((unsigned int)time(0)); - callnums = rand() % 32767 + 1; - transfer_id = rand() % 32767 + 1; - - return portno; -} - -static void destroy_session(struct iax_session *session); - -static void convert_reply(char *out, unsigned char *in) -{ - int x; - for (x=0;x<16;x++) - out += sprintf(out, "%2.2x", (int)in[x]); -} - -static unsigned char compress_subclass(int subclass) -{ - int x; - int power=-1; - /* If it's 128 or smaller, just return it */ - if (subclass < IAX_FLAG_SC_LOG) - return subclass; - /* Otherwise find its power */ - for (x = 0; x < IAX_MAX_SHIFT; x++) { - if (subclass & (1 << x)) { - if (power > -1) { - DEBU(G "Can't compress subclass %d\n", subclass); - return 0; - } else - power = x; - } - } - return power | IAX_FLAG_SC_LOG; -} - -static int iax_send(struct iax_session *pvt, struct ast_frame *f, unsigned int ts, int seqno, int now, int transfer, int final, int fullframe) -{ - /* Queue a packet for delivery on a given private structure. Use "ts" for - timestamp, or calculate if ts is 0. Send immediately without retransmission - or delayed, with retransmission */ - struct ast_iax2_full_hdr *fh; - struct ast_iax2_mini_hdr *mh; - struct ast_iax2_video_hdr *vh; - //unsigned char buf[5120]; //fd: changed max packet size[5120]; - unsigned char buf[32 * 1024]; //Mihai: let's see if this is where it crashes - - struct iax_frame *fr; - int res; - int sendmini=0; - unsigned int lastsent; - unsigned int fts; - - if (!pvt) - { - IAXERROR "No private structure for packet?\n"); - return -1; - } - - /* this must come before the next call to calc_timestamp() since - calc_timestamp() will change lastsent to the returned value */ - lastsent = pvt->lastsent; - - /* Calculate actual timestamp */ - fts = calc_timestamp(pvt, ts, f); - - if (((fts & 0xFFFF0000L) == (lastsent & 0xFFFF0000L)) - /* High two bits are the same on timestamp, or sending on a trunk */ && - (f->frametype == AST_FRAME_VOICE) - /* is a voice frame */ && - (f->subclass == pvt->svoiceformat) - /* is the same type */ ) - { - /* Force immediate rather than delayed transmission */ - now = 1; - /* Mark that mini-style frame is appropriate */ - sendmini = 1; - } - - /* Bitmask taken from chan_iax2.c... I must ask Mark Spencer for this? I think not... */ - if ( f->frametype == AST_FRAME_VIDEO ) - { - if (((fts & 0xFFFF8000L) == (lastsent & 0xFFFF8000L)) - /* High two bits are the same on timestamp, or sending on a trunk */ && - ((f->subclass & ~0x01) == pvt->svideoformat) - /* is the same type */ ) - { - /* Force immediate rather than delayed transmission */ - now = 1; - /* Mark that mini-style frame is appropriate */ - sendmini = 1; - } else - { - /* we want to send a fullframe and be able to retransmit it */ - now = 0; - sendmini = 0; - } - } - - /* if requested, force a full frame */ - if ( fullframe ) - { - now = 0; - sendmini = 0; - } - - /* Allocate an iax_frame */ - if (now) - { - fr = (struct iax_frame *) buf; - } else - { - fr = iax_frame_new(DIRECTION_OUTGRESS, f->datalen); - if ( fr == NULL ) - { - IAXERROR "Out of memory\n"); - return -1; - } - } - - /* Copy our prospective frame into our immediate or retransmitted wrapper */ - iax_frame_wrap(fr, f); - - fr->ts = fts; - if (!fr->ts) - { - IAXERROR "timestamp is 0?\n"); - if (!now) - iax_frame_free(fr); - return -1; - } - - fr->callno = pvt->callno; - fr->transfer = transfer; - fr->final = final; - fr->session = pvt; - if (!sendmini) - { - /* We need a full frame */ - if (seqno > -1) - fr->oseqno = seqno; - else - fr->oseqno = pvt->oseqno++; - fr->iseqno = pvt->iseqno; - fh = (struct ast_iax2_full_hdr *)(((char *)fr->af.data) - sizeof(struct ast_iax2_full_hdr)); - fh->scallno = htons(fr->callno | IAX_FLAG_FULL); - fh->ts = htonl(fr->ts); - fh->oseqno = fr->oseqno; - if (transfer) - { - fh->iseqno = 0; - } else - fh->iseqno = fr->iseqno; - /* Keep track of the last thing we've acknowledged */ - pvt->aseqno = fr->iseqno; - fh->type = fr->af.frametype & 0xFF; - if (f->frametype == AST_FRAME_VIDEO) - fh->csub = compress_subclass(fr->af.subclass & ~0x1) | ((fr->af.subclass & 0x1) << 6); - else - fh->csub = compress_subclass(fr->af.subclass); - if (transfer) - { - fr->dcallno = pvt->transfercallno; - } else - fr->dcallno = pvt->peercallno; - fh->dcallno = htons(fr->dcallno); - fr->datalen = fr->af.datalen + sizeof(struct ast_iax2_full_hdr); - fr->data = fh; - fr->retries = maxretries; - /* Retry after 2x the ping time has passed */ - fr->retrytime = pvt->pingtime * 2; - if (fr->retrytime < MIN_RETRY_TIME) - fr->retrytime = MIN_RETRY_TIME; - if (fr->retrytime > MAX_RETRY_TIME) - fr->retrytime = MAX_RETRY_TIME; - /* Acks' don't get retried */ - if ((f->frametype == AST_FRAME_IAX) && (f->subclass == IAX_COMMAND_ACK)) - fr->retries = -1; - if (f->frametype == AST_FRAME_VOICE) - { - pvt->svoiceformat = f->subclass; - } - else if (f->frametype == AST_FRAME_VIDEO) - { - pvt->svideoformat = f->subclass & ~0x1; - } - if (now) - { - res = iax_xmit_frame(fr); - } else - res = iax_reliable_xmit(fr); - } else - { - if (fr->af.frametype == AST_FRAME_VIDEO) - { - /* Video frame have no sequence number */ - fr->oseqno = -1; - fr->iseqno = -1; - vh = (struct ast_iax2_video_hdr *)(((char* )fr->af.data) - sizeof(struct ast_iax2_video_hdr)); - vh->zeros = 0; - vh->callno = htons(0x8000 | fr->callno); - vh->ts = htons((fr->ts & 0x7FFF) | (fr->af.subclass & 0x1 ? 0x8000 : 0)); - fr->datalen = fr->af.datalen + sizeof(struct ast_iax2_video_hdr); - fr->data = vh; - fr->retries = -1; - res = iax_xmit_frame(fr); - } else - { - /* Mini-frames have no sequence number */ - fr->oseqno = -1; - fr->iseqno = -1; - /* Mini frame will do */ - mh = (struct ast_iax2_mini_hdr *)(((char *)fr->af.data) - sizeof(struct ast_iax2_mini_hdr)); - mh->callno = htons(fr->callno); - mh->ts = htons(fr->ts & 0xFFFF); - fr->datalen = fr->af.datalen + sizeof(struct ast_iax2_mini_hdr); - fr->data = mh; - fr->retries = -1; - res = iax_xmit_frame(fr); - } - } - if( !now && fr!=NULL ) - iax_frame_free( fr ); - return res; -} - -#if 0 -static int iax_predestroy(struct iax_session *pvt) -{ - if (!pvt) { - return -1; - } - if (!pvt->alreadygone) { - /* No more pings or lagrq's */ - if (pvt->pingid > -1) - ast_sched_del(sched, pvt->pingid); - if (pvt->lagid > -1) - ast_sched_del(sched, pvt->lagid); - if (pvt->autoid > -1) - ast_sched_del(sched, pvt->autoid); - if (pvt->initid > -1) - ast_sched_del(sched, pvt->initid); - pvt->pingid = -1; - pvt->lagid = -1; - pvt->autoid = -1; - pvt->initid = -1; - pvt->alreadygone = 1; - } - return 0; -} -#endif - -static int __send_command(struct iax_session *i, char type, int command, - unsigned int ts, unsigned char *data, int datalen, int seqno, - int now, int transfer, int final, int fullframe, int samples) -{ - struct ast_frame f; - f.frametype = type; - f.subclass = command; - f.datalen = datalen; - f.samples = samples; - f.mallocd = 0; - f.offset = 0; -#ifdef __GNUC__ - f.src = (char *) __FUNCTION__; -#else - f.src = (char *) __FILE__; -#endif - f.data = data; - return iax_send(i, &f, ts, seqno, now, transfer, final, fullframe); -} - -static int send_command(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen, int seqno) -{ - return __send_command(i, type, command, ts, data, datalen, seqno, 0, 0, 0, 0, 0); -} - -static int send_command_video(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen, int seqno, int fullframe) -{ - return __send_command(i, type, command, ts, data, datalen, seqno, 1, 0, 0, fullframe, 0); -} - -static int send_command_final(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen, int seqno) -{ -#if 0 - /* It is assumed that the callno has already been locked */ - iax_predestroy(i); -#endif - int r; - r = __send_command(i, type, command, ts, data, datalen, seqno, 0, 0, 1, 0, 0); - if (r >= 0) destroy_session(i); - return r; -} - -static int send_command_immediate(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen, int seqno) -{ - return __send_command(i, type, command, ts, data, datalen, seqno, 1, 0, 0, 0, 0); -} - -static int send_command_transfer(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen) -{ - return __send_command(i, type, command, ts, data, datalen, 0, 0, 1, 0, 0, 0); -} - -static int send_command_samples(struct iax_session *i, char type, int command, unsigned int ts, unsigned char *data, int datalen, int seqno, int samples) -{ - return __send_command(i, type, command, ts, data, datalen, seqno, 0, 0, 0, 0, samples); -} - - -int iax_transfer(struct iax_session *session, const char *number) -{ - static int res; //Return Code - struct iax_ie_data ied; //IE Data Structure (Stuff To Send) - - // Clear The Memory Used For IE Buffer - memset(&ied, 0, sizeof(ied)); - - // Copy The Transfer Destination Into The IE Structure - iax_ie_append_str(&ied, IAX_IE_CALLED_NUMBER, number); - - // Send The Transfer Command - Asterisk Will Handle The Rest! - res = send_command(session, AST_FRAME_IAX, IAX_COMMAND_TRANSFER, 0, ied.buf, ied.pos, -1); - - // Return Success - return 0; -} - -static void stop_transfer(struct iax_session *session) -{ - struct iax_sched *sch; - - sch = schedq; - while(sch) { - if (sch->frame && (sch->frame->session == session)) - sch->frame->retries = -1; - sch = sch->next; - } -} /* stop_transfer */ - -static void complete_transfer(struct iax_session *session, int peercallno, int xfr2peer, int preserveSeq) -{ - jb_frame frame; - - session->peercallno = peercallno; - /* Change from transfer to session now */ - if (xfr2peer) { - memcpy(&session->peeraddr, &session->transfer, sizeof(session->peeraddr)); - memset(&session->transfer, 0, sizeof(session->transfer)); - session->transferring = TRANSFER_NONE; - session->transferpeer = 0; - session->transfer_moh = 0; - /* Force retransmission of a real voice packet, and reset all timing */ - session->svoiceformat = -1; - session->voiceformat = 0; - session->svideoformat = -1; - session->videoformat = 0; - } - - memset(&session->rxcore, 0, sizeof(session->rxcore)); - memset(&session->offset, 0, sizeof(session->offset)); - - /* Reset jitterbuffer */ - while(jb_getall(session->jb,&frame) == JB_OK) - iax_event_free((struct iax_event *)frame.data); - - jb_reset(session->jb); - - if (! preserveSeq) - { - /* Reset sequence numbers */ - session->aseqno = 0; - session->oseqno = 0; - session->iseqno = 0; - } - - session->lastsent = 0; - session->last_ts = 0; - session->pingtime = 30; - /* We have to dump anything we were going to (re)transmit now that we've been - transferred since they're all invalid and for the old host. */ - stop_transfer(session); -} /* complete_transfer */ - -int iax_setup_transfer(struct iax_session *org_session, struct iax_session *new_session) -{ - int res; - struct iax_ie_data ied0; - struct iax_ie_data ied1; - - struct iax_session *s0 = org_session; - struct iax_session *s1 = new_session; - - memset(&ied0, 0, sizeof(ied0)); - memset(&ied1, 0, sizeof(ied1)); - - /* reversed setup */ - iax_ie_append_addr(&ied0, IAX_IE_APPARENT_ADDR, &s1->peeraddr); - iax_ie_append_short(&ied0, IAX_IE_CALLNO, s1->peercallno); - iax_ie_append_int(&ied0, IAX_IE_TRANSFERID, transfer_id); - - iax_ie_append_addr(&ied1, IAX_IE_APPARENT_ADDR, &s0->peeraddr); - iax_ie_append_short(&ied1, IAX_IE_CALLNO, s0->peercallno); - iax_ie_append_int(&ied1, IAX_IE_TRANSFERID, transfer_id); - - s0->transfer = s1->peeraddr; - s1->transfer = s0->peeraddr; - - s0->transferid = transfer_id; - s1->transferid = transfer_id; - - s0->transfercallno = s0->peercallno; - s1->transfercallno = s1->peercallno; - - s0->transferring = TRANSFER_BEGIN; - s1->transferring = TRANSFER_BEGIN; - - s0->transferpeer = s1->callno; - s1->transferpeer = s0->callno; - - transfer_id++; - - if (transfer_id > 32767) - transfer_id = 1; - - res = send_command(s0, AST_FRAME_IAX, IAX_COMMAND_TXREQ, 0, ied0.buf, ied0.pos, -1); - if (res < 0) { - return -1; - } - - res = send_command(s1, AST_FRAME_IAX, IAX_COMMAND_TXREQ, 0, ied1.buf, ied1.pos, -1); - if (res < 0) { - return -1; - } - - return 0; -} - -static int iax_finish_transfer(struct iax_session *s, short new_peer) -{ - int res; - struct iax_ie_data ied; - - memset(&ied, 0, sizeof(ied)); - - iax_ie_append_short(&ied, IAX_IE_CALLNO, new_peer); - - res = send_command(s, AST_FRAME_IAX, IAX_COMMAND_TXREL, 0, ied.buf, ied.pos, -1); - - complete_transfer(s, new_peer, 0, 1); - - return res; - -} - -static struct iax_session *iax_find_session2(short callno) -{ - struct iax_session *cur = sessions; - - while(cur) { - if (callno == cur->callno && callno != 0) { - return cur; - } - cur = cur->next; - } - - return NULL; -} - -static int iax_handle_txready(struct iax_session *s) -{ - struct iax_session *s0, *s1; - short s0_org_peer, s1_org_peer; - - if (s->transfer_moh) { - s->transfer_moh = 0; - iax_unquelch(s); - } - - complete_transfer(s, s->peercallno, 0, 1); - - s->transferring = TRANSFER_REL; - - s0 = s; - s1 = iax_find_session2(s0->transferpeer); - - if (s1 != NULL && - s1->callno == s0->transferpeer && - s0->transferring == TRANSFER_REL && - s1->transferring == TRANSFER_REL) { - - s0_org_peer = s0->peercallno; - s1_org_peer = s1->peercallno; - - iax_finish_transfer(s0, s1_org_peer); - iax_finish_transfer(s1, s0_org_peer); - return 1; - } - - return 0; -} - -static void iax_handle_txreject(struct iax_session *s) -{ - struct iax_session *s0, *s1; - - s0 = s; - s1 = iax_find_session2(s0->transferpeer); - if (s1 != NULL && - s0->transferpeer == s1->callno && - s1->transferring) { - if (s1->transfer_moh) { - s1->transfer_moh = 0; - send_command_immediate(s1, AST_FRAME_IAX, IAX_COMMAND_UNQUELCH, 0, NULL, 0, s1->iseqno); - } - } - if (s0->transfer_moh) { - s0->transfer_moh = 0; - send_command_immediate(s0, AST_FRAME_IAX, IAX_COMMAND_UNQUELCH, 0, NULL, 0, s0->iseqno); - } - - memset(&s->transfer, 0, sizeof(s->transfer)); - s->transferring = TRANSFER_NONE; - s->transferpeer = 0; - s->transfer_moh = 0; -} - -static void destroy_session(struct iax_session *session) -{ - struct iax_session *cur, *prev=NULL; - struct iax_sched *curs, *prevs=NULL, *nexts=NULL; - int loop_cnt=0; - curs = schedq; - while(curs) { - nexts = curs->next; - if (curs->frame && curs->frame->session == session) { - /* Just mark these frames as if they've been sent */ - curs->frame->retries = -1; - } else if (curs->event && curs->event->session == session) { - if (prevs) - prevs->next = nexts; - else - schedq = nexts; - if (curs->event) - iax_event_free(curs->event); - free(curs); - } else { - prevs = curs; - } - curs = nexts; - loop_cnt++; - } - - cur = sessions; - while(cur) { - if (cur == session) { - jb_frame frame; - - if (prev) - prev->next = session->next; - else - sessions = session->next; - - while(jb_getall(session->jb,&frame) == JB_OK) - iax_event_free((struct iax_event *)frame.data); - - jb_destroy(session->jb); - - free(session); - return; - } - prev = cur; - cur = cur->next; - } -} - -static int iax_send_lagrp(struct iax_session *session, unsigned int ts); -static int iax_send_pong(struct iax_session *session, unsigned int ts); - -static struct iax_event *handle_event(struct iax_event *event) -{ - /* We have a candidate event to be delievered. Be sure - the session still exists. */ - if (event) - { - if ( event->etype == IAX_EVENT_NULL ) return event; - if (iax_session_valid(event->session)) - { - /* Lag requests are never actually sent to the client, but - other than that are handled as normal packets */ - switch(event->etype) - { - /* the user on the outside may need to look at the session so we will not free - it here anymore we will test for hangup event in iax_event_free and do it - there. - */ - case IAX_EVENT_REJECT: - case IAX_EVENT_HANGUP: - /* Destroy this session -- it's no longer valid */ - destroy_session(event->session); - return event; - case IAX_EVENT_LAGRQ: - event->etype = IAX_EVENT_LAGRP; - iax_send_lagrp(event->session, event->ts); - iax_event_free(event); - break; - case IAX_EVENT_PING: - event->etype = IAX_EVENT_PONG; - iax_send_pong(event->session, event->ts); - iax_event_free(event); - break; - case IAX_EVENT_POKE: - event->etype = IAX_EVENT_PONG; - iax_send_pong(event->session, event->ts); - destroy_session(event->session); - iax_event_free(event); - break; - default: - return event; - } - } else - iax_event_free(event); - } - return NULL; -} - -static int iax2_vnak(struct iax_session *session) -{ - /* send vnak just once for a given sequence number */ - if ( (unsigned char)(session->lastvnak - session->iseqno) < 128 ) - { - return 0; - } - - session->lastvnak = session->iseqno; - return send_command_immediate(session, AST_FRAME_IAX, IAX_COMMAND_VNAK, 0, NULL, 0, session->iseqno); -} - -int iax_send_dtmf(struct iax_session *session, char digit) -{ - return send_command(session, AST_FRAME_DTMF, digit, 0, NULL, 0, -1); -} - -int iax_send_voice(struct iax_session *session, int format, unsigned char *data, int datalen, int samples) -{ - /* Send a (possibly compressed) voice frame */ - if (!session->quelch) - return send_command_samples(session, AST_FRAME_VOICE, format, 0, data, datalen, -1, samples); - return 0; -} - -int iax_send_cng(struct iax_session *session, int level, unsigned char *data, - int datalen) -{ -#ifdef USE_VOICE_TS_PREDICTION - session->notsilenttx = 0; -#endif - return send_command(session, AST_FRAME_CNG, level, 0, data, datalen, -1); -} - -int iax_send_image(struct iax_session *session, int format, unsigned char *data, - int datalen) -{ - /* Send an image frame */ - return send_command(session, AST_FRAME_IMAGE, format, 0, data, datalen, -1); -} - -int iax_send_video(struct iax_session *session, int format, unsigned char *data, - int datalen, int fullframe) -{ - if (!session->quelch) - { - int res = send_command_video(session, AST_FRAME_VIDEO, format, - 0, data, datalen, -1, fullframe); - return res; - } - return 0; -} - -int iax_send_video_trunk(struct iax_session *session, int format, - char *data, int datalen, int fullframe, int ntrunk) -{ - static int my_lastts = 0; - - if ( ntrunk == 0 ) - my_lastts = calc_timestamp(session, 0, NULL); - - if ( !session->quelch ) - { - return send_command_video(session, AST_FRAME_VIDEO, format, - my_lastts, (unsigned char *)data, datalen, -1, - fullframe); - } - return 0; -} - -int iax_video_bypass_jitter(struct iax_session *s, int mode) -{ - video_bypass_jitterbuffer = mode; - return 0; -} - -int iax_register(struct iax_session *session, const char *server, const char *peer, const char *secret, int refresh) -{ - /* Send a registration request */ - char tmp[256]; - char *p; - int res; - int portno = IAX_DEFAULT_PORTNO; - struct iax_ie_data ied; - struct hostent *hp; - - tmp[255] = '\0'; - strncpy(tmp, server, sizeof(tmp) - 1); - p = strchr(tmp, ':'); - if (p) { - *p = '\0'; - portno = atoi(p+1); - } - - memset(&ied, 0, sizeof(ied)); - if (secret) - strncpy(session->secret, secret, sizeof(session->secret) - 1); - else - strcpy(session->secret, ""); - - /* Connect first */ - hp = gethostbyname(tmp); - if (!hp) { - snprintf(iax_errstr, sizeof(iax_errstr), "Invalid hostname: %s", tmp); - return -1; - } - memcpy(&session->peeraddr.sin_addr, hp->h_addr, sizeof(session->peeraddr.sin_addr)); - session->peeraddr.sin_port = htons(portno); - session->peeraddr.sin_family = AF_INET; - strncpy(session->username, peer, sizeof(session->username) - 1); - session->refresh = refresh; - iax_ie_append_str(&ied, IAX_IE_USERNAME, peer); - iax_ie_append_short(&ied, IAX_IE_REFRESH, refresh); - res = send_command(session, AST_FRAME_IAX, IAX_COMMAND_REGREQ, 0, ied.buf, ied.pos, -1); - return res; -} - -int iax_reject(struct iax_session *session, char *reason) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_CAUSE, reason ? reason : "Unspecified"); - return send_command_final(session, AST_FRAME_IAX, IAX_COMMAND_REJECT, 0, ied.buf, ied.pos, -1); -} - -int iax_hangup(struct iax_session *session, char *byemsg) -{ - struct iax_ie_data ied; - iax_sched_del(NULL, NULL, send_ping, (void *) session, 1); - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_CAUSE, byemsg ? byemsg : "Normal clearing"); - return send_command_final(session, AST_FRAME_IAX, IAX_COMMAND_HANGUP, 0, ied.buf, ied.pos, -1); -} - -int iax_sendurl(struct iax_session *session, char *url) -{ - return send_command(session, AST_FRAME_HTML, AST_HTML_URL, 0, - (unsigned char *)url, (int)strlen(url), -1); -} - -int iax_ring_announce(struct iax_session *session) -{ - return send_command(session, AST_FRAME_CONTROL, AST_CONTROL_RINGING, 0, NULL, 0, -1); -} - -int iax_lag_request(struct iax_session *session) -{ - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_LAGRQ, 0, NULL, 0, -1); -} - -int iax_busy(struct iax_session *session) -{ - return send_command(session, AST_FRAME_CONTROL, AST_CONTROL_BUSY, 0, NULL, 0, -1); -} - -int iax_congestion(struct iax_session *session) -{ - return send_command(session, AST_FRAME_CONTROL, AST_CONTROL_CONGESTION, 0, NULL, 0, -1); -} - - -int iax_accept(struct iax_session *session, int format) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_int(&ied, IAX_IE_FORMAT, format); - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_ACCEPT, 0, ied.buf, ied.pos, -1); -} - -int iax_answer(struct iax_session *session) -{ - return send_command(session, AST_FRAME_CONTROL, AST_CONTROL_ANSWER, 0, NULL, 0, -1); -} - -int iax_load_complete(struct iax_session *session) -{ - return send_command(session, AST_FRAME_HTML, AST_HTML_LDCOMPLETE, 0, NULL, 0, -1); -} - -int iax_send_url(struct iax_session *session, const char *url, int link) -{ - return send_command(session, AST_FRAME_HTML, - link ? AST_HTML_LINKURL : AST_HTML_URL, 0, - (unsigned char *)url, (int)strlen(url), -1); -} - -int iax_send_text(struct iax_session *session, const char *text) -{ - return send_command(session, AST_FRAME_TEXT, 0, 0, - (unsigned char *)text, (int)strlen(text) + 1, -1); -} - -int iax_send_unlink(struct iax_session *session) -{ - return send_command(session, AST_FRAME_HTML, AST_HTML_UNLINK, 0, NULL, 0, -1); -} - -int iax_send_link_reject(struct iax_session *session) -{ - return send_command(session, AST_FRAME_HTML, AST_HTML_LINKREJECT, 0, NULL, 0, -1); -} - -static int iax_send_pong(struct iax_session *session, unsigned int ts) -{ - struct iax_ie_data ied; - jb_info stats; - - memset(&ied, 0, sizeof(ied)); - - jb_getinfo(session->jb, &stats); - - iax_ie_append_int(&ied,IAX_IE_RR_JITTER, stats.jitter); - /* XXX: should be short-term loss pct.. */ - if(stats.frames_in == 0) stats.frames_in = 1; - iax_ie_append_int(&ied,IAX_IE_RR_LOSS, - ((0xff & (stats.losspct/1000)) << 24 | - (stats.frames_lost & 0x00ffffff))); - iax_ie_append_int(&ied,IAX_IE_RR_PKTS, stats.frames_in); - iax_ie_append_short(&ied,IAX_IE_RR_DELAY, - (unsigned short)(stats.current - stats.min)); - iax_ie_append_int(&ied,IAX_IE_RR_DROPPED, stats.frames_dropped); - iax_ie_append_int(&ied,IAX_IE_RR_OOO, stats.frames_ooo); - - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_PONG, ts, ied.buf, ied.pos, -1); -} - -/* external API; deprecated since we send pings ourselves now (finally) */ -int iax_send_ping(struct iax_session *session) -{ - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_PING, 0, NULL, 0, -1); -} - -/* scheduled ping sender; sends ping, then reschedules */ -static void send_ping(void *s) -{ - struct iax_session *session = (struct iax_session *)s; - - /* important, eh? */ - if(!iax_session_valid(session)) return; - - send_command(session, AST_FRAME_IAX, IAX_COMMAND_PING, 0, NULL, 0, -1); - session->pingid = iax_sched_add(NULL,NULL, send_ping, (void *)session, ping_time * 1000); - return; -} - -static int iax_send_lagrp(struct iax_session *session, unsigned int ts) -{ - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_LAGRP, ts, NULL, 0, -1); -} - -static int iax_send_txcnt(struct iax_session *session) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_int(&ied, IAX_IE_TRANSFERID, session->transferid); - return send_command_transfer(session, AST_FRAME_IAX, IAX_COMMAND_TXCNT, 0, ied.buf, ied.pos); -} - -static int iax_send_txrej(struct iax_session *session) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_int(&ied, IAX_IE_TRANSFERID, session->transferid); - return send_command_transfer(session, AST_FRAME_IAX, IAX_COMMAND_TXREJ, 0, ied.buf, ied.pos); -} - -static int iax_send_txaccept(struct iax_session *session) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_int(&ied, IAX_IE_TRANSFERID, session->transferid); - return send_command_transfer(session, AST_FRAME_IAX, IAX_COMMAND_TXACC, 0, ied.buf, ied.pos); -} - -static int iax_send_txready(struct iax_session *session) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - /* see asterisk chan_iax2.c */ - iax_ie_append_short(&ied, IAX_IE_CALLNO, session->callno); - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_TXREADY, 0, ied.buf, ied.pos, -1); -} - -int iax_auth_reply(struct iax_session *session, char *password, char *challenge, int methods) -{ - char reply[16]; - struct MD5Context md5; - char realreply[256]; - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - if ((methods & IAX_AUTH_MD5) && challenge) { - MD5Init(&md5); - MD5Update(&md5, (const unsigned char *) challenge, - (unsigned int)strlen(challenge)); - MD5Update(&md5, (const unsigned char *) password, - (unsigned int)strlen(password)); - MD5Final((unsigned char *) reply, &md5); - memset(realreply, 0, sizeof(realreply)); - convert_reply(realreply, (unsigned char *) reply); - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply); - } else { - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, password); - } - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_AUTHREP, 0, ied.buf, ied.pos, -1); -} - -static int iax_regauth_reply(struct iax_session *session, char *password, char *challenge, int methods) -{ - char reply[16]; - struct MD5Context md5; - char realreply[256]; - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_USERNAME, session->username); - iax_ie_append_short(&ied, IAX_IE_REFRESH, session->refresh); - if ((methods & IAX_AUTHMETHOD_MD5) && challenge) { - MD5Init(&md5); - MD5Update(&md5, (const unsigned char *) challenge, - (unsigned int)strlen(challenge)); - MD5Update(&md5, (const unsigned char *) password, - (unsigned int)strlen(password)); - MD5Final((unsigned char *) reply, &md5); - memset(realreply, 0, sizeof(realreply)); - convert_reply(realreply, (unsigned char *) reply); - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply); - } else { - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, password); - } - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_REGREQ, 0, ied.buf, ied.pos, -1); -} - - -int iax_dial(struct iax_session *session, char *number) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_CALLED_NUMBER, number); - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_DIAL, 0, ied.buf, ied.pos, -1); -} - -int iax_quelch(struct iax_session *session) -{ - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_QUELCH, 0, NULL, 0, -1); -} - -int iax_unquelch(struct iax_session *session) -{ - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_UNQUELCH, 0, NULL, 0, -1); -} - -int iax_dialplan_request(struct iax_session *session, char *number) -{ - struct iax_ie_data ied; - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_CALLED_NUMBER, number); - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_DPREQ, 0, ied.buf, ied.pos, -1); -} - -static inline int which_bit(unsigned int i) -{ - char x; - for(x = 0; x < 32; x++) { - if ((1U << x) == i) { - return x + 1; - } - } - return 0; -} - -char iax_pref_codec_add(struct iax_session *session, unsigned int format) -{ - int diff = (int) 'A'; - session->codec_order[session->codec_order_len++] = (which_bit(format)) + diff; - session->codec_order[session->codec_order_len] = '\0'; - return session->codec_order[session->codec_order_len-1]; -} - - -void iax_pref_codec_del(struct iax_session *session, unsigned int format) -{ - int diff = (int) 'A'; - int x; - char old[32]; - char remove = which_bit(format) + diff; - - strncpy(old, session->codec_order, sizeof(old)); - session->codec_order_len = 0; - - for (x = 0; x < (int) strlen(old); x++) { - if (old[x] != remove) { - session->codec_order[session->codec_order_len++] = old[x]; - } - } - session->codec_order[session->codec_order_len] = '\0'; -} - -int iax_pref_codec_get(struct iax_session *session, unsigned int *array, int len) -{ - int diff = (int) 'A'; - int x; - - for (x = 0; x < session->codec_order_len && x < len; x++) { - array[x] = (1 << (session->codec_order[x] - diff - 1)); - } - - return x; -} - -int iax_call(struct iax_session *session, const char *cidnum, const char *cidname, const char *ich, const char *lang, int wait, int formats, int capabilities) -{ - char tmp[256]=""; - char *part1, *part2; - int res; - int portno; - char *username, *hostname, *secret, *context, *exten, *dnid; - struct iax_ie_data ied; - struct hostent *hp; - /* We start by parsing up the temporary variable which is of the form of: - [user@]peer[:portno][/exten[@context]] */ - if (!ich) { - IAXERROR "Invalid IAX Call Handle\n"); - DEBU(G "Invalid IAX Call Handle\n"); - return -1; - } - memset(&ied, 0, sizeof(ied)); - strncpy(tmp, ich, sizeof(tmp) - 1); - iax_ie_append_short(&ied, IAX_IE_VERSION, IAX_PROTO_VERSION); - if (cidnum) - iax_ie_append_str(&ied, IAX_IE_CALLING_NUMBER, cidnum); - if (cidname) - iax_ie_append_str(&ied, IAX_IE_CALLING_NAME, cidname); - - if (session->codec_order_len) { - iax_ie_append_str(&ied, IAX_IE_CODEC_PREFS, session->codec_order); - } - - session->capability = capabilities; - session->pingid = iax_sched_add(NULL,NULL, send_ping, (void *)session, 2 * 1000); - - /* XXX We should have a preferred format XXX */ - iax_ie_append_int(&ied, IAX_IE_FORMAT, formats); - iax_ie_append_int(&ied, IAX_IE_CAPABILITY, capabilities); - if (lang) - iax_ie_append_str(&ied, IAX_IE_LANGUAGE, lang); - - /* Part 1 is [user[:password]@]peer[:port] */ - part1 = strtok(tmp, "/"); - - /* Part 2 is exten[@context] if it is anything all */ - part2 = strtok(NULL, "/"); - - if (strchr(part1, '@')) { - username = strtok(part1, "@"); - hostname = strtok(NULL, "@"); - } else { - username = NULL; - hostname = part1; - } - - if (username && strchr(username, ':')) { - username = strtok(username, ":"); - secret = strtok(NULL, ":"); - } else - secret = NULL; - - if(username) - strncpy(session->username, username, sizeof(session->username) - 1); - - if(secret) - strncpy(session->secret, secret, sizeof(session->secret) - 1); - - if (strchr(hostname, ':')) { - strtok(hostname, ":"); - portno = atoi(strtok(NULL, ":")); - } else { - portno = IAX_DEFAULT_PORTNO; - } - if (part2) { - exten = strtok(part2, "@"); - dnid = exten; - context = strtok(NULL, "@"); - } else { - exten = NULL; - dnid = NULL; - context = NULL; - } - if (username) - iax_ie_append_str(&ied, IAX_IE_USERNAME, username); - if (exten && strlen(exten)) - iax_ie_append_str(&ied, IAX_IE_CALLED_NUMBER, exten); - if (dnid && strlen(dnid)) - iax_ie_append_str(&ied, IAX_IE_DNID, dnid); - if (context && strlen(context)) - iax_ie_append_str(&ied, IAX_IE_CALLED_CONTEXT, context); - - /* Setup host connection */ - hp = gethostbyname(hostname); - if (!hp) { - snprintf(iax_errstr, sizeof(iax_errstr), "Invalid hostname: %s", hostname); - return -1; - } - memcpy(&session->peeraddr.sin_addr, hp->h_addr, sizeof(session->peeraddr.sin_addr)); - session->peeraddr.sin_port = htons(portno); - session->peeraddr.sin_family = AF_INET; - res = send_command(session, AST_FRAME_IAX, IAX_COMMAND_NEW, 0, ied.buf, ied.pos, -1); - if (res < 0) - return res; - if (wait) { - DEBU(G "Waiting not yet implemented\n"); - return -1; - } - return res; -} - -static int calc_rxstamp(struct iax_session *session) -{ - struct timeval tv; - int ms; - - if (!session->rxcore.tv_sec && !session->rxcore.tv_usec) { - gettimeofday(&session->rxcore, NULL); - } - gettimeofday(&tv, NULL); - - ms = (tv.tv_sec - session->rxcore.tv_sec) * 1000 + - (tv.tv_usec - session->rxcore.tv_usec) / 1000; - return ms; -} - -#ifdef notdef_cruft -static int match(struct sockaddr_in *sin, short callno, short dcallno, struct iax_session *cur) -{ - if ((cur->peeraddr.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->peeraddr.sin_port == sin->sin_port)) { - /* This is the main host */ - if ((cur->peercallno == callno) || - ((dcallno == cur->callno) && !cur->peercallno)) { - /* That's us. Be sure we keep track of the peer call number */ - cur->peercallno = callno; - return 1; - } - } - if ((cur->transfer.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->transfer.sin_port == sin->sin_port) && (cur->transferring)) { - /* We're transferring */ - if (dcallno == cur->callno) - return 1; - } - return 0; -} -#endif - -/* splitted match into 2 passes otherwise causing problem of matching - up the wrong session using the dcallno and the peercallno because - during a transfer (2 IAX channels on the same client/system) the - same peercallno (from two different asterisks) exist in more than - one session. - */ -static int forward_match(struct sockaddr_in *sin, short callno, short dcallno, struct iax_session *cur) -{ - if ((cur->transfer.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->transfer.sin_port == sin->sin_port) && (cur->transferring)) { - /* We're transferring */ - if (dcallno == cur->callno) - { - return 1; - } - } - - if ((cur->peeraddr.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->peeraddr.sin_port == sin->sin_port)) { - if (dcallno == cur->callno && dcallno != 0) { - /* That's us. Be sure we keep track of the peer call number */ - if (cur->peercallno == 0) { - cur->peercallno = callno; - } - else if ( cur->peercallno != callno ) - { - // print a warning when the callno's don't match - fprintf( stderr, "WARNING: peercallno does not match callno" - ", peercallno => %d, callno => %d, dcallno => %d", - cur->peercallno, callno, dcallno ) ; - return 0 ; - } - return 1; - } - } - - return 0; -} - -static int reverse_match(struct sockaddr_in *sin, short callno, struct iax_session *cur) -{ - if ((cur->transfer.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->transfer.sin_port == sin->sin_port) && (cur->transferring)) { - /* We're transferring */ - if (callno == cur->peercallno) { - return 1; - } - } - if ((cur->peeraddr.sin_addr.s_addr == sin->sin_addr.s_addr) && - (cur->peeraddr.sin_port == sin->sin_port)) { - if (callno == cur->peercallno) { - return 1; - } - } - - return 0; -} - -static struct iax_session *iax_find_session(struct sockaddr_in *sin, - short callno, - short dcallno, - int makenew) -{ - struct iax_session *cur = sessions; - while(cur) { - if (forward_match(sin, callno, dcallno, cur)) { - return cur; - } - cur = cur->next; - } - - cur = sessions; - while(cur) { - if (reverse_match(sin, callno, cur)) { - return cur; - } - cur = cur->next; - } - - if (makenew && !dcallno) { - cur = iax_session_new(); - cur->peercallno = callno; - cur->peeraddr.sin_addr.s_addr = sin->sin_addr.s_addr; - cur->peeraddr.sin_port = sin->sin_port; - cur->peeraddr.sin_family = AF_INET; - cur->pingid = iax_sched_add(NULL,NULL, send_ping, (void *)cur, 2 * 1000); - DEBU(G "Making new session, peer callno %d, our callno %d\n", callno, cur->callno); - } else { - DEBU(G "No session, peer = %d, us = %d\n", callno, dcallno); - } - return cur; -} - -#ifdef EXTREME_DEBUG -static int display_time(int ms) -{ - static int oldms = -1; - if (oldms < 0) { - DEBU(G "First measure\n"); - oldms = ms; - return 0; - } - DEBU(G "Time from last frame is %d ms\n", ms - oldms); - oldms = ms; - return 0; -} -#endif - -/* From chan_iax2/steve davies: need to get permission from steve or digium, I guess */ -static long unwrap_timestamp(long ts, long last) -{ - int x; - - if ( (ts & 0xFFFF0000) == (last & 0xFFFF0000) ) { - x = ts - last; - if (x < -50000) { - /* Sudden big jump backwards in timestamp: - What likely happened here is that miniframe - timestamp has circled but we haven't gotten the - update from the main packet. We'll just pretend - that we did, and update the timestamp - appropriately. */ - ts = ( (last & 0xFFFF0000) + 0x10000) | (ts & 0xFFFF); - DEBU(G "schedule_delivery: pushed forward timestamp\n"); - } - if (x > 50000) { - /* Sudden apparent big jump forwards in timestamp: - What's likely happened is this is an old miniframe - belonging to the previous top-16-bit timestamp that - has turned up out of order. Adjust the timestamp - appropriately. */ - ts = ( (last & 0xFFFF0000) - 0x10000) | (ts & 0xFFFF); - DEBU(G "schedule_delivery: pushed back timestamp\n"); - } - } - else if ( (ts & 0xFFFF8000L) == (last & 0xFFFF8000L) ) { - x = ts - last; - if (x < -50000) { - /* Sudden big jump backwards in timestamp: - What likely happened here is that miniframe - timestamp has circled but we haven't gotten the - update from the main packet. We'll just pretend - that we did, and update the timestamp - appropriately. */ - ts = ( (last & 0xFFFF8000L) + 0x10000) | (ts & 0xFFFF); - DEBU(G "schedule_delivery: pushed forward timestamp\n"); - } - if (x > 50000) { - /* Sudden apparent big jump forwards in timestamp: - * What's likely happened is this is an old miniframe - * belonging to the previous top-16-bit timestamp that - * has turned up out of order. Adjust the timestamp - * appropriately. */ - ts = ( (last & 0xFFFF8000L) - 0x10000) | (ts & 0xFFFF); - DEBU(G "schedule_delivery: pushed back timestamp\n"); - } - } - return ts; -} - - -static struct iax_event *schedule_delivery(struct iax_event *e, unsigned int ts, int updatehistory) -{ - /* - * This is the core of the IAX jitterbuffer delivery mechanism: - * Dynamically adjust the jitterbuffer and decide how long to wait - * before delivering the packet. - */ - -#ifdef EXTREME_DEBUG - DEBU(G "[%p] We are at %d, packet is for %d\n", e->session, calc_rxstamp(e->session), ts); -#endif - - /* insert into jitterbuffer */ - /* TODO: Perhaps we could act immediately if it's not droppable and late */ - if ( e->etype == IAX_EVENT_VIDEO && video_bypass_jitterbuffer ) - { - iax_sched_add(e, NULL, NULL, NULL, 0); - return NULL; - } else - { - int type = JB_TYPE_CONTROL; - int len = 0; - - if(e->etype == IAX_EVENT_VOICE) - { - type = JB_TYPE_VOICE; - /* The frame time only has an effect for voice */ - len = get_sample_cnt(e) / 8; - } else if(e->etype == IAX_EVENT_VIDEO) - { - type = JB_TYPE_VIDEO; - } else if(e->etype == IAX_EVENT_CNG) - { - type = JB_TYPE_SILENCE; - } - - /* unwrap timestamp */ - ts = unwrap_timestamp(ts,e->session->last_ts); - - /* move forward last_ts if it's greater. We do this _after_ - * unwrapping, because asterisk _still_ has cases where it - * doesn't send full frames when it ought to */ - if(ts > e->session->last_ts) - { - e->session->last_ts = ts; - } - - if(jb_put(e->session->jb, e, type, len, ts, - calc_rxstamp(e->session)) == JB_DROP) - { - iax_event_free(e); - } - } - - return NULL; -} - -static int uncompress_subclass(unsigned char csub) -{ - /* If the SC_LOG flag is set, return 2^csub otherwise csub */ - if (csub & IAX_FLAG_SC_LOG) - return 1 << (csub & ~IAX_FLAG_SC_LOG & IAX_MAX_SHIFT); - else - return csub; -} - -static void iax_handle_vnak(struct iax_session *session, struct ast_iax2_full_hdr *fh) -{ - struct iax_sched *sch, *list, *l, *tmp; - - /* - * According to the IAX2 02 draft, we MUST immediately retransmit all frames - * with higher sequence number than the VNAK's iseqno - * However, it seems that the right thing to do would be to retransmit - * frames with sequence numbers higher OR EQUAL to VNAK's iseqno. - */ - sch = schedq; - list = NULL; - while ( sch != NULL ) - { - if ( sch->frame != NULL && - sch->frame->session == session - ) - { - /* - * We want to check if our frame's oseqno is greater or equal than - * the VNAK's iseqno, but we need to take into account sequence - * number wrap-arounds - * session->rseqno is our last acknowledged sequence number, so - * we use that as a base - */ - if ( (unsigned char)(fh->iseqno - session->rseqno) <= (unsigned char)(sch->frame->oseqno - session->rseqno) ) - { - /* - * We cannot retransmit immediately, since the frames are ordered by retransmit time - * We need to collect them and orrange them in ascending order of their oseqno - */ - tmp = (struct iax_sched *)calloc(1, sizeof(struct iax_sched)); - tmp->frame = sch->frame; - - if ( list == NULL || - (list->frame->oseqno - session->rseqno) > (tmp->frame->oseqno - session->rseqno) - ) - { - tmp->next = list; - list = tmp; - } else - { - l = list; - while ( l != NULL ) - { - if ( l->next == NULL || - (l->next->frame->oseqno - session->rseqno) > (tmp->frame->oseqno - session->rseqno) - ) - { - tmp->next = l->next; - l->next = tmp; - break; - } - l = l->next; - } - } - } - } - sch = sch->next; - } - - /* Transmit collected frames and free the space */ - while ( list != NULL ) - { - tmp = list; - iax_xmit_frame(tmp->frame); - list = list->next; - free(tmp); - } -} - -static struct iax_event *iax_header_to_event(struct iax_session *session, struct ast_iax2_full_hdr *fh, int datalen, struct sockaddr_in *sin) -{ - struct iax_event *e; - struct iax_sched *sch; - unsigned int ts; - int subclass; - int nowts; - int updatehistory = 1; - ts = ntohl(fh->ts); - - if (fh->type==AST_FRAME_VIDEO) - subclass = uncompress_subclass(fh->csub & ~0x40) | ((fh->csub >> 6) & 0x1); - else - subclass = uncompress_subclass(fh->csub); - - /* don't run last_ts backwards; i.e. for retransmits and the like */ - if (ts > session->last_ts && - (fh->type == AST_FRAME_IAX && - subclass != IAX_COMMAND_ACK && - subclass != IAX_COMMAND_PONG && - subclass != IAX_COMMAND_LAGRP)) - { - session->last_ts = ts; - } - -#ifdef DEBUG_SUPPORT - iax_showframe(NULL, fh, 1, sin, datalen); -#endif - - /* Get things going with it, timestamp wise, if we - haven't already. */ - - /* Handle implicit ACKing unless this is an INVAL, and only if this is - from the real peer, not the transfer peer */ - if ( !inaddrcmp(sin, &session->peeraddr) && - ( subclass != IAX_COMMAND_INVAL || - fh->type != AST_FRAME_IAX - ) - ) - { - unsigned char x; - /* XXX This code is not very efficient. Surely there is a better way which still - properly handles boundary conditions? XXX */ - /* First we have to qualify that the ACKed value is within our window */ - for (x=session->rseqno; x != session->oseqno; x++) - if (fh->iseqno == x) - break; - if ((x != session->oseqno) || (session->oseqno == fh->iseqno)) - { - /* The acknowledgement is within our window. Time to acknowledge everything - that it says to */ - for (x=session->rseqno; x != fh->iseqno; x++) - { - /* Ack the packet with the given timestamp */ - DEBU(G "Cancelling transmission of packet %d\n", x); - sch = schedq; - while(sch) - { - if ( sch->frame && - sch->frame->session == session && - sch->frame->oseqno == x - ) - sch->frame->retries = -1; - sch = sch->next; - } - } - /* Note how much we've received acknowledgement for */ - session->rseqno = fh->iseqno; - } else - DEBU(G "Received iseqno %d not within window %d->%d\n", fh->iseqno, session->rseqno, session->oseqno); - } - - /* Check where we are */ - if ((ntohs(fh->dcallno) & IAX_FLAG_RETRANS) || - ((fh->type != AST_FRAME_VOICE) && (fh->type != AST_FRAME_VIDEO))) - updatehistory = 0; - if ((session->iseqno != fh->oseqno) && - (session->iseqno || - ((subclass != IAX_COMMAND_TXREADY) && - (subclass != IAX_COMMAND_TXREL) && - (subclass != IAX_COMMAND_TXCNT) && - (subclass != IAX_COMMAND_TXACC)) || - (fh->type != AST_FRAME_IAX))) - { - if ( - ((subclass != IAX_COMMAND_ACK) && - (subclass != IAX_COMMAND_INVAL) && - (subclass != IAX_COMMAND_TXREADY) && - (subclass != IAX_COMMAND_TXREL) && - (subclass != IAX_COMMAND_TXCNT) && - (subclass != IAX_COMMAND_TXACC) && - (subclass != IAX_COMMAND_VNAK)) || - (fh->type != AST_FRAME_IAX)) - { - /* If it's not an ACK packet, it's out of order. */ - DEBU(G "Packet arrived out of order (expecting %d, got %d) (frametype = %d, subclass = %d)\n", - session->iseqno, fh->oseqno, fh->type, subclass); - - /* - * Check if session->iseqno > fh->oseqno, accounting for possible wrap around - * This is correct if the two values are not equal (which, in this case, is guaranteed) - */ - if ( (unsigned char)(session->iseqno - fh->oseqno) < 128 ) - { - /* If we've already seen it, ack it XXX There's a border condition here XXX */ - if ((fh->type != AST_FRAME_IAX) || - ((subclass != IAX_COMMAND_ACK) && (subclass != IAX_COMMAND_INVAL))) - { - DEBU(G "Acking anyway\n"); - /* XXX Maybe we should handle its ack to us, but then again, it's probably outdated anyway, and if - we have anything to send, we'll retransmit and get an ACK back anyway XXX */ - send_command_immediate(session, AST_FRAME_IAX, IAX_COMMAND_ACK, ts, NULL, 0,fh->iseqno); - } - } else - { - /* Send a VNAK requesting retransmission */ - iax2_vnak(session); - } - return NULL; - } - } else - { - /* Increment unless it's an ACK or VNAK */ - if (((subclass != IAX_COMMAND_ACK) && - (subclass != IAX_COMMAND_INVAL) && - (subclass != IAX_COMMAND_TXCNT) && - (subclass != IAX_COMMAND_TXACC) && - (subclass != IAX_COMMAND_VNAK)) || - (fh->type != AST_FRAME_IAX)) - session->iseqno++; - } - - e = (struct iax_event *)malloc(sizeof(struct iax_event) + datalen + 1); - - if (e) { - memset(e, 0, sizeof(struct iax_event) + datalen); - /* Set etype to some unknown value so do not inavertently - sending IAX_EVENT_CONNECT event, which is 0 to application. - */ - e->etype = -1; - e->session = session; - switch(fh->type) { - case AST_FRAME_DTMF: - e->etype = IAX_EVENT_DTMF; - e->subclass = subclass; - /* - We want the DTMF event deliver immediately so all I/O can be - terminate quickly in an IVR system. - e = schedule_delivery(e, ts, updatehistory); */ - break; - case AST_FRAME_VOICE: - e->etype = IAX_EVENT_VOICE; - e->subclass = subclass; - e->ts = ts; - session->voiceformat = subclass; - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - e->datalen = datalen; - } - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_FRAME_CNG: - e->etype = IAX_EVENT_CNG; - e->subclass = subclass; - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - e->datalen = datalen; - } - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_FRAME_IAX: - /* Parse IE's */ - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - e->datalen = datalen; - } - if (iax_parse_ies(&e->ies, e->data, e->datalen)) { - IAXERROR "Unable to parse IE's"); - free(e); - e = NULL; - break; - } - switch(subclass) { - case IAX_COMMAND_NEW: - /* This is a new, incoming call */ - /* save the capability for validation */ - session->capability = e->ies.capability; - if (e->ies.codec_prefs) { - strncpy(session->codec_order, - e->ies.codec_prefs, - sizeof(session->codec_order)); - session->codec_order_len = - (int)strlen(session->codec_order); - } - e->etype = IAX_EVENT_CONNECT; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_AUTHREQ: - /* This is a request for a call */ - e->etype = IAX_EVENT_AUTHRQ; - if (strlen(session->username) && !strcmp(e->ies.username, session->username) && - strlen(session->secret)) { - /* Hey, we already know this one */ - iax_auth_reply(session, session->secret, e->ies.challenge, e->ies.authmethods); - free(e); - e = NULL; - break; - } - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_HANGUP: - e->etype = IAX_EVENT_HANGUP; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_INVAL: - e->etype = IAX_EVENT_HANGUP; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_REJECT: - e->etype = IAX_EVENT_REJECT; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_ACK: - free(e); - e = NULL; - break; - case IAX_COMMAND_VNAK: - iax_handle_vnak(session, fh); - free(e); - e = NULL; - break; - case IAX_COMMAND_LAGRQ: - /* Pass this along for later handling */ - e->etype = IAX_EVENT_LAGRQ; - e->ts = ts; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_POKE: - e->etype = IAX_EVENT_POKE; - e->ts = ts; - break; - case IAX_COMMAND_PING: - /* PINGS and PONGS don't get scheduled; */ - e->etype = IAX_EVENT_PING; - e->ts = ts; - break; - case IAX_COMMAND_PONG: - e->etype = IAX_EVENT_PONG; - /* track weighted average of ping time */ - session->pingtime = ((2 * session->pingtime) + (calc_timestamp(session,0,NULL) - ts)) / 3; - session->remote_netstats.jitter = e->ies.rr_jitter; - session->remote_netstats.losspct = e->ies.rr_loss >> 24;; - session->remote_netstats.losscnt = e->ies.rr_loss & 0xffffff; - session->remote_netstats.packets = e->ies.rr_pkts; - session->remote_netstats.delay = e->ies.rr_delay; - session->remote_netstats.dropped = e->ies.rr_dropped; - session->remote_netstats.ooo = e->ies.rr_ooo; - break; - case IAX_COMMAND_ACCEPT: - if (e->ies.format & session->capability) { - e->etype = IAX_EVENT_ACCEPT; - } - else { - struct iax_ie_data ied; - /* Although this should not happen, we - * added this to make sure the - * negotiation protocol is enforced. - * For lack of event to notify the - * application we use the defined - * REJECT event. - */ - memset(&ied, 0, sizeof(ied)); - iax_ie_append_str(&ied, IAX_IE_CAUSE, "Unable to negotiate codec"); - send_command_final(session, AST_FRAME_IAX, IAX_COMMAND_REJECT, 0, ied.buf, ied.pos, -1); - e->etype = IAX_EVENT_REJECT; - } - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_REGACK: - e->etype = IAX_EVENT_REGACK; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_REGAUTH: - iax_regauth_reply(session, session->secret, e->ies.challenge, e->ies.authmethods); - free(e); - e = NULL; - break; - case IAX_COMMAND_REGREJ: - e->etype = IAX_EVENT_REGREJ; - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_LAGRP: - e->etype = IAX_EVENT_LAGRP; - nowts = calc_timestamp(session, 0, NULL); - e->ts = nowts - ts; - /* Can't call schedule_delivery since timestamp is non-normal */ - break;; - case IAX_COMMAND_TXREQ: - /* added check for defensive programming - * - in case the asterisk server - * or another client does not send the - * apparent transfer address - */ - if (e->ies.apparent_addr != NULL) { - /* so a full voice frame is sent on the - next voice output */ - session->svoiceformat = -1; - session->transfer = *e->ies.apparent_addr; - session->transfer.sin_family = AF_INET; - session->transfercallno = e->ies.callno; - session->transferring = TRANSFER_BEGIN; - session->transferid = e->ies.transferid; - iax_send_txcnt(session); - } - free(e); - e = NULL; - break; - case IAX_COMMAND_DPREP: - /* Received dialplan reply */ - e->etype = IAX_EVENT_DPREP; - /* Return immediately, makes no sense to schedule */ - break; - case IAX_COMMAND_TXCNT: - if (session->transferring) { - session->transfer = *sin; - iax_send_txaccept(session); - } - free(e); - e = NULL; - break; - case IAX_COMMAND_TXACC: - if (session->transferring) { - stop_transfer(session); - session->transferring = TRANSFER_READY; - iax_send_txready(session); - } - free(e); - e = NULL; - break; - case IAX_COMMAND_TXREL: - /* Release the transfer */ - send_command_immediate(session, AST_FRAME_IAX, IAX_COMMAND_ACK, ts, NULL, 0, fh->iseqno); - if (session->transferring) { - complete_transfer(session, e->ies.callno, 1, 0); - } - else { - complete_transfer(session, session->peercallno, 0, 1); - } - e->etype = IAX_EVENT_TRANSFER; - /* notify that asterisk no longer sitting between peers */ - e = schedule_delivery(e, ts, updatehistory); - break; - case IAX_COMMAND_QUELCH: - e->etype = IAX_EVENT_QUELCH; - session->quelch = 1; - break; - case IAX_COMMAND_UNQUELCH: - e->etype = IAX_EVENT_UNQUELCH; - session->quelch = 0; - break; - case IAX_COMMAND_TXREJ: - e->etype = IAX_EVENT_TXREJECT; - iax_handle_txreject(session); - break; - - case IAX_COMMAND_TXREADY: - send_command_immediate(session, AST_FRAME_IAX, IAX_COMMAND_ACK, ts, NULL, 0, fh->iseqno); - if (iax_handle_txready(session)) { - e->etype = IAX_EVENT_TXREADY; - } - else { - free(e); - e = NULL; - } - break; - default: - DEBU(G "Don't know what to do with IAX command %d\n", subclass); - free(e); - e = NULL; - } - break; - case AST_FRAME_CONTROL: - switch(subclass) { - case AST_CONTROL_ANSWER: - e->etype = IAX_EVENT_ANSWER; - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_CONTROL_CONGESTION: - case AST_CONTROL_BUSY: - e->etype = IAX_EVENT_BUSY; - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_CONTROL_RINGING: - e->etype = IAX_EVENT_RINGA; - e = schedule_delivery(e, ts, updatehistory); - break; - default: - DEBU(G "Don't know what to do with AST control %d\n", subclass); - free(e); - return NULL; - } - break; - case AST_FRAME_IMAGE: - e->etype = IAX_EVENT_IMAGE; - e->subclass = subclass; - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - } - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_FRAME_VIDEO: - e->etype = IAX_EVENT_VIDEO; - e->subclass = subclass; - e->ts = ts; - session->videoformat = e->subclass; - memcpy(e->data, fh->iedata, datalen); - e->datalen = datalen; - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_FRAME_TEXT: - e->etype = IAX_EVENT_TEXT; - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - e->datalen = datalen; - } - e = schedule_delivery(e, ts, updatehistory); - break; - - case AST_FRAME_HTML: - switch(fh->csub) { - case AST_HTML_LINKURL: - e->etype = IAX_EVENT_LINKURL; - /* Fall through */ - case AST_HTML_URL: - if (e->etype == -1) - e->etype = IAX_EVENT_URL; - e->subclass = fh->csub; - e->datalen = datalen; - if (datalen) { - memcpy(e->data, fh->iedata, datalen); - } - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_HTML_LDCOMPLETE: - e->etype = IAX_EVENT_LDCOMPLETE; - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_HTML_UNLINK: - e->etype = IAX_EVENT_UNLINK; - e = schedule_delivery(e, ts, updatehistory); - break; - case AST_HTML_LINKREJECT: - e->etype = IAX_EVENT_LINKREJECT; - e = schedule_delivery(e, ts, updatehistory); - break; - default: - DEBU(G "Don't know how to handle HTML type %d frames\n", fh->csub); - free(e); - return NULL; - } - break; - default: - DEBU(G "Don't know what to do with frame type %d\n", fh->type); - free(e); - return NULL; - } - } else - DEBU(G "Out of memory\n"); - - /* Already ack'd iax frames */ - if (session->aseqno != session->iseqno) { - send_command_immediate(session, AST_FRAME_IAX, IAX_COMMAND_ACK, ts, NULL, 0, fh->iseqno); - } - return e; -} - -/* Some parts taken from iax_miniheader_to_event and from from chan_iax2.c. We must inform Mark Spencer? */ -static struct iax_event *iax_videoheader_to_event(struct iax_session *session, - struct ast_iax2_video_hdr *vh, int datalen) -{ - struct iax_event * e; - - if ( session->videoformat <= 0 ) - { - DEBU(G "No last video format received on session %d\n", - session->callno); - return 0; - } - - e = (struct iax_event *)malloc(sizeof(struct iax_event) + datalen); - - if ( !e ) - { - DEBU(G "Out of memory\n"); - return 0; - } - - e->etype = IAX_EVENT_VIDEO; - e->session = session; - e->subclass = session->videoformat | (ntohs(vh->ts) & 0x8000 ? 1 : 0); - e->datalen = datalen; - memcpy(e->data, vh->data, e->datalen); - e->ts = (session->last_ts & 0xFFFF8000L) | (ntohs(vh->ts) & 0x7fff); - - return schedule_delivery(e, e->ts, 1); -} - -static struct iax_event *iax_miniheader_to_event(struct iax_session *session, - struct ast_iax2_mini_hdr *mh, int datalen) -{ - struct iax_event * e; - - if ( session->voiceformat <= 0 ) - { - DEBU(G "No last format received on session %d\n", session->callno); - return 0; - } - - e = (struct iax_event *)malloc(sizeof(struct iax_event) + datalen); - - if ( !e ) - { - DEBU(G "Out of memory\n"); - return 0; - } - - e->etype = IAX_EVENT_VOICE; - e->session = session; - e->subclass = session->voiceformat; - e->datalen = datalen; - memcpy(e->data, mh->data, datalen); - e->ts = (session->last_ts & 0xFFFF0000) | ntohs(mh->ts); - - return schedule_delivery(e, e->ts, 1); -} - -void iax_destroy(struct iax_session *session) -{ - destroy_session(session); -} - -static struct iax_event *iax_net_read(void) -{ - unsigned char buf[65536]; - int res; - struct sockaddr_in sin; - socklen_t sinlen; - struct iax_event *event; - - sinlen = sizeof(sin); - res = iax_recvfrom(netfd, (char *)buf, sizeof(buf), 0, (struct sockaddr *) &sin, &sinlen); - if (res < 0) { -#if defined(_WIN32_WCE) - if (WSAGetLastError() != WSAEWOULDBLOCK) { - DEBU(G "Error on read: %d\n", WSAGetLastError()); - IAXERROR "Read error on network socket: ???"); - } -#elif defined(WIN32) || defined(_WIN32_WCE) - if (WSAGetLastError() != WSAEWOULDBLOCK) { - DEBU(G "Error on read: %d\n", WSAGetLastError()); - IAXERROR "Read error on network socket: %s", strerror(errno)); - } -#else - if (errno != EAGAIN) { - DEBU(G "Error on read: %s\n", strerror(errno)); - IAXERROR "Read error on network socket: %s", strerror(errno)); - } -#endif - return NULL; - } - event = iax_net_process(buf, res, &sin); - if ( event == NULL ) - { - // We have received a frame. The corresponding event is queued - // We need to motify the entire stack of calling functions so they - // don't go to sleep thinking there are no more frames to process - // TODO: this is buttugly from a design point of view. Basically we - // change libiax2 behavior to accomodate iaxclient. - // There must be a way to do it better. - event = (struct iax_event *)malloc(sizeof(struct iax_event)); - if ( event != NULL ) event->etype = IAX_EVENT_NULL; - } - return event; -} - -static struct iax_session *iax_txcnt_session(struct ast_iax2_full_hdr *fh, int datalen, - struct sockaddr_in *sin, short callno, short dcallno) -{ - int subclass = uncompress_subclass(fh->csub); - unsigned char buf[ 65536 ]; /* allocated on stack with same size as iax_net_read() */ - struct iax_ies ies; - struct iax_session *cur; - - if ((fh->type != AST_FRAME_IAX) || (subclass != IAX_COMMAND_TXCNT) || (!datalen)) { - return NULL; /* special handling for TXCNT only */ - } - memcpy(buf, fh->iedata, datalen); /* prepare local buf for iax_parse_ies() */ - - if (iax_parse_ies(&ies, buf, datalen)) { - return NULL; /* Unable to parse IE's */ - } - if (!ies.transferid) { - return NULL; /* TXCNT without proper IAX_IE_TRANSFERID */ - } - for( cur=sessions; cur; cur=cur->next ) { - if ((cur->transferring) && (cur->transferid == (int) ies.transferid) && - (cur->callno == dcallno) && (cur->transfercallno == callno)) { - /* We're transferring --- - * skip address/port checking which would fail while - * remote peer behind symmetric NAT, verify - * transferid instead - */ - cur->transfer.sin_addr.s_addr = sin->sin_addr.s_addr; /* setup for further handling */ - cur->transfer.sin_port = sin->sin_port; - break; - } - } - return cur; -} - -struct iax_event *iax_net_process(unsigned char *buf, int len, struct sockaddr_in *sin) -{ - struct ast_iax2_full_hdr *fh = (struct ast_iax2_full_hdr *)buf; - struct ast_iax2_mini_hdr *mh = (struct ast_iax2_mini_hdr *)buf; - struct ast_iax2_video_hdr *vh = (struct ast_iax2_video_hdr *)buf; - struct iax_session *session; - - if (ntohs(fh->scallno) & IAX_FLAG_FULL) { - /* Full size header */ - if (len < sizeof(struct ast_iax2_full_hdr)) { - DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); - IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); - return NULL; - } - /* We have a full header, process appropriately */ - session = iax_find_session(sin, - ntohs(fh->scallno) & ~IAX_FLAG_FULL, - ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS, 1); - if (!session) - session = iax_txcnt_session(fh, - len - sizeof(struct ast_iax2_full_hdr), - sin, ntohs(fh->scallno) & ~IAX_FLAG_FULL, - ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS); - if (session) - return iax_header_to_event(session, fh, len - sizeof(struct ast_iax2_full_hdr), sin); - DEBU(G "No session?\n"); - return NULL; - } else { - if (len < sizeof(struct ast_iax2_mini_hdr)) { - DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); - IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); - return NULL; - } - /* Miniature, voice frame */ - if ((vh->zeros == 0) && (ntohs(vh->callno) & 0x8000)) - { - session = iax_find_session(sin, ntohs(vh->callno) & ~0x8000, 0, 0); - - if (session) - return iax_videoheader_to_event(session, vh, - len - sizeof(struct ast_iax2_video_hdr)); - } else { - /* audio frame */ - session = iax_find_session(sin, ntohs(fh->scallno), 0, 0); - if (session) - return iax_miniheader_to_event(session, mh, - len - sizeof(struct ast_iax2_mini_hdr)); - } - DEBU(G "No session?\n"); - return NULL; - } -} - -static struct iax_sched *iax_get_sched(struct timeval tv) -{ - struct iax_sched *cur, *prev=NULL; - cur = schedq; - /* Check the event schedule first. */ - while(cur) { - if ((tv.tv_sec > cur->when.tv_sec) || - ((tv.tv_sec == cur->when.tv_sec) && - (tv.tv_usec >= cur->when.tv_usec))) { - /* Take it out of the event queue */ - if (prev) { - prev->next = cur->next; - } else { - schedq = cur->next; - } - return cur; - } - cur = cur->next; - } - return NULL; -} - -struct iax_event *iax_get_event(int blocking) -{ - struct iax_event *event; - struct iax_frame *frame; - struct timeval tv; - struct iax_sched *cur; - struct iax_session *session; - - gettimeofday(&tv, NULL); - - while((cur = iax_get_sched(tv))) - { - event = cur->event; - frame = cur->frame; - if (event) - { - /* See if this is an event we need to handle */ - event = handle_event(event); - if (event) - { - free(cur); - return event; - } - } else if(frame) - { - /* It's a frame, transmit it and schedule a retry */ - if (frame->retries < 0) - { - /* It's been acked. No need to send it. Destroy the old - frame. If final, destroy the session. */ - if (frame->final) - destroy_session(frame->session); - if (frame->data) - free(frame->data); - free(frame); - } else if (frame->retries == 0) - { - if (frame->transfer) - { - /* Send a transfer reject since we weren't able to connect */ - iax_send_txrej(frame->session); - if (frame->data) - free(frame->data); - free(frame); - free(cur); - break; - } else - { - /* We haven't been able to get an ACK on this packet. If a - final frame, destroy the session, otherwise, pass up timeout */ - if (frame->final) - { - destroy_session(frame->session); - if (frame->data) - free(frame->data); - free(frame); - } else - { - event = (struct iax_event *)malloc(sizeof(struct iax_event)); - if (event) - { - event->etype = IAX_EVENT_TIMEOUT; - event->session = frame->session; - if (frame->data) - free(frame->data); - free(frame); - free(cur); - return handle_event(event); - } - } - } - } else - { - struct ast_iax2_full_hdr *fh; - /* Decrement remaining retries */ - frame->retries--; - /* Multiply next retry time by 4, not above MAX_RETRY_TIME though */ - frame->retrytime *= 4; - /* Keep under 1000 ms if this is a transfer packet */ - if (!frame->transfer) - { - if (frame->retrytime > MAX_RETRY_TIME) - frame->retrytime = MAX_RETRY_TIME; - } else if (frame->retrytime > 1000) - frame->retrytime = 1000; - fh = (struct ast_iax2_full_hdr *)(frame->data); - fh->dcallno = htons(IAX_FLAG_RETRANS | frame->dcallno); - iax_xmit_frame(frame); - /* Schedule another retransmission */ - DEBU(G "Scheduling retransmission %d\n", frame->retries); - iax_sched_add(NULL, frame, NULL, NULL, frame->retrytime); - } - } else if (cur->func) - { - cur->func(cur->arg); - } - free(cur); - } - - /* get jitterbuffer-scheduled events */ - for ( session = sessions; session; session = session->next ) - { - int ret; - long now; - long next; - jb_frame frame; - - now = (tv.tv_sec - session->rxcore.tv_sec) * 1000 + - (tv.tv_usec - session->rxcore.tv_usec) / 1000; - - if ( now <= (next = jb_next(session->jb)) ) - continue; - - /* interp len no longer hardcoded, now determined by get_interp_len */ - ret = jb_get(session->jb,&frame,now,get_interp_len(session->voiceformat)); - - switch(ret) { - case JB_OK: - event = (struct iax_event *)frame.data; - event = handle_event(event); - if (event) { - return event; - } - break; - case JB_INTERP: - /* create an interpolation frame */ - //fprintf(stderr, "Making Interpolation frame\n"); - event = (struct iax_event *)malloc(sizeof(struct iax_event)); - if (event) { - event->etype = IAX_EVENT_VOICE; - event->subclass = session->voiceformat; - /* XXX: ??? applications probably ignore this anyway */ - event->ts = now; - event->session = session; - event->datalen = 0; - event = handle_event(event); - if(event) - return event; - } - break; - case JB_DROP: - iax_event_free((struct iax_event *)frame.data); - break; - case JB_NOFRAME: - case JB_EMPTY: - /* do nothing */ - break; - default: - /* shouldn't happen */ - break; - } - } - - /* Now look for networking events */ - if (blocking) { - /* Block until there is data if desired */ - fd_set fds; - int nextEventTime; - - FD_ZERO(&fds); - FD_SET(netfd, &fds); - - nextEventTime = iax_time_to_next_event(); - - if(nextEventTime < 0) select(netfd + 1, &fds, NULL, NULL, NULL); - else - { - struct timeval nextEvent; - - nextEvent.tv_sec = nextEventTime / 1000; - nextEvent.tv_usec = (nextEventTime % 1000) * 1000; - - select(netfd + 1, &fds, NULL, NULL, &nextEvent); - } - - } - event = iax_net_read(); - - return handle_event(event); -} - -struct sockaddr_in iax_get_peer_addr(struct iax_session *session) -{ - return session->peeraddr; -} - -void iax_session_destroy(struct iax_session **session) -{ - destroy_session(*session); - *session = NULL; -} - -void iax_event_free(struct iax_event *event) -{ - /* We gave the user a chance to play with the session now we need to - * destroy it if you are not calling this function on every event you - * read you are now going to leak sessions as well as events! - */ - switch(event->etype) { - case IAX_EVENT_REJECT: - case IAX_EVENT_HANGUP: - /* Destroy this session -- it's no longer valid */ - if (event->session) { /* maybe the user did it already */ - destroy_session(event->session); - } - break; - } - free(event); -} - -int iax_get_fd(void) -{ - /* Return our network file descriptor. The client can select on this - * (probably with other things, or can add it to a network add sort - * of gtk_input_add for example */ - return netfd; -} - -int iax_quelch_moh(struct iax_session *session, int MOH) -{ - struct iax_ie_data ied; //IE Data Structure (Stuff To Send) - memset(&ied, 0, sizeof(ied)); - - // You can't quelch the quelched - if (session->quelch == 1) - return -1; - - if (MOH) { - iax_ie_append(&ied, IAX_IE_MUSICONHOLD); - session->transfer_moh = 1; - } - - return send_command(session, AST_FRAME_IAX, IAX_COMMAND_QUELCH, 0, ied.buf, ied.pos, -1); -} diff --git a/libs/libiax2/src/iax.h b/libs/libiax2/src/iax.h deleted file mode 100644 index 8a0e3fe3d370d9d4e754e316a7d8066ccff35ac7..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * libIAX - * - * Implementation of Inter-IAXerisk eXchange - * - * Copyright (C) 1999, Mark Spencer - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - */ - -#ifndef _IAX_H -#define _IAX_H - -/* Max version of IAX protocol we support */ -#define IAX_PROTO_VERSION 1 - -#define IAX_MAX_CALLS 32768 - -#define IAX_FLAG_FULL 0x8000 - -#define IAX_FLAG_SC_LOG 0x80 - -#define IAX_MAX_SHIFT 0x1F - -/* Maximum size of an IAX frame (max size of UDP frame) */ -#define IAX_MAX_BUF_SIZE 65536 - -/* Subclass for IAX_FRAME_IAX */ -#define IAX_COMMAND_NEW 1 -#define IAX_COMMAND_PING 2 -#define IAX_COMMAND_PONG 3 -#define IAX_COMMAND_ACK 4 -#define IAX_COMMAND_HANGUP 5 -#define IAX_COMMAND_REJECT 6 -#define IAX_COMMAND_ACCEPT 7 -#define IAX_COMMAND_AUTHREQ 8 -#define IAX_COMMAND_AUTHREP 9 -#define IAX_COMMAND_INVAL 10 -#define IAX_COMMAND_LAGRQ 11 -#define IAX_COMMAND_LAGRP 12 -#define IAX_COMMAND_REGREQ 13 /* Registration request */ -#define IAX_COMMAND_REGAUTH 14 /* Registration authentication required */ -#define IAX_COMMAND_REGACK 15 /* Registration accepted */ -#define IAX_COMMAND_REGREJ 16 /* Registration rejected */ -#define IAX_COMMAND_REGREL 17 /* Force release of registration */ -#define IAX_COMMAND_VNAK 18 /* If we receive voice before valid first voice frame, send this */ -#define IAX_COMMAND_DPREQ 19 /* Request status of a dialplan entry */ -#define IAX_COMMAND_DPREP 20 /* Request status of a dialplan entry */ -#define IAX_COMMAND_DIAL 21 /* Request a dial on channel brought up TBD */ -#define IAX_COMMAND_TXREQ 22 /* Transfer Request */ -#define IAX_COMMAND_TXCNT 23 /* Transfer Connect */ -#define IAX_COMMAND_TXACC 24 /* Transfer Accepted */ -#define IAX_COMMAND_TXREADY 25 /* Transfer ready */ -#define IAX_COMMAND_TXREL 26 /* Transfer release */ -#define IAX_COMMAND_TXREJ 27 /* Transfer reject */ -#define IAX_COMMAND_QUELCH 28 /* Stop audio/video transmission */ -#define IAX_COMMAND_UNQUELCH 29 /* Resume audio/video transmission */ - -#define IAX_DEFAULT_REG_EXPIRE 60 - -#define IAX_DEFAULT_PORTNO 5036 - -/* Full frames are always delivered reliably */ -struct iax_full_hdr { - short callno; /* Source call number -- high bit must be 1 */ - short dcallno; /* Destination call number */ - unsigned int ts; /* 32-bit timestamp in milliseconds */ - unsigned short seqno; /* Packet number */ - char type; /* Frame type */ - unsigned char csub; /* Compressed subclass */ - char data[0]; -}; - -/* Mini header is used only for voice frames -- delivered unreliably */ -struct iax_mini_hdr { - short callno; /* Source call number -- high bit must be 0 */ - unsigned short ts; /* 16-bit Timestamp (high 16 bits from last IAX_full_hdr) */ - /* Frametype implicitly VOICE_FRAME */ - /* subclass implicit from last IAX_full_hdr */ - char data[0]; -}; - -#endif diff --git a/libs/libiax2/src/iax2-parser.c b/libs/libiax2/src/iax2-parser.c deleted file mode 100644 index b8e62a84a12a487dd3c87fdec760d178c7a8dab3..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax2-parser.c +++ /dev/null @@ -1,818 +0,0 @@ -/* - * Asterisk -- A telephony toolkit for Linux. - * - * Implementation of Inter-Asterisk eXchange - * - * Copyright (C) 2003-2004, Digium - * - * Mark Spencer <markster@digium.com> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - */ - -#if defined(WIN32) || defined(_WIN32_WCE) -#include <winsock.h> -#define snprintf _snprintf -#else -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#endif - -#ifndef _MSC_VER -#include <unistd.h> -#endif - -#include <string.h> -#include <stdlib.h> -#include <stdio.h> - -#include "frame.h" -#include "iax2.h" -#include "iax2-parser.h" - -static int frames = 0; -static int iframes = 0; -static int oframes = 0; - -#ifdef ALIGN32 -static unsigned int get_uint32(unsigned char *p) -{ - return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; -} - -static unsigned short get_uint16(unsigned char *p) -{ - return (p[0] << 8) | p[1] ; -} - -#else -#define get_uint32(p) (*((unsigned int *)(p))) -#define get_uint16(p) (*((unsigned short *)(p))) -#endif - - -static void internaloutput(const char *str) -{ - printf(str); -} - -static void internalerror(const char *str) -{ - fprintf(stderr, "WARNING: %s", str); -} - -static void (*outputf)(const char *str) = internaloutput; -static void (*errorf)(const char *str) = internalerror; - -static void dump_addr(char *output, int maxlen, void *value, int len) -{ - struct sockaddr_in sin; - if (len == sizeof(sin)) { - memcpy(&sin, value, len); - snprintf(output, maxlen, "IPV4 %s:%d", inet_ntoa(sin.sin_addr), ntohs(sin.sin_port)); - } else { - snprintf(output, maxlen, "Invalid Address"); - } -} - -static void dump_string(char *output, int maxlen, void *value, int len) -{ - maxlen--; - if (maxlen > len) - maxlen = len; - strncpy(output,(const char *)value, maxlen); - output[maxlen] = '\0'; -} - -static void dump_int(char *output, int maxlen, void *value, int len) -{ - if (len == (int)sizeof(unsigned int)) - snprintf(output, maxlen, "%lu", (unsigned long)ntohl(get_uint32(value))); - else - snprintf(output, maxlen, "Invalid INT"); -} - -static void dump_short(char *output, int maxlen, void *value, int len) -{ - if (len == (int)sizeof(unsigned short)) - snprintf(output, maxlen, "%d", ntohs(get_uint16(value))); - else - snprintf(output, maxlen, "Invalid SHORT"); -} - -static void dump_byte(char *output, int maxlen, void *value, int len) -{ - if (len == (int)sizeof(unsigned char)) - snprintf(output, maxlen, "%d", *((unsigned char *)value)); - else - snprintf(output, maxlen, "Invalid BYTE"); -} - -static void dump_samprate(char *output, int maxlen, void *value, int len) -{ - char tmp[256]=""; - int sr; - if (len == (int)sizeof(unsigned short)) { - sr = ntohs(*((unsigned short *)value)); - if (sr & IAX_RATE_8KHZ) - strcat(tmp, ",8khz"); - if (sr & IAX_RATE_11KHZ) - strcat(tmp, ",11.025khz"); - if (sr & IAX_RATE_16KHZ) - strcat(tmp, ",16khz"); - if (sr & IAX_RATE_22KHZ) - strcat(tmp, ",22.05khz"); - if (sr & IAX_RATE_44KHZ) - strcat(tmp, ",44.1khz"); - if (sr & IAX_RATE_48KHZ) - strcat(tmp, ",48khz"); - if (strlen(tmp)) - strncpy(output, &tmp[1], maxlen - 1); - else - strncpy(output, "None specified!\n", maxlen - 1); - } else - snprintf(output, maxlen, "Invalid SHORT"); - -} - -static void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int len); -static void dump_prov(char *output, int maxlen, void *value, int len) -{ - dump_prov_ies(output, maxlen, (unsigned char *)value, len); -} - -static struct iax2_ie { - int ie; - char *name; - void (*dump)(char *output, int maxlen, void *value, int len); -} ies[] = { - { IAX_IE_CALLED_NUMBER, "CALLED NUMBER", dump_string }, - { IAX_IE_CALLING_NUMBER, "CALLING NUMBER", dump_string }, - { IAX_IE_CALLING_ANI, "ANI", dump_string }, - { IAX_IE_CALLING_NAME, "CALLING NAME", dump_string }, - { IAX_IE_CALLED_CONTEXT, "CALLED CONTEXT", dump_string }, - { IAX_IE_USERNAME, "USERNAME", dump_string }, - { IAX_IE_PASSWORD, "PASSWORD", dump_string }, - { IAX_IE_CAPABILITY, "CAPABILITY", dump_int }, - { IAX_IE_FORMAT, "FORMAT", dump_int }, - { IAX_IE_LANGUAGE, "LANGUAGE", dump_string }, - { IAX_IE_CODEC_PREFS, "CODEC_PREFS", dump_string }, - { IAX_IE_VERSION, "VERSION", dump_short }, - { IAX_IE_ADSICPE, "ADSICPE", dump_short }, - { IAX_IE_DNID, "DNID", dump_string }, - { IAX_IE_AUTHMETHODS, "AUTHMETHODS", dump_short }, - { IAX_IE_CHALLENGE, "CHALLENGE", dump_string }, - { IAX_IE_MD5_RESULT, "MD5 RESULT", dump_string }, - { IAX_IE_RSA_RESULT, "RSA RESULT", dump_string }, - { IAX_IE_APPARENT_ADDR, "APPARENT ADDRESS", dump_addr }, - { IAX_IE_REFRESH, "REFRESH", dump_short }, - { IAX_IE_DPSTATUS, "DIALPLAN STATUS", dump_short }, - { IAX_IE_CALLNO, "CALL NUMBER", dump_short }, - { IAX_IE_CAUSE, "CAUSE", dump_string }, - { IAX_IE_IAX_UNKNOWN, "UNKNOWN IAX CMD", dump_byte }, - { IAX_IE_MSGCOUNT, "MESSAGE COUNT", dump_short }, - { IAX_IE_AUTOANSWER, "AUTO ANSWER REQ" }, - { IAX_IE_TRANSFERID, "TRANSFER ID", dump_int }, - { IAX_IE_RDNIS, "REFERRING DNIS", dump_string }, - { IAX_IE_PROVISIONING, "PROVISIONING", dump_prov }, - { IAX_IE_AESPROVISIONING, "AES PROVISIONG" }, - { IAX_IE_DATETIME, "DATE TIME", dump_int }, - { IAX_IE_DEVICETYPE, "DEVICE TYPE", dump_string }, - { IAX_IE_SERVICEIDENT, "SERVICE IDENT", dump_string }, - { IAX_IE_FIRMWAREVER, "FIRMWARE VER", dump_short }, - { IAX_IE_FWBLOCKDESC, "FW BLOCK DESC", dump_int }, - { IAX_IE_FWBLOCKDATA, "FW BLOCK DATA" }, - { IAX_IE_PROVVER, "PROVISIONG VER", dump_int }, - { IAX_IE_CALLINGPRES, "CALLING PRESNTN", dump_byte }, - { IAX_IE_CALLINGTON, "CALLING TYPEOFNUM", dump_byte }, - { IAX_IE_CALLINGTNS, "CALLING TRANSITNET", dump_short }, - { IAX_IE_SAMPLINGRATE, "SAMPLINGRATE", dump_samprate }, - { IAX_IE_CODEC_PREFS, "CODEC_PREFS", dump_string }, - { IAX_IE_RR_JITTER, "RR_JITTER", dump_int }, - { IAX_IE_RR_LOSS, "RR_LOSS", dump_int }, - { IAX_IE_RR_PKTS, "RR_PKTS", dump_int }, - { IAX_IE_RR_DELAY, "RR_DELAY", dump_short }, - { IAX_IE_RR_DROPPED, "RR_DROPPED", dump_int }, - { IAX_IE_RR_OOO, "RR_OOO", dump_int }, -}; - -const char *iax_ie2str(int ie) -{ - int x; - for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) { - if (ies[x].ie == ie) - return ies[x].name; - } - return "Unknown IE"; -} - - -static void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int len) -{ - int ielen; - int ie; - int found; - char tmp[256]; - if (len < 2) - return; - strcpy(output, "\n"); - maxlen -= (int)strlen(output); output += strlen(output); - while(len > 2) { - ie = iedata[0]; - ielen = iedata[1]; - if (ielen + 2> len) { - snprintf(tmp, (int)sizeof(tmp), "Total Prov IE length of %d bytes exceeds remaining prov frame length of %d bytes\n", ielen + 2, len); - strncpy(output, tmp, maxlen - 1); - maxlen -= (int)strlen(output); output += strlen(output); - return; - } - found = 0; - if (!found) { - snprintf(tmp, (int)sizeof(tmp), " Unknown Prov IE %03d : Present\n", ie); - strncpy(output, tmp, maxlen - 1); - maxlen -= (int)strlen(output); output += strlen(output); - } - iedata += (2 + ielen); - len -= (2 + ielen); - } -} - -static void dump_ies(unsigned char *iedata, int len) -{ - int ielen; - int ie; - int x; - int found; - char interp[1024]; - char tmp[1024]; - if (len < 2) - return; - while(len > 2) { - ie = iedata[0]; - ielen = iedata[1]; - if (ielen + 2> len) { - snprintf(tmp, (int)sizeof(tmp), "Total IE length of %d bytes exceeds remaining frame length of %d bytes\n", ielen + 2, len); - outputf(tmp); - return; - } - found = 0; - for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) { - if (ies[x].ie == ie) { - if (ies[x].dump) { - ies[x].dump(interp, (int)sizeof(interp), iedata + 2, ielen); - snprintf(tmp, (int)sizeof(tmp), " %-15.15s : %s\n", ies[x].name, interp); - outputf(tmp); - } else { - if (ielen) - snprintf(interp, (int)sizeof(interp), "%d bytes", ielen); - else - strcpy(interp, "Present"); - snprintf(tmp, (int)sizeof(tmp), " %-15.15s : %s\n", ies[x].name, interp); - outputf(tmp); - } - found++; - } - } - if (!found) { - snprintf(tmp, (int)sizeof(tmp), " Unknown IE %03d : Present\n", ie); - outputf(tmp); - } - iedata += (2 + ielen); - len -= (2 + ielen); - } - outputf("\n"); -} - -void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, struct sockaddr_in *sin, int datalen) -{ - const char *frames[] = { - "(0?)", - "DTMF ", - "VOICE ", - "VIDEO ", - "CONTROL", - "NULL ", - "IAX ", - "TEXT ", - "IMAGE " }; - const char *iaxs[] = { - "(0?)", - "NEW ", - "PING ", - "PONG ", - "ACK ", - "HANGUP ", - "REJECT ", - "ACCEPT ", - "AUTHREQ", - "AUTHREP", - "INVAL ", - "LAGRQ ", - "LAGRP ", - "REGREQ ", - "REGAUTH", - "REGACK ", - "REGREJ ", - "REGREL ", - "VNAK ", - "DPREQ ", - "DPREP ", - "DIAL ", - "TXREQ ", - "TXCNT ", - "TXACC ", - "TXREADY", - "TXREL ", - "TXREJ ", - "QUELCH ", - "UNQULCH", - "POKE", - "PAGE", - "MWI", - "UNSUPPORTED", - "TRANSFER", - "PROVISION", - "FWDOWNLD", - "FWDATA" - }; - const char *cmds[] = { - "(0?)", - "HANGUP ", - "RING ", - "RINGING", - "ANSWER ", - "BUSY ", - "TKOFFHK ", - "OFFHOOK" }; - struct ast_iax2_full_hdr *fh; - char retries[20]; - char class2[20]; - char subclass2[20]; - const char *clas; - const char *subclass; - char tmp[256]; - - if (f) { - fh = (struct ast_iax2_full_hdr *)f->data; - snprintf(retries, (int)sizeof(retries), "%03d", f->retries); - } else { - fh = fhi; - if (ntohs(fh->dcallno) & IAX_FLAG_RETRANS) - strcpy(retries, "Yes"); - else - strcpy(retries, " No"); - } - if (!(ntohs(fh->scallno) & IAX_FLAG_FULL)) { - /* Don't mess with mini-frames */ - return; - } - if (fh->type > (int)sizeof(frames)/(int)sizeof(char *)) { - snprintf(class2, (int)sizeof(class2), "(%d?)", fh->type); - clas = class2; - } else { - clas = frames[(int)fh->type]; - } - if (fh->type == AST_FRAME_DTMF) { - sprintf(subclass2, "%c", fh->csub); - subclass = subclass2; - } else if (fh->type == AST_FRAME_IAX) { - if (fh->csub >= (int)sizeof(iaxs)/(int)sizeof(iaxs[0])) { - snprintf(subclass2, (int)sizeof(subclass2), "(%d?)", fh->csub); - subclass = subclass2; - } else { - subclass = iaxs[(int)fh->csub]; - } - } else if (fh->type == AST_FRAME_CONTROL) { - if (fh->csub > (int)sizeof(cmds)/(int)sizeof(char *)) { - snprintf(subclass2, (int)sizeof(subclass2), "(%d?)", fh->csub); - subclass = subclass2; - } else { - subclass = cmds[(int)fh->csub]; - } - } else { - snprintf(subclass2, (int)sizeof(subclass2), "%d", fh->csub); - subclass = subclass2; - } -snprintf(tmp, (int)sizeof(tmp), -"%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s Subclass: %s\n", - (rx ? "Rx" : "Tx"), - retries, fh->oseqno, fh->iseqno, clas, subclass); - outputf(tmp); -snprintf(tmp, (int)sizeof(tmp), -" Timestamp: %05lums SCall: %5.5d DCall: %5.5d [%s:%d]\n", - (unsigned long)ntohl(fh->ts), - ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS, - inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); - outputf(tmp); - if (fh->type == AST_FRAME_IAX) - dump_ies(fh->iedata, datalen); -} - -int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, const void *data, int datalen) -{ - char tmp[256]; - if (datalen > ((int)sizeof(ied->buf) - ied->pos)) { - snprintf(tmp, (int)sizeof(tmp), "Out of space for ie '%s' (%d), need %d have %d\n", iax_ie2str(ie), ie, datalen, (int)sizeof(ied->buf) - ied->pos); - errorf(tmp); - return -1; - } - ied->buf[ied->pos++] = ie; - ied->buf[ied->pos++] = datalen; - memcpy(ied->buf + ied->pos, data, datalen); - ied->pos += datalen; - return 0; -} - -int iax_ie_append_addr(struct iax_ie_data *ied, unsigned char ie, struct sockaddr_in *sin) -{ - return iax_ie_append_raw(ied, ie, sin, (int)sizeof(struct sockaddr_in)); -} - -int iax_ie_append_int(struct iax_ie_data *ied, unsigned char ie, unsigned int value) -{ - unsigned int newval; - newval = htonl(value); - return iax_ie_append_raw(ied, ie, &newval, (int)sizeof(newval)); -} - -int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned short value) -{ - unsigned short newval; - newval = htons(value); - return iax_ie_append_raw(ied, ie, &newval, (int)sizeof(newval)); -} - -int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, const char *str) -{ - return iax_ie_append_raw(ied, ie, str, (int)strlen(str)); -} - -int iax_ie_append_byte(struct iax_ie_data *ied, unsigned char ie, unsigned char dat) -{ - return iax_ie_append_raw(ied, ie, &dat, 1); -} - -int iax_ie_append(struct iax_ie_data *ied, unsigned char ie) -{ - return iax_ie_append_raw(ied, ie, NULL, 0); -} - -void iax_set_output(void (*func)(const char *)) -{ - outputf = func; -} - -void iax_set_error(void (*func)(const char *)) -{ - errorf = func; -} - -int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen) -{ - /* Parse data into information elements */ - int len; - int ie; - char tmp[256]; - memset(ies, 0, (int)sizeof(struct iax_ies)); - ies->msgcount = -1; - ies->firmwarever = -1; - ies->calling_ton = -1; - ies->calling_tns = -1; - ies->calling_pres = -1; - ies->samprate = IAX_RATE_8KHZ; - while(datalen >= 2) { - ie = data[0]; - len = data[1]; - if (len > datalen - 2) { - errorf("Information element length exceeds message size\n"); - return -1; - } - switch(ie) { - case IAX_IE_CALLED_NUMBER: - ies->called_number = (char *) data + 2; - break; - case IAX_IE_CALLING_NUMBER: - ies->calling_number = (char *) data + 2; - break; - case IAX_IE_CALLING_ANI: - ies->calling_ani = (char *) data + 2; - break; - case IAX_IE_CALLING_NAME: - ies->calling_name = (char *) data + 2; - break; - case IAX_IE_CALLED_CONTEXT: - ies->called_context = (char *) data + 2; - break; - case IAX_IE_USERNAME: - ies->username = (char *) data + 2; - break; - case IAX_IE_PASSWORD: - ies->password = (char *) data + 2; - break; - case IAX_IE_CAPABILITY: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting capability to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else - ies->capability = ntohl(get_uint32(data + 2)); - break; - case IAX_IE_FORMAT: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting format to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else - ies->format = ntohl(get_uint32(data + 2)); - break; - case IAX_IE_LANGUAGE: - ies->language = (char *) data + 2; - break; - case IAX_IE_CODEC_PREFS: - ies->codec_prefs = (char *) data + 2; - break; - case IAX_IE_VERSION: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting version to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->version = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_ADSICPE: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting adsicpe to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->adsicpe = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_SAMPLINGRATE: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting samplingrate to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->samprate = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_DNID: - ies->dnid = (char *) data + 2; - break; - case IAX_IE_RDNIS: - ies->rdnis = (char *) data + 2; - break; - case IAX_IE_AUTHMETHODS: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting authmethods to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->authmethods = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_CHALLENGE: - ies->challenge = (char *) data + 2; - break; - case IAX_IE_MD5_RESULT: - ies->md5_result = (char *) data + 2; - break; - case IAX_IE_RSA_RESULT: - ies->rsa_result = (char *) data + 2; - break; - case IAX_IE_APPARENT_ADDR: - ies->apparent_addr = ((struct sockaddr_in *)(data + 2)); - break; - case IAX_IE_REFRESH: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting refresh to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->refresh = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_DPSTATUS: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting dpstatus to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->dpstatus = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_CALLNO: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting callno to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->callno = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_CAUSE: - ies->cause = (char *) data + 2; - break; - case IAX_IE_CAUSECODE: - if (len != 1) { - snprintf(tmp, (int)sizeof(tmp), "Expecting causecode to be single byte but was %d\n", len); - errorf(tmp); - } else { - ies->causecode = data[2]; - } - break; - case IAX_IE_IAX_UNKNOWN: - if (len == 1) - ies->iax_unknown = data[2]; - else { - snprintf(tmp, (int)sizeof(tmp), "Expected single byte Unknown command, but was %d long\n", len); - errorf(tmp); - } - break; - case IAX_IE_MSGCOUNT: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting msgcount to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->msgcount = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_AUTOANSWER: - ies->autoanswer = 1; - break; - case IAX_IE_MUSICONHOLD: - ies->musiconhold = 1; - break; - case IAX_IE_TRANSFERID: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting transferid to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else - ies->transferid = ntohl(get_uint32(data + 2)); - break; - case IAX_IE_DATETIME: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting date/time to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else - ies->datetime = ntohl(get_uint32(data + 2)); - break; - case IAX_IE_FIRMWAREVER: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting firmwarever to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->firmwarever = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_DEVICETYPE: - ies->devicetype = (char *) data + 2; - break; - case IAX_IE_SERVICEIDENT: - ies->serviceident = (char *) data + 2; - break; - case IAX_IE_FWBLOCKDESC: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected block desc to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else - ies->fwdesc = ntohl(get_uint32(data + 2)); - break; - case IAX_IE_FWBLOCKDATA: - ies->fwdata = data + 2; - ies->fwdatalen = len; - break; - case IAX_IE_PROVVER: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected provisioning version to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->provverpres = 1; - ies->provver = ntohl(get_uint32(data + 2)); - } - break; - case IAX_IE_CALLINGPRES: - if (len == 1) - ies->calling_pres = data[2]; - else { - snprintf(tmp, (int)sizeof(tmp), "Expected single byte callingpres, but was %d long\n", len); - errorf(tmp); - } - break; - case IAX_IE_CALLINGTON: - if (len == 1) - ies->calling_ton = data[2]; - else { - snprintf(tmp, (int)sizeof(tmp), "Expected single byte callington, but was %d long\n", len); - errorf(tmp); - } - break; - case IAX_IE_CALLINGTNS: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expecting callingtns to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else - ies->calling_tns = ntohs(get_uint16(data + 2)); - break; - case IAX_IE_RR_JITTER: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected jitter rr to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->rr_jitter = ntohl(get_uint32(data + 2)); - } - break; - case IAX_IE_RR_LOSS: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected loss rr to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->rr_loss = ntohl(get_uint32(data + 2)); - } - break; - case IAX_IE_RR_PKTS: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected packets rr to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->rr_pkts = ntohl(get_uint32(data + 2)); - } - break; - case IAX_IE_RR_DELAY: - if (len != (int)sizeof(unsigned short)) { - snprintf(tmp, (int)sizeof(tmp), "Expected loss rr to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len); - errorf(tmp); - } else { - ies->rr_delay = ntohs(get_uint16(data + 2)); - } - break; - case IAX_IE_RR_DROPPED: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected packets rr to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->rr_dropped = ntohl(get_uint32(data + 2)); - } - break; - case IAX_IE_RR_OOO: - if (len != (int)sizeof(unsigned int)) { - snprintf(tmp, (int)sizeof(tmp), "Expected packets rr to be %d bytes long but was %d\n", (int)sizeof(unsigned int), len); - errorf(tmp); - } else { - ies->rr_ooo = ntohl(get_uint32(data + 2)); - } - break; - default: - snprintf(tmp, (int)sizeof(tmp), "Ignoring unknown information element '%s' (%d) of length %d\n", iax_ie2str(ie), ie, len); - outputf(tmp); - } - /* Overwrite information element with 0, to null terminate previous portion */ - data[0] = 0; - datalen -= (len + 2); - data += (len + 2); - } - /* Null-terminate last field */ - *data = '\0'; - if (datalen) { - errorf("Invalid information element contents, strange boundary\n"); - return -1; - } - return 0; -} - -void iax_frame_wrap(struct iax_frame *fr, struct ast_frame *f) -{ - fr->af.frametype = f->frametype; - fr->af.subclass = f->subclass; - fr->af.mallocd = 0; /* Our frame is static relative to the container */ - fr->af.datalen = f->datalen; - fr->af.samples = f->samples; - fr->af.offset = AST_FRIENDLY_OFFSET; - fr->af.src = f->src; - fr->af.data = fr->afdata; - if (fr->af.datalen) - memcpy(fr->af.data, f->data, fr->af.datalen); -} - -struct iax_frame *iax_frame_new(int direction, int datalen) -{ - struct iax_frame *fr; - fr = (struct iax_frame *)malloc((int)sizeof(struct iax_frame) + datalen); - if (fr) { - fr->direction = direction; - fr->retrans = -1; - frames++; - if (fr->direction == DIRECTION_INGRESS) - iframes++; - else - oframes++; - } - return fr; -} - -void iax_frame_free(struct iax_frame *fr) -{ - /* Note: does not remove from scheduler! */ - if (fr->direction == DIRECTION_INGRESS) - iframes--; - else if (fr->direction == DIRECTION_OUTGRESS) - oframes--; - else { - errorf("Attempt to double free frame detected\n"); - return; - } - fr->direction = 0; - free(fr); - frames--; -} - -int iax_get_frames(void) { return frames; } -int iax_get_iframes(void) { return iframes; } -int iax_get_oframes(void) { return oframes; } diff --git a/libs/libiax2/src/iax2-parser.h b/libs/libiax2/src/iax2-parser.h deleted file mode 100644 index 8238b2f4691c1557f63108547d6ecf621475cec4..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax2-parser.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Asterisk -- A telephony toolkit for Linux. - * - * Implementation of Inter-Asterisk eXchange - * - * Copyright (C) 2003, Digium - * - * Mark Spencer <markster@digium.com> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - */ - -#ifndef _IAX2_PARSER_H -#define _IAX2_PARSER_H - -struct iax_ies { - char *called_number; - char *calling_number; - char *calling_ani; - char *calling_name; - int calling_ton; - int calling_tns; - int calling_pres; - char *called_context; - char *username; - char *password; - unsigned int capability; - unsigned int format; - char *codec_prefs; - char *language; - int version; - unsigned short adsicpe; - char *dnid; - char *rdnis; - unsigned int authmethods; - char *challenge; - char *md5_result; - char *rsa_result; - struct sockaddr_in *apparent_addr; - unsigned short refresh; - unsigned short dpstatus; - unsigned short callno; - char *cause; - unsigned char causecode; - unsigned char iax_unknown; - int msgcount; - int autoanswer; - int musiconhold; - unsigned int transferid; - unsigned int datetime; - char *devicetype; - char *serviceident; - int firmwarever; - unsigned int fwdesc; - unsigned char *fwdata; - unsigned char fwdatalen; - unsigned int provver; - unsigned short samprate; - unsigned int provverpres; - unsigned int rr_jitter; - unsigned int rr_loss; - unsigned int rr_pkts; - unsigned short rr_delay; - unsigned int rr_dropped; - unsigned int rr_ooo; -}; - -#define DIRECTION_INGRESS 1 -#define DIRECTION_OUTGRESS 2 - -struct iax_frame { -#ifdef LIBIAX - struct iax_session *session; - struct iax_event *event; -#endif - - /* /Our/ call number */ - unsigned short callno; - /* /Their/ call number */ - unsigned short dcallno; - /* Start of raw frame (outgoing only) */ - void *data; - /* Length of frame (outgoing only) */ - int datalen; - /* How many retries so far? */ - int retries; - /* Outgoing relative timestamp (ms) */ - unsigned int ts; - /* How long to wait before retrying */ - int retrytime; - /* Are we received out of order? */ - int outoforder; - /* Have we been sent at all yet? */ - int sentyet; - /* Outgoing Packet sequence number */ - int oseqno; - /* Next expected incoming packet sequence number */ - int iseqno; - /* Non-zero if should be sent to transfer peer */ - int transfer; - /* Non-zero if this is the final message */ - int final; - /* Ingress or outgres */ - int direction; - /* Retransmission ID */ - int retrans; - /* Easy linking */ - struct iax_frame *next; - struct iax_frame *prev; - /* Actual, isolated frame header */ - struct ast_frame af; - unsigned char unused[AST_FRIENDLY_OFFSET]; - unsigned char afdata[0]; /* Data for frame */ -}; - -struct iax_ie_data { - unsigned char buf[1024]; - int pos; -}; - -/* Choose a different function for output */ -extern void iax_set_output(void (*output)(const char *data)); -/* Choose a different function for errors */ -extern void iax_set_error(void (*output)(const char *data)); -extern void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, struct sockaddr_in *sin, int datalen); - -extern const char *iax_ie2str(int ie); - -extern int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, const void *data, int datalen); -extern int iax_ie_append_addr(struct iax_ie_data *ied, unsigned char ie, struct sockaddr_in *sin); -extern int iax_ie_append_int(struct iax_ie_data *ied, unsigned char ie, unsigned int value); -extern int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned short value); -extern int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, const char *str); -extern int iax_ie_append_byte(struct iax_ie_data *ied, unsigned char ie, unsigned char dat); -extern int iax_ie_append(struct iax_ie_data *ied, unsigned char ie); -extern int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen); - -extern int iax_get_frames(void); -extern int iax_get_iframes(void); -extern int iax_get_oframes(void); - -extern void iax_frame_wrap(struct iax_frame *fr, struct ast_frame *f); -extern struct iax_frame *iax_frame_new(int direction, int datalen); -extern void iax_frame_free(struct iax_frame *fr); -#endif diff --git a/libs/libiax2/src/iax2.h b/libs/libiax2/src/iax2.h deleted file mode 100644 index 1be78757a457975f31b9c02e81fdf86935289a4e..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/iax2.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Asterisk -- A telephony toolkit for Linux. - * - * Implementation of Inter-Asterisk eXchange - * - * Copyright (C) 2003, Digium - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - */ - -#ifndef _IAX2_H -#define _IAX2_H - -/* Max version of IAX protocol we support */ -#define IAX_PROTO_VERSION 2 - -#define IAX_MAX_CALLS 32768 - -#define IAX_FLAG_FULL 0x8000 - -#define IAX_FLAG_RETRANS 0x8000 - -#define IAX_FLAG_SC_LOG 0x80 - -#define IAX_MAX_SHIFT 0x1F - -#define IAX_WINDOW 64 - -/* Subclass for AST_FRAME_IAX */ -#define IAX_COMMAND_NEW 1 /** Initiate a new call */ -#define IAX_COMMAND_PING 2 /** Ping request */ -#define IAX_COMMAND_PONG 3 /** Ping or poke reply */ -#define IAX_COMMAND_ACK 4 /** Explicit acknowledgment */ -#define IAX_COMMAND_HANGUP 5 /** Initiate call teardown */ -#define IAX_COMMAND_REJECT 6 /** Reject a call */ -#define IAX_COMMAND_ACCEPT 7 /** Accept a call */ -#define IAX_COMMAND_AUTHREQ 8 /** Authentication request */ -#define IAX_COMMAND_AUTHREP 9 /** Authentication reply */ -#define IAX_COMMAND_INVAL 10 /** Invalid message */ -#define IAX_COMMAND_LAGRQ 11 /** Lag request */ -#define IAX_COMMAND_LAGRP 12 /** Lag reply */ -#define IAX_COMMAND_REGREQ 13 /** Registration request */ -#define IAX_COMMAND_REGAUTH 14 /** Registration authentication required */ -#define IAX_COMMAND_REGACK 15 /** Registration accepted */ -#define IAX_COMMAND_REGREJ 16 /** Registration rejected */ -#define IAX_COMMAND_REGREL 17 /** Force release of registration */ -#define IAX_COMMAND_VNAK 18 /** If we receive voice before valid first voice frame, send this */ -#define IAX_COMMAND_DPREQ 19 /** Request status of a dialplan entry */ -#define IAX_COMMAND_DPREP 20 /** Request status of a dialplan entry */ -#define IAX_COMMAND_DIAL 21 /** Request a dial on channel brought up TBD */ -#define IAX_COMMAND_TXREQ 22 /** Transfer Request */ -#define IAX_COMMAND_TXCNT 23 /** Transfer Connect */ -#define IAX_COMMAND_TXACC 24 /** Transfer Accepted */ -#define IAX_COMMAND_TXREADY 25 /** Transfer ready */ -#define IAX_COMMAND_TXREL 26 /** Transfer release */ -#define IAX_COMMAND_TXREJ 27 /** Transfer reject */ -#define IAX_COMMAND_QUELCH 28 /** Stop audio/video transmission */ -#define IAX_COMMAND_UNQUELCH 29 /** Resume audio/video transmission */ -#define IAX_COMMAND_POKE 30 /** Like ping, but does not require an open connection */ -#define IAX_COMMAND_PAGE 31 /** Paging description */ -#define IAX_COMMAND_MWI 32 /** Stand-alone message waiting indicator */ -#define IAX_COMMAND_UNSUPPORT 33 /** Unsupported message received */ -#define IAX_COMMAND_TRANSFER 34 /** Request remote transfer */ -#define IAX_COMMAND_PROVISION 35 /** Provision an IAX2 device */ -#define IAX_COMMAND_FWDOWNL 36 /** Download firmware request */ -#define IAX_COMMAND_FWDATA 37 /** Transmit firmware data */ - -#define IAX_DEFAULT_REG_EXPIRE 60 /** By default require re-registration once per minute */ - -#define IAX_LINGER_TIMEOUT 10 /** How long to wait before closing bridged call */ - -#define IAX_DEFAULT_PORTNO 4569 - -/* IAX Information elements */ -#define IAX_IE_CALLED_NUMBER 1 /** Number/extension being called - string */ -#define IAX_IE_CALLING_NUMBER 2 /** Calling number - string */ -#define IAX_IE_CALLING_ANI 3 /** Calling number ANI for billing - string */ -#define IAX_IE_CALLING_NAME 4 /** Name of caller - string */ -#define IAX_IE_CALLED_CONTEXT 5 /** Context for number - string */ -#define IAX_IE_USERNAME 6 /** Username (peer or user) for authentication - string */ -#define IAX_IE_PASSWORD 7 /** Password for authentication - string */ -#define IAX_IE_CAPABILITY 8 /** Actual codec capability - unsigned int */ -#define IAX_IE_FORMAT 9 /** Desired codec format - unsigned int */ -#define IAX_IE_LANGUAGE 10 /** Desired language - string */ -#define IAX_IE_VERSION 11 /** Protocol version - short */ -#define IAX_IE_ADSICPE 12 /** CPE ADSI capability - short */ -#define IAX_IE_DNID 13 /** Originally dialed DNID - string */ -#define IAX_IE_AUTHMETHODS 14 /** Authentication method(s) - short */ -#define IAX_IE_CHALLENGE 15 /** Challenge data for MD5/RSA - string */ -#define IAX_IE_MD5_RESULT 16 /** MD5 challenge result - string */ -#define IAX_IE_RSA_RESULT 17 /** RSA challenge result - string */ -#define IAX_IE_APPARENT_ADDR 18 /** Apparent address of peer - struct sockaddr_in */ -#define IAX_IE_REFRESH 19 /** When to refresh registration - short */ -#define IAX_IE_DPSTATUS 20 /** Dialplan status - short */ -#define IAX_IE_CALLNO 21 /** Call number of peer - short */ -#define IAX_IE_CAUSE 22 /** Cause - string */ -#define IAX_IE_IAX_UNKNOWN 23 /** Unknown IAX command - byte */ -#define IAX_IE_MSGCOUNT 24 /** How many messages waiting - short */ -#define IAX_IE_AUTOANSWER 25 /** Request auto-answering -- none */ -#define IAX_IE_MUSICONHOLD 26 /** Request musiconhold with QUELCH -- none or string */ -#define IAX_IE_TRANSFERID 27 /** Transfer Request Identifier -- int */ -#define IAX_IE_RDNIS 28 /** Referring DNIS -- string */ -#define IAX_IE_PROVISIONING 29 /** Provisioning info */ -#define IAX_IE_AESPROVISIONING 30 /** AES Provisioning info */ -#define IAX_IE_DATETIME 31 /** Date/Time */ -#define IAX_IE_DEVICETYPE 32 /** Device Type -- string */ -#define IAX_IE_SERVICEIDENT 33 /** Service Identifier -- string */ -#define IAX_IE_FIRMWAREVER 34 /** Firmware revision -- u16 */ -#define IAX_IE_FWBLOCKDESC 35 /** Firmware block description -- u32 */ -#define IAX_IE_FWBLOCKDATA 36 /** Firmware block of data -- raw */ -#define IAX_IE_PROVVER 37 /** Provisioning Version (u32) */ -#define IAX_IE_CALLINGPRES 38 /** Calling presentation (u8) */ -#define IAX_IE_CALLINGTON 39 /** Calling type of number (u8) */ -#define IAX_IE_CALLINGTNS 40 /** Calling transit network select (u16) */ -#define IAX_IE_SAMPLINGRATE 41 /** Supported sampling rates (u16) */ -#define IAX_IE_CAUSECODE 42 /** Hangup cause (u8) */ -#define IAX_IE_ENCRYPTION 43 /** Encryption format (u16) */ -#define IAX_IE_ENCKEY 44 /** Encryption key (raw) */ -#define IAX_IE_CODEC_PREFS 45 /** Codec Negotiation */ -#define IAX_IE_RR_JITTER 46 /** Received jitter (as in RFC1889) u32 */ -#define IAX_IE_RR_LOSS 47 /** Received loss (high byte loss pct, low 24 bits loss count, as in rfc1889 */ -#define IAX_IE_RR_PKTS 48 /** Received frames (total frames received) u32 */ -#define IAX_IE_RR_DELAY 49 /** Max playout delay for received frames (in ms) u16 */ -#define IAX_IE_RR_DROPPED 50 /** Dropped frames (presumably by jitterbuf) u32 */ -#define IAX_IE_RR_OOO 51 /** Frames received Out of Order u32 */ - - - -#define IAX_AUTH_PLAINTEXT (1 << 0) -#define IAX_AUTH_MD5 (1 << 1) -#define IAX_AUTH_RSA (1 << 2) - -#define IAX_META_TRUNK 1 /** Trunk meta-message */ -#define IAX_META_VIDEO 2 /** Video frame */ - -#define IAX_RATE_8KHZ (1 << 0) /** 8khz sampling (default if absent) */ -#define IAX_RATE_11KHZ (1 << 1) /** 11.025khz sampling */ -#define IAX_RATE_16KHZ (1 << 2) /** 16khz sampling */ -#define IAX_RATE_22KHZ (1 << 3) /** 22.05khz sampling */ -#define IAX_RATE_44KHZ (1 << 4) /** 44.1khz sampling */ -#define IAX_RATE_48KHZ (1 << 5) /** 48khz sampling */ - -#define IAX_DPSTATUS_EXISTS (1 << 0) -#define IAX_DPSTATUS_CANEXIST (1 << 1) -#define IAX_DPSTATUS_NONEXISTANT (1 << 2) -#define IAX_DPSTATUS_IGNOREPAT (1 << 14) -#define IAX_DPSTATUS_MATCHMORE (1 << 15) - -#if defined(_MSC_VER) -#pragma pack(push,1) -#define __PACKED -#else -#define __PACKED __attribute__ ((__packed__)) -#endif - -/* Full frames are always delivered reliably */ -struct ast_iax2_full_hdr { - unsigned short scallno; /**< Source call number -- high bit must be 1 */ - unsigned short dcallno; /**< Destination call number -- high bit is 1 if retransmission */ - unsigned int ts; /**< 32-bit timestamp in milliseconds (from 1st transmission) */ - unsigned char oseqno; /**< Packet number (outgoing) */ - unsigned char iseqno; /**< Packet number (next incoming expected) */ - char type; /**< Frame type */ - unsigned char csub; /**< Compressed subclass */ - unsigned char iedata[0]; -} __PACKED; - -/* Mini header is used only for voice frames -- delivered unreliably */ -struct ast_iax2_mini_hdr { - unsigned short callno; /**< Source call number -- high bit must be 0, rest must be non-zero */ - unsigned short ts; /**< 16-bit Timestamp (high 16 bits from last ast_iax2_full_hdr) */ - /**< Frametype implicitly VOICE_FRAME */ - /**< subclass implicit from last ast_iax2_full_hdr */ - unsigned char data[0]; -} __PACKED; - -struct ast_iax2_meta_hdr { - unsigned short zeros; /**< Zeros field -- must be zero */ - unsigned char metacmd; /**< Meta command */ - unsigned char cmddata; /**< Command Data */ - unsigned char data[0]; -} __PACKED; - -struct ast_iax2_video_hdr { - unsigned short zeros; /**< Zeros field -- must be zero */ - unsigned short callno; /**< Video call number */ - unsigned short ts; /**< Timestamp and mark if present */ - unsigned char data[0]; -} __PACKED; - -struct ast_iax2_meta_trunk_hdr { - unsigned int ts; /**< 32-bit timestamp for all messages */ - unsigned char data[0]; -} __PACKED; - -struct ast_iax2_meta_trunk_entry { - unsigned short callno; /**< Call number */ - unsigned short len; /**< Length of data for this callno */ -} __PACKED; - -#define IAX_FIRMWARE_MAGIC 0x69617879 - -struct ast_iax2_firmware_header { - unsigned int magic; /**< Magic number */ - unsigned short version; /**< Software version */ - unsigned char devname[16]; /**< Device */ - unsigned int datalen; /**< Data length of file beyond header */ - unsigned char chksum[16]; /**< Checksum of all data */ - unsigned char data[0]; -} __PACKED; - - -#if defined(_MSC_VER) -#pragma pack(pop) -#endif - -#undef __PACKED - -#endif diff --git a/libs/libiax2/src/jitterbuf.c b/libs/libiax2/src/jitterbuf.c deleted file mode 100644 index 0d450240c15e8db21ed4923743b6b9468de458c9..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/jitterbuf.c +++ /dev/null @@ -1,833 +0,0 @@ -/* - * jitterbuf: an application-independent jitterbuffer - * - * Copyrights: - * Copyright (C) 2004-2005, Horizon Wimba, Inc. - * - * Contributors: - * Steve Kann <stevek@stevek.com> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - * - * Copyright on this file is disclaimed to Digium for inclusion in Asterisk - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> - -#include "jitterbuf.h" - -/* define these here, just for ancient compiler systems */ -#define JB_LONGMAX 2147483647L -#define JB_LONGMIN (-JB_LONGMAX - 1L) - -/* MS VC can't do __VA_ARGS__ */ -#if (defined(WIN32) || defined(_WIN32_WCE)) && defined(_MSC_VER) -#define jb_warn if (warnf) warnf -#define jb_err if (errf) errf -#define jb_dbg if (dbgf) dbgf - -#ifdef DEEP_DEBUG - #define jb_dbg2 if (dbgf) dbgf -#else - #define jb_dbg2 if (0) dbgf -#endif - -#else - -#define jb_warn(...) (warnf ? warnf(__VA_ARGS__) : (void)0) -#define jb_err(...) (errf ? errf(__VA_ARGS__) : (void)0) -#define jb_dbg(...) (dbgf ? dbgf(__VA_ARGS__) : (void)0) - -#ifdef DEEP_DEBUG -#define jb_dbg2(...) (dbgf ? dbgf(__VA_ARGS__) : (void)0) -#else -#define jb_dbg2(...) ((void)0) -#endif - -#endif - -static jb_output_function_t warnf, errf, dbgf; - -void jb_setoutput(jb_output_function_t err, jb_output_function_t warn, jb_output_function_t dbg) -{ - errf = err; - warnf = warn; - dbgf = dbg; -} - -static void increment_losspct(jitterbuf *jb) -{ - jb->info.losspct = (100000 + 499 * jb->info.losspct)/500; -} - -static void decrement_losspct(jitterbuf *jb) -{ - jb->info.losspct = (499 * jb->info.losspct)/500; -} - -void jb_reset(jitterbuf *jb) -{ - /* only save settings */ - jb_conf s = jb->info.conf; - memset(jb, 0, sizeof(*jb)); - jb->info.conf = s; - - /* initialize length, using the configured value */ - jb->info.current = jb->info.target = jb->info.conf.target_extra; - jb->info.silence_begin_ts = -1; -} - -jitterbuf * jb_new() -{ - jitterbuf *jb; - - if (!(jb = (jitterbuf *)malloc(sizeof(*jb)))) - return NULL; - - jb->info.conf.target_extra = JB_TARGET_EXTRA; - - jb_reset(jb); - - jb_dbg2("jb_new() = %x\n", jb); - return jb; -} - -void jb_destroy(jitterbuf *jb) -{ - jb_frame *frame; - jb_dbg2("jb_destroy(%x)\n", jb); - - /* free all the frames on the "free list" */ - frame = jb->free; - while (frame != NULL) { - jb_frame *next = frame->next; - free(frame); - frame = next; - } - - /* free ourselves! */ - free(jb); -} - - - -#if 0 -static int longcmp(const void *a, const void *b) -{ - return *(long *)a - *(long *)b; -} -#endif - -/* simple history manipulation */ -/* maybe later we can make the history buckets variable size, or something? */ -/* drop parameter determines whether we will drop outliers to minimize - * delay */ -static int history_put(jitterbuf *jb, long ts, long now, long ms) -{ - long delay = now - (ts - jb->info.resync_offset); - long threshold = 2 * jb->info.jitter + jb->info.conf.resync_threshold; - long kicked; - - /* don't add special/negative times to history */ - if (ts <= 0) - return 0; - - /* check for drastic change in delay */ - if (jb->info.conf.resync_threshold != -1) { - if (abs(delay - jb->info.last_delay) > threshold) { - jb->info.cnt_delay_discont++; - if (jb->info.cnt_delay_discont > 3) { - /* resync the jitterbuffer */ - jb->info.cnt_delay_discont = 0; - jb->hist_ptr = 0; - jb->hist_maxbuf_valid = 0; - - jb_warn("Resyncing the jb. last_delay %ld, this delay %ld, threshold %ld, new offset %ld\n", jb->info.last_delay, delay, threshold, ts - now); - jb->info.resync_offset = ts - now; - jb->info.last_delay = delay = 0; /* after resync, frame is right on time */ - } else { - return -1; - } - } else { - jb->info.last_delay = delay; - jb->info.cnt_delay_discont = 0; - } - } - - kicked = jb->history[jb->hist_ptr % JB_HISTORY_SZ]; - - jb->history[(jb->hist_ptr++) % JB_HISTORY_SZ] = delay; - - /* optimization; the max/min buffers don't need to be recalculated, - * if this packet's entry doesn't change them. This happens if this - * packet is not involved, _and_ any packet that got kicked out of - * the history is also not involved. We do a number of comparisons, - * but it's probably still worthwhile, because it will usually - * succeed, and should be a lot faster than going through all 500 - * packets in history */ - if (!jb->hist_maxbuf_valid) - return 0; - - /* don't do this until we've filled history - * (reduces some edge cases below) */ - if (jb->hist_ptr < JB_HISTORY_SZ) - goto invalidate; - - /* if the new delay would go into min */ - if (delay < jb->hist_minbuf[JB_HISTORY_MAXBUF_SZ-1]) - goto invalidate; - - /* or max.. */ - if (delay > jb->hist_maxbuf[JB_HISTORY_MAXBUF_SZ-1]) - goto invalidate; - - /* or the kicked delay would be in min */ - if (kicked <= jb->hist_minbuf[JB_HISTORY_MAXBUF_SZ-1]) - goto invalidate; - - if (kicked >= jb->hist_maxbuf[JB_HISTORY_MAXBUF_SZ-1]) - goto invalidate; - - /* if we got here, we don't need to invalidate, 'cause this delay didn't - * affect things */ - return 0; - /* end optimization */ - - -invalidate: - jb->hist_maxbuf_valid = 0; - return 0; -} - -static void history_calc_maxbuf(jitterbuf *jb) -{ - int i,j; - - if (jb->hist_ptr == 0) - return; - - - /* initialize maxbuf/minbuf to the latest value */ - for (i=0;i<JB_HISTORY_MAXBUF_SZ;i++) { - /* - * jb->hist_maxbuf[i] = jb->history[(jb->hist_ptr-1) % JB_HISTORY_SZ]; - * jb->hist_minbuf[i] = jb->history[(jb->hist_ptr-1) % JB_HISTORY_SZ]; - */ - jb->hist_maxbuf[i] = JB_LONGMIN; - jb->hist_minbuf[i] = JB_LONGMAX; - } - - /* use insertion sort to populate maxbuf */ - /* we want it to be the top "n" values, in order */ - - /* start at the beginning, or JB_HISTORY_SZ frames ago */ - i = (jb->hist_ptr > JB_HISTORY_SZ) ? (jb->hist_ptr - JB_HISTORY_SZ) : 0; - - for (;i<jb->hist_ptr;i++) { - long toins = jb->history[i % JB_HISTORY_SZ]; - - /* if the maxbuf should get this */ - if (toins > jb->hist_maxbuf[JB_HISTORY_MAXBUF_SZ-1]) { - - /* insertion-sort it into the maxbuf */ - for (j=0;j<JB_HISTORY_MAXBUF_SZ;j++) { - /* found where it fits */ - if (toins > jb->hist_maxbuf[j]) { - /* move over */ - memmove(jb->hist_maxbuf + j + 1, jb->hist_maxbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_maxbuf[0])); - /* insert */ - jb->hist_maxbuf[j] = toins; - - break; - } - } - } - - /* if the minbuf should get this */ - if (toins < jb->hist_minbuf[JB_HISTORY_MAXBUF_SZ-1]) { - - /* insertion-sort it into the maxbuf */ - for (j=0;j<JB_HISTORY_MAXBUF_SZ;j++) { - /* found where it fits */ - if (toins < jb->hist_minbuf[j]) { - /* move over */ - memmove(jb->hist_minbuf + j + 1, jb->hist_minbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_minbuf[0])); - /* insert */ - jb->hist_minbuf[j] = toins; - - break; - } - } - } - - if (0) { - int k; - fprintf(stderr, "toins = %ld\n", toins); - fprintf(stderr, "maxbuf ="); - for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++) - fprintf(stderr, "%ld ", jb->hist_maxbuf[k]); - fprintf(stderr, "\nminbuf ="); - for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++) - fprintf(stderr, "%ld ", jb->hist_minbuf[k]); - fprintf(stderr, "\n"); - } - } - - jb->hist_maxbuf_valid = 1; -} - -static void history_get(jitterbuf *jb) -{ - long max, min, jitter; - int index; - int count; - - if (!jb->hist_maxbuf_valid) - history_calc_maxbuf(jb); - - /* count is how many items in history we're examining */ - count = (jb->hist_ptr < JB_HISTORY_SZ) ? jb->hist_ptr : JB_HISTORY_SZ; - - /* index is the "n"ths highest/lowest that we'll look for */ - index = count * JB_HISTORY_DROPPCT / 100; - - /* sanity checks for index */ - if (index > (JB_HISTORY_MAXBUF_SZ - 1)) - index = JB_HISTORY_MAXBUF_SZ - 1; - - - if (index < 0) { - jb->info.min = 0; - jb->info.jitter = 0; - return; - } - - max = jb->hist_maxbuf[index]; - min = jb->hist_minbuf[index]; - - jitter = max - min; - - /* these debug stmts compare the difference between looking at the absolute jitter, and the - * values we get by throwing away the outliers */ - /* - fprintf(stderr, "[%d] min=%d, max=%d, jitter=%d\n", index, min, max, jitter); - fprintf(stderr, "[%d] min=%d, max=%d, jitter=%d\n", 0, jb->hist_minbuf[0], jb->hist_maxbuf[0], jb->hist_maxbuf[0]-jb->hist_minbuf[0]); - */ - - jb->info.min = min; - jb->info.jitter = jitter; -} - -/* returns 1 if frame was inserted into head of queue, 0 otherwise */ -static int queue_put(jitterbuf *jb, void *data, const enum jb_frame_type type, long ms, long ts) -{ - jb_frame *frame; - jb_frame *p; - int head = 0; - long resync_ts = ts - jb->info.resync_offset; - - if ((frame = jb->free)) { - jb->free = frame->next; - } else if (!(frame = (jb_frame *)malloc(sizeof(*frame)))) { - jb_err("cannot allocate frame\n"); - return 0; - } - - jb->info.frames_cur++; - - frame->data = data; - frame->ts = resync_ts; - frame->ms = ms; - frame->type = type; - - /* - * frames are a circular list, jb-frames points to to the lowest ts, - * jb->frames->prev points to the highest ts - */ - - if (!jb->frames) { /* queue is empty */ - jb->frames = frame; - frame->next = frame; - frame->prev = frame; - head = 1; - } else if (resync_ts < jb->frames->ts) { - frame->next = jb->frames; - frame->prev = jb->frames->prev; - - frame->next->prev = frame; - frame->prev->next = frame; - - /* frame is out of order */ - jb->info.frames_ooo++; - - jb->frames = frame; - head = 1; - } else { - p = jb->frames; - - /* frame is out of order */ - if (resync_ts < p->prev->ts) jb->info.frames_ooo++; - - while (resync_ts < p->prev->ts && p->prev != jb->frames) - p = p->prev; - - frame->next = p; - frame->prev = p->prev; - - frame->next->prev = frame; - frame->prev->next = frame; - } - return head; -} - -static long queue_next(jitterbuf *jb) -{ - if (jb->frames) - return jb->frames->ts; - else - return -1; -} - -static long queue_last(jitterbuf *jb) -{ - if (jb->frames) - return jb->frames->prev->ts; - else - return -1; -} - -static jb_frame *_queue_get(jitterbuf *jb, long ts, int all) -{ - jb_frame *frame; - frame = jb->frames; - - if (!frame) - return NULL; - - /*jb_warn("queue_get: ASK %ld FIRST %ld\n", ts, frame->ts); */ - - if (all || ts >= frame->ts) { - /* remove this frame */ - frame->prev->next = frame->next; - frame->next->prev = frame->prev; - - if (frame->next == frame) - jb->frames = NULL; - else - jb->frames = frame->next; - - - /* insert onto "free" single-linked list */ - frame->next = jb->free; - jb->free = frame; - - jb->info.frames_cur--; - - /* we return the frame pointer, even though it's on free list, - * but caller must copy data */ - return frame; - } - - return NULL; -} - -static jb_frame *queue_get(jitterbuf *jb, long ts) -{ - return _queue_get(jb,ts,0); -} - -static jb_frame *queue_getall(jitterbuf *jb) -{ - return _queue_get(jb,0,1); -} - -#if 0 -/* some diagnostics */ -static void jb_dbginfo(jitterbuf *jb) -{ - if (dbgf == NULL) - return; - - jb_dbg("\njb info: fin=%ld fout=%ld flate=%ld flost=%ld fdrop=%ld fcur=%ld\n", - jb->info.frames_in, jb->info.frames_out, jb->info.frames_late, jb->info.frames_lost, jb->info.frames_dropped, jb->info.frames_cur); - - jb_dbg("jitter=%ld current=%ld target=%ld min=%ld sil=%d len=%d len/fcur=%ld\n", - jb->info.jitter, jb->info.current, jb->info.target, jb->info.min, jb->info.silence_begin_ts, jb->info.current - jb->info.min, - jb->info.frames_cur ? (jb->info.current - jb->info.min)/jb->info.frames_cur : -8); - if (jb->info.frames_in > 0) - jb_dbg("jb info: Loss PCT = %ld%%, Late PCT = %ld%%\n", - jb->info.frames_lost * 100/(jb->info.frames_in + jb->info.frames_lost), - jb->info.frames_late * 100/jb->info.frames_in); - jb_dbg("jb info: queue %d -> %d. last_ts %d (queue len: %d) last_ms %d\n", - queue_next(jb), - queue_last(jb), - jb->info.next_voice_ts, - queue_last(jb) - queue_next(jb), - jb->info.last_voice_ms); -} -#endif - -#ifdef DEEP_DEBUG -static void jb_chkqueue(jitterbuf *jb) -{ - int i=0; - jb_frame *p = jb->frames; - - if (!p) { - return; - } - - do { - if (p->next == NULL) { - jb_err("Queue is BROKEN at item [%d]", i); - } - i++; - p=p->next; - } while (p->next != jb->frames); -} - -static void jb_dbgqueue(jitterbuf *jb) -{ - int i=0; - jb_frame *p = jb->frames; - - jb_dbg("queue: "); - - if (!p) { - jb_dbg("EMPTY\n"); - return; - } - - do { - jb_dbg("[%d]=%ld ", i++, p->ts); - p=p->next; - } while (p->next != jb->frames); - - jb_dbg("\n"); -} -#endif - -enum jb_return_code jb_put(jitterbuf *jb, void *data, const enum jb_frame_type type, long ms, long ts, long now) -{ - jb_dbg2("jb_put(%x,%x,%ld,%ld,%ld)\n", jb, data, ms, ts, now); - - jb->info.frames_in++; - - if (type == JB_TYPE_VOICE) { - /* presently, I'm only adding VOICE frames to history and drift - * calculations; mostly because with the IAX integrations, I'm - * sending retransmitted control frames with their awkward - * timestamps through - */ - if (history_put(jb,ts,now,ms)) - return JB_DROP; - } - - /* if put into head of queue, caller needs to reschedule */ - if (queue_put(jb,data,type,ms,ts)) { - return JB_SCHED; - } - - return JB_OK; -} - - -static enum jb_return_code _jb_get(jitterbuf *jb, jb_frame *frameout, long now, long interpl) -{ - jb_frame *frame; - long diff; - - /*if ((now - jb_next(jb)) > 2 * jb->info.last_voice_ms) jb_warn("SCHED: %ld", (now - jb_next(jb))); */ - /* get jitter info */ - history_get(jb); - - - /* target */ - jb->info.target = jb->info.jitter + jb->info.min + jb->info.conf.target_extra; - - /* if a hard clamp was requested, use it */ - if ((jb->info.conf.max_jitterbuf) && ((jb->info.target - jb->info.min) > jb->info.conf.max_jitterbuf)) { - jb_dbg("clamping target from %d to %d\n", (jb->info.target - jb->info.min), jb->info.conf.max_jitterbuf); - jb->info.target = jb->info.min + jb->info.conf.max_jitterbuf; - } - - diff = jb->info.target - jb->info.current; - - /* jb_warn("diff = %d lms=%d last = %d now = %d\n", diff, */ - /* jb->info.last_voice_ms, jb->info.last_adjustment, now); */ - - /* let's work on non-silent case first */ - if (!jb->info.silence_begin_ts) { - /* we want to grow */ - if ((diff > 0) && - /* we haven't grown in the delay length */ - (((jb->info.last_adjustment + JB_ADJUST_DELAY) < now) || - /* we need to grow more than the "length" we have left */ - (diff > queue_last(jb) - queue_next(jb)) ) ) { - /* grow by interp frame length */ - jb->info.current += interpl; - jb->info.next_voice_ts += interpl; - jb->info.last_voice_ms = interpl; - jb->info.last_adjustment = now; - jb->info.cnt_contig_interp++; - /* assume silence instead of continuing to interpolate */ - if (jb->info.conf.max_contig_interp && jb->info.cnt_contig_interp >= jb->info.conf.max_contig_interp) { - jb->info.silence_begin_ts = jb->info.next_voice_ts - jb->info.current; - } - jb_dbg("G"); - return JB_INTERP; - } - - frame = queue_get(jb, jb->info.next_voice_ts - jb->info.current); - - /* not a voice frame; just return it. */ - if (frame && frame->type != JB_TYPE_VOICE) { - /* track start of silence */ - if (frame->type == JB_TYPE_SILENCE) { - jb->info.silence_begin_ts = frame->ts; - jb->info.cnt_contig_interp = 0; - } - - *frameout = *frame; - jb->info.frames_out++; - jb_dbg("o"); - return JB_OK; - } - - /* voice frame is later than expected */ - if (frame && frame->ts + jb->info.current < jb->info.next_voice_ts) { - if (frame->ts + jb->info.current > jb->info.next_voice_ts - jb->info.last_voice_ms) { - /* either we interpolated past this frame in the last jb_get */ - /* or the frame is still in order, but came a little too quick */ - *frameout = *frame; - /* reset expectation for next frame */ - jb->info.next_voice_ts = frame->ts + jb->info.current + frame->ms; - jb->info.frames_out++; - decrement_losspct(jb); - jb->info.cnt_contig_interp = 0; - jb_dbg("v"); - return JB_OK; - } else { - /* voice frame is late */ - *frameout = *frame; - jb->info.frames_out++; - decrement_losspct(jb); - jb->info.frames_late++; - jb->info.frames_lost--; - jb_dbg("l"); - /*jb_warn("\nlate: wanted=%ld, this=%ld, next=%ld\n", jb->info.next_voice_ts - jb->info.current, frame->ts, queue_next(jb)); - jb_warninfo(jb); */ - return JB_DROP; - } - } - - /* keep track of frame sizes, to allow for variable sized-frames */ - if (frame && frame->ms > 0) { - jb->info.last_voice_ms = frame->ms; - } - - /* we want to shrink; shrink at 1 frame / 500ms */ - /* unless we don't have a frame, then shrink 1 frame */ - /* every 80ms (though perhaps we can shrink even faster */ - /* in this case) */ - if (diff < -jb->info.conf.target_extra && - ((!frame && jb->info.last_adjustment + 80 < now) || - (jb->info.last_adjustment + 500 < now))) { - - jb->info.last_adjustment = now; - jb->info.cnt_contig_interp = 0; - - if (frame) { - *frameout = *frame; - /* shrink by frame size we're throwing out */ - jb->info.current -= frame->ms; - jb->info.frames_out++; - decrement_losspct(jb); - jb->info.frames_dropped++; - jb_dbg("s"); - return JB_DROP; - } else { - /* shrink by last_voice_ms */ - jb->info.current -= jb->info.last_voice_ms; - jb->info.frames_lost++; - increment_losspct(jb); - jb_dbg("S"); - return JB_NOFRAME; - } - } - - /* lost frame */ - if (!frame) { - /* this is a bit of a hack for now, but if we're close to - * target, and we find a missing frame, it makes sense to - * grow, because the frame might just be a bit late; - * otherwise, we presently get into a pattern where we return - * INTERP for the lost frame, then it shows up next, and we - * throw it away because it's late */ - /* I've recently only been able to replicate this using - * iaxclient talking to app_echo on asterisk. In this case, - * my outgoing packets go through asterisk's (old) - * jitterbuffer, and then might get an unusual increasing delay - * there if it decides to grow?? */ - /* Update: that might have been a different bug, that has been fixed.. - * But, this still seemed like a good idea, except that it ended up making a single actual - * lost frame get interpolated two or more times, when there was "room" to grow, so it might - * be a bit of a bad idea overall */ - /*if (diff > -1 * jb->info.last_voice_ms) { - jb->info.current += jb->info.last_voice_ms; - jb->info.last_adjustment = now; - jb_warn("g"); - return JB_INTERP; - } */ - jb->info.frames_lost++; - increment_losspct(jb); - jb->info.next_voice_ts += interpl; - jb->info.last_voice_ms = interpl; - jb->info.cnt_contig_interp++; - /* assume silence instead of continuing to interpolate */ - if (jb->info.conf.max_contig_interp && jb->info.cnt_contig_interp >= jb->info.conf.max_contig_interp) { - jb->info.silence_begin_ts = jb->info.next_voice_ts - jb->info.current; - } - jb_dbg("L"); - return JB_INTERP; - } - - /* normal case; return the frame, increment stuff */ - *frameout = *frame; - jb->info.next_voice_ts += frame->ms; - jb->info.frames_out++; - jb->info.cnt_contig_interp = 0; - decrement_losspct(jb); - jb_dbg("v"); - return JB_OK; - } else { - /* TODO: after we get the non-silent case down, we'll make the - * silent case -- basically, we'll just grow and shrink faster - * here, plus handle next_voice_ts a bit differently */ - - /* to disable silent special case altogether, just uncomment this: */ - /* jb->info.silence_begin_ts = 0; */ - - /* shrink interpl len every 10ms during silence */ - if (diff < -jb->info.conf.target_extra && - jb->info.last_adjustment + 10 <= now) { - jb->info.current -= interpl; - jb->info.last_adjustment = now; - } - - frame = queue_get(jb, now - jb->info.current); - if (!frame) { - return JB_NOFRAME; - } else if (frame->type != JB_TYPE_VOICE) { - /* normal case; in silent mode, got a non-voice frame */ - *frameout = *frame; - jb->info.frames_out++; - return JB_OK; - } - if (frame->ts < jb->info.silence_begin_ts) { - /* voice frame is late */ - *frameout = *frame; - jb->info.frames_out++; - decrement_losspct(jb); - jb->info.frames_late++; - jb->info.frames_lost--; - jb_dbg("l"); - /*jb_warn("\nlate: wanted=%ld, this=%ld, next=%ld\n", jb->info.next_voice_ts - jb->info.current, frame->ts, queue_next(jb)); - jb_warninfo(jb); */ - return JB_DROP; - } else { - /* voice frame */ - /* try setting current to target right away here */ - jb->info.current = jb->info.target; - jb->info.silence_begin_ts = 0; - jb->info.next_voice_ts = frame->ts + jb->info.current + frame->ms; - jb->info.last_voice_ms = frame->ms; - jb->info.frames_out++; - decrement_losspct(jb); - *frameout = *frame; - jb_dbg("V"); - return JB_OK; - } - } -} - -long jb_next(jitterbuf *jb) -{ - if (jb->info.silence_begin_ts) { - if (jb->frames) { - long next = queue_next(jb); - history_get(jb); - /* shrink during silence */ - if (jb->info.target - jb->info.current < -jb->info.conf.target_extra) - return jb->info.last_adjustment + 10; - return next + jb->info.target; - } - else - return JB_LONGMAX; - } else { - return jb->info.next_voice_ts; - } -} - -enum jb_return_code jb_get(jitterbuf *jb, jb_frame *frameout, long now, long interpl) -{ - enum jb_return_code ret = _jb_get(jb, frameout, now, interpl); -#if 0 - static int lastts=0; - int thists = ((ret == JB_OK) || (ret == JB_DROP)) ? frameout->ts : 0; - jb_warn("jb_get(%x,%x,%ld) = %d (%d)\n", jb, frameout, now, ret, thists); - if (thists && thists < lastts) jb_warn("XXXX timestamp roll-back!!!\n"); - lastts = thists; -#endif - return ret; -} - -enum jb_return_code jb_getall(jitterbuf *jb, jb_frame *frameout) -{ - jb_frame *frame; - frame = queue_getall(jb); - - if (!frame) { - return JB_NOFRAME; - } - - *frameout = *frame; - return JB_OK; -} - - -enum jb_return_code jb_getinfo(jitterbuf *jb, jb_info *stats) -{ - history_get(jb); - - *stats = jb->info; - - return JB_OK; -} - -enum jb_return_code jb_setconf(jitterbuf *jb, jb_conf *conf) -{ - /* take selected settings from the struct */ - - jb->info.conf.max_jitterbuf = conf->max_jitterbuf; - jb->info.conf.resync_threshold = conf->resync_threshold; - jb->info.conf.max_contig_interp = conf->max_contig_interp; - - /* -1 indicates use of the default JB_TARGET_EXTRA value */ - jb->info.conf.target_extra = ( conf->target_extra == -1 ) - ? JB_TARGET_EXTRA - : conf->target_extra - ; - - /* update these to match new target_extra setting */ - jb->info.current = jb->info.conf.target_extra; - jb->info.target = jb->info.conf.target_extra; - - return JB_OK; -} - - diff --git a/libs/libiax2/src/jitterbuf.h b/libs/libiax2/src/jitterbuf.h deleted file mode 100644 index 293c92d4d3a7342c74500ac2c96feae35e15bad9..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/jitterbuf.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * jitterbuf: an application-independent jitterbuffer - * - * Copyrights: - * Copyright (C) 2004-2005, Horizon Wimba, Inc. - * - * Contributors: - * Steve Kann <stevek@stevek.com> - * - * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - * - * Copyright on this file is disclaimed to Digium for inclusion in Asterisk - */ - -#ifndef _JITTERBUF_H_ -#define _JITTERBUF_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* configuration constants */ - /* Number of historical timestamps to use in calculating jitter and drift */ -#define JB_HISTORY_SZ 500 - /* what percentage of timestamps should we drop from the history when we examine it; - * this might eventually be something made configurable */ -#define JB_HISTORY_DROPPCT 3 - /* the maximum droppct we can handle (say it was configurable). */ -#define JB_HISTORY_DROPPCT_MAX 4 - /* the size of the buffer we use to keep the top and botton timestamps for dropping */ -#define JB_HISTORY_MAXBUF_SZ JB_HISTORY_SZ * JB_HISTORY_DROPPCT_MAX / 100 - /* amount of additional jitterbuffer adjustment */ -#define JB_TARGET_EXTRA 40 - /* ms between growing and shrinking; may not be honored if jitterbuffer runs out of space */ -#define JB_ADJUST_DELAY 40 - -enum jb_return_code { - /* return codes */ - JB_OK, /* 0 */ - JB_EMPTY, /* 1 */ - JB_NOFRAME, /* 2 */ - JB_INTERP, /* 3 */ - JB_DROP, /* 4 */ - JB_SCHED /* 5 */ -}; - -enum jb_frame_type { -/* frame types */ - JB_TYPE_CONTROL, /* 0 */ - JB_TYPE_VOICE, /* 1 */ - JB_TYPE_VIDEO, /* 2 - reserved */ - JB_TYPE_SILENCE /* 3 */ -}; - -typedef struct jb_conf { - /* settings */ - long max_jitterbuf; /**< defines a hard clamp to use in setting the jitter buffer delay */ - long resync_threshold; /**< the jb will resync when delay increases to (2 * jitter) + this param */ - long max_contig_interp; /**< the max interp frames to return in a row */ - long target_extra; /**< amount of additional jitterbuffer adjustment, overrides JB_TARGET_EXTRA */ -} jb_conf; - -typedef struct jb_info { - jb_conf conf; - - /* statistics */ - long frames_in; /**< number of frames input to the jitterbuffer.*/ - long frames_out; /**< number of frames output from the jitterbuffer.*/ - long frames_late; /**< number of frames which were too late, and dropped.*/ - long frames_lost; /**< number of missing frames.*/ - long frames_dropped; /**< number of frames dropped (shrinkage) */ - long frames_ooo; /**< number of frames received out-of-order */ - long frames_cur; /**< number of frames presently in jb, awaiting delivery.*/ - long jitter; /**< jitter measured within current history interval*/ - long min; /**< minimum lateness within current history interval */ - long current; /**< the present jitterbuffer adjustment */ - long target; /**< the target jitterbuffer adjustment */ - long losspct; /**< recent lost frame percentage (* 1000) */ - long next_voice_ts; /**< the ts of the next frame to be read from the jb - in receiver's time */ - long last_voice_ms; /**< the duration of the last voice frame */ - long silence_begin_ts; /**< the time of the last CNG frame, when in silence */ - long last_adjustment; /**< the time of the last adjustment */ - long last_delay; /**< the last now added to history */ - long cnt_delay_discont; /**< the count of discontinuous delays */ - long resync_offset; /**< the amount to offset ts to support resyncs */ - long cnt_contig_interp; /**< the number of contiguous interp frames returned */ -} jb_info; - -typedef struct jb_frame { - void *data; /**< the frame data */ - long ts; /**< the relative delivery time expected */ - long ms; /**< the time covered by this frame, in sec/8000 */ - enum jb_frame_type type; /**< the type of frame */ - struct jb_frame *next, *prev; -} jb_frame; - -typedef struct jitterbuf { - jb_info info; - - /* history */ - long history[JB_HISTORY_SZ]; /**< history */ - int hist_ptr; /**< points to index in history for next entry */ - long hist_maxbuf[JB_HISTORY_MAXBUF_SZ]; /**< a sorted buffer of the max delays (highest first) */ - long hist_minbuf[JB_HISTORY_MAXBUF_SZ]; /**< a sorted buffer of the min delays (lowest first) */ - int hist_maxbuf_valid; /**< are the "maxbuf"/minbuf valid? */ - - jb_frame *frames; /**< queued frames */ - jb_frame *free; /**< free frames (avoid malloc?) */ -} jitterbuf; - - -/** new jitterbuf */ -jitterbuf * jb_new(void); - -/** destroy jitterbuf */ -void jb_destroy(jitterbuf *jb); - -/** reset jitterbuf */ -/* NOTE: The jitterbuffer should be empty before you call this, otherwise - * you will leak queued frames, and some internal structures */ -void jb_reset(jitterbuf *jb); - -/** queue a frame data=frame data, timings (in ms): ms=length of frame (for voice), ts=ts (sender's time) - * - * now=now (in receiver's time) return value is one of - * JB_OK: Frame added. Last call to jb_next() still valid - * JB_DROP: Drop this frame immediately - * JB_SCHED: Frame added. Call jb_next() to get a new time for the next frame - */ -enum jb_return_code jb_put(jitterbuf *jb, void *data, const enum jb_frame_type type, long ms, long ts, long now); - -/** get a frame for time now (receiver's time) return value is one of - * - * JB_OK: You've got frame! - * JB_DROP: Here's an audio frame you should just drop. Ask me again for this time.. - * JB_NOFRAME: There's no frame scheduled for this time. - * JB_INTERP: Please interpolate an interpl-length frame for this time (either we need to grow, or there was a lost frame) - * JB_EMPTY: The jb is empty. - */ -enum jb_return_code jb_get(jitterbuf *jb, jb_frame *frame, long now, long interpl); - -/** unconditionally get frames from jitterbuf until empty */ -enum jb_return_code jb_getall(jitterbuf *jb, jb_frame *frameout); - -/* when is the next frame due out, in receiver's time (0=EMPTY) - * This value may change as frames are added (esp non-audio frames) */ -long jb_next(jitterbuf *jb); - -/* get jitterbuf info: only "statistics" may be valid */ -enum jb_return_code jb_getinfo(jitterbuf *jb, jb_info *stats); - -/* set jitterbuf conf */ -enum jb_return_code jb_setconf(jitterbuf *jb, jb_conf *conf); - -typedef void (*jb_output_function_t)(const char *fmt, ...); -extern void jb_setoutput(jb_output_function_t err, jb_output_function_t warn, jb_output_function_t dbg); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/libs/libiax2/src/md5.c b/libs/libiax2/src/md5.c deleted file mode 100644 index 401216ee27167b9e048cdcaa7831e65aed7bb303..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/md5.c +++ /dev/null @@ -1,285 +0,0 @@ -/* MD5 checksum routines used for authentication. Not covered by GPL, but - in the public domain as per the copyright below */ - -#ifdef FREEBSD -# include <machine/endian.h> -#elif defined(LINUX) -# include <endian.h> -# include <features.h> -# include <sys/types.h> -#elif defined(SOLARIS) - /* each solaris is different -- this won't work on 2.6 or 2.7 */ -# include <sys/isa_defs.h> /* Defines either _LITTLE_ENDIAN or _BIG_ENDIAN */ -# define __BIG_ENDIAN 4321 -# define __LITTLE_ENDIAN 1234 -# define BIG_ENDIAN 4321 -# define LITTLE_ENDIAN 1234 -# ifdef _LITTLE_ENDIAN -# define __BYTE_ORDER __LITTLE_ENDIAN -# define BYTE_ORDER LITTLE_ENDIAN -# else -# define __BYTE_ORDER __BIG_ENDIAN -# define BYTE_ORDER BIG_ENDIAN -# endif -#endif - -#if __BYTE_ORDER == __BIG_ENDIAN || BYTE_ORDER == BIG_ENDIAN -# define HIGHFIRST 1 -#elif __BYTE_ORDER == __LITTLE_ENDIAN || BYTE_ORDER == LITLE_ENDIAN -# undef HIGHFIRST -#else -# error "Please fix <bits/endian.h>" -#endif - -/* - * This code implements the MD5 message-digest algorithm. - * The algorithm is due to Ron Rivest. This code was - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ -#include <string.h> /* for memcpy() */ -#include "md5.h" - -#ifndef HIGHFIRST -#define byteReverse(buf, len) /* Nothing */ -#else -void byteReverse(uint8_t *buf, unsigned int longs); - -#ifndef ASM_MD5 -/* - * Note: this code is harmless on little-endian machines. - */ -void byteReverse(uint8_t *buf, unsigned int longs) -{ - uint32_t t; - do { - t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 | - ((unsigned) buf[1] << 8 | buf[0]); - *(uint32_t *) buf = t; - buf += 4; - } while (--longs); -} -#endif -#endif - -/* - * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - * initialization constants. - */ -void MD5Init(struct MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - * Update context to reflect the concatenation of another buffer full - * of bytes. - */ -void MD5Update(struct MD5Context *ctx, uint8_t const *buf, unsigned int len) -{ - uint32_t t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if (t) { - uint8_t *p = (uint8_t *) ctx->in + t; - - t = 64 - t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - buf += t; - len -= t; - } - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void MD5Final(uint8_t digest[16], struct MD5Context *ctx) -{ - unsigned int count; - uint8_t *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } - byteReverse(ctx->in, 14); - - /* Append length in bits and transform */ - ((uint32_t *) ctx->in)[14] = ctx->bits[0]; - ((uint32_t *) ctx->in)[15] = ctx->bits[1]; - - MD5Transform(ctx->buf, (uint32_t *) ctx->in); - byteReverse((uint8_t *) ctx->buf, 4); - memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -} - -#ifndef ASM_MD5 - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -void MD5Transform(uint32_t buf[4], uint32_t const in[16]) -{ - uint32_t a, b, c, d; - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} - -#endif diff --git a/libs/libiax2/src/md5.h b/libs/libiax2/src/md5.h deleted file mode 100644 index 81c9e30613b890f34e38663f9cc536dfa7cb4b0a..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/md5.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef MD5_H -#define MD5_H - -#ifndef _MSC_VER -#include <inttypes.h> -#else -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -#endif - -struct MD5Context { - uint32_t buf[4]; - uint32_t bits[2]; - uint8_t in[64]; -}; - -void MD5Init(struct MD5Context *context); -void MD5Update(struct MD5Context *context, uint8_t const *buf, unsigned int len); -void MD5Final(uint8_t digest[16], struct MD5Context *context); -void MD5Transform(uint32_t buf[4], uint32_t const in[16]); - -/* - * This is needed to make RSAREF happy on some MS-DOS compilers. - */ -typedef struct MD5Context MD5_CTX; - -#endif /* !MD5_H */ diff --git a/libs/libiax2/src/miniphone.c b/libs/libiax2/src/miniphone.c deleted file mode 100644 index ab0dd8463c7504246be307919724db1959fea4a9..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/miniphone.c +++ /dev/null @@ -1,776 +0,0 @@ -/* - * Miniphone: A simple, command line telephone - * - * IAX Support for talking to Asterisk and other Gnophone clients - * - * Copyright (C) 1999, Linux Support Services, Inc. - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU General Public License - */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <fcntl.h> -#include <stdio.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <iax-client.h> -#include <linux/soundcard.h> -#include <errno.h> -#include <sys/time.h> -#include <sys/signal.h> -#include <sys/time.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <gsm.h> -#include <miniphone.h> -#include <time.h> - -#include "busy.h" -#include "dialtone.h" -#include "answer.h" -#include "ringtone.h" -#include "ring10.h" -#include "options.h" - -#define FRAME_SIZE 160 - -static char callerid[80]; - -struct peer { - int time; - gsm gsmin; - gsm gsmout; - - struct iax_session *session; - struct peer *next; -}; - -static char *audiodev = "/dev/dsp"; -static int audiofd = -1; -static struct peer *peers; -static int answered_call = 0; - -static struct peer *find_peer(struct iax_session *); -static int audio_setup(char *); -static void sighandler(int); -static void parse_args(FILE *, unsigned char *); -void do_iax_event(FILE *); -void call(FILE *, char *); -void answer_call(void); -void reject_call(void); -static void handle_event(FILE *, struct iax_event *e, struct peer *p); -void parse_cmd(FILE *, int, char **); -void issue_prompt(FILE *); -void dump_array(FILE *, char **); - -struct sound { - short *data; - int datalen; - int samplen; - int silencelen; - int repeat; -}; - -static int cursound = -1; - -static int sampsent = 0; -static int offset = 0; -static int silencelen = 0; -static int nosound = 0; - -static int offhook = 0; -static int ringing = 0; - -static int writeonly = 0; - -static struct iax_session *registry = NULL; -static struct timeval regtime; - -#define TONE_NONE -1 -#define TONE_RINGTONE 0 -#define TONE_BUSY 1 -#define TONE_CONGEST 2 -#define TONE_RINGER 3 -#define TONE_ANSWER 4 -#define TONE_DIALTONE 5 - -#define OUTPUT_NONE 0 -#define OUTPUT_SPEAKER 1 -#define OUTPUT_HANDSET 2 -#define OUTPUT_BOTH 3 - -static struct sound sounds[] = { - { ringtone, sizeof(ringtone)/2, 16000, 32000, 1 }, - { busy, sizeof(busy)/2, 4000, 4000, 1 }, - { busy, sizeof(busy)/2, 2000, 2000, 1 }, - { ring10, sizeof(ring10)/2, 16000, 32000, 1 }, - { answer, sizeof(answer)/2, 2200, 0, 0 }, - { dialtone, sizeof(dialtone)/2, 8000, 0, 1 }, -}; - -static char *help[] = { -"Welcome to the miniphone telephony client, the commands are as follows:\n", -"Help\t\t-\tDisplays this screen.", -"Help <Command>\t-\tInqueries specific information on a command.", -"Dial <Number>\t-\tDials the number supplied in the first arguement", -"Status\t\t-\tLists the current sessions and their current status.", -"Quit\t\t-\tShuts down the client.", -"", -0 -}; - -static short silence[FRAME_SIZE]; - -static struct peer *most_recent_answer; -static struct iax_session *newcall = 0; - -static struct peer *find_peer(struct iax_session *session) -{ - struct peer *cur = peers; - while(cur) { - if (cur->session == session) - return cur; - cur = cur->next; - } - return NULL; -} - -static int audio_setup(char *dev) -{ - int fd; - int fmt = AFMT_S16_LE; - int channels = 1; - int speed = 8000; - int fragsize = (40 << 16) | 6; - if ( (fd = open(dev, O_RDWR | O_NONBLOCK)) < 0) { - fprintf(stderr, "Unable to open audio device %s: %s\n", dev, strerror(errno)); - return -1; - } - if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) || (fmt != AFMT_S16_LE)) { - fprintf(stderr, "Unable to set in signed linear format.\n"); - return -1; - } - if (ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0)) { - fprintf(stderr, "Unable to set full duplex operation.\n"); - writeonly = 1; - /* return -1; */ - } - if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) || (channels != 1)) { - fprintf(stderr, "Unable to set to mono\n"); - return -1; - } - if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) || (speed != 8000)) { - fprintf(stderr, "Unable to set speed to 8000 hz\n"); - return -1; - } - if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &fragsize)) { - fprintf(stderr, "Unable to set fragment size...\n"); - return -1; - } - - return fd; -} - -static int send_sound(int soundfd) -{ - /* Send FRAME_SIZE samples of whatever */ - short myframe[FRAME_SIZE]; - short *frame = NULL; - int total = FRAME_SIZE; - int amt=0; - int res; - int myoff; - audio_buf_info abi; - if (cursound > -1) { - res = ioctl(soundfd, SNDCTL_DSP_GETOSPACE ,&abi); - if (res) { - fprintf(stderr,"Unable to read output space\n"); - return -1; - } - /* Calculate how many samples we can send, max */ - if (total > (abi.fragments * abi.fragsize / 2)) - total = abi.fragments * abi.fragsize / 2; - res = total; - if (sampsent < sounds[cursound].samplen) { - myoff=0; - while(total) { - amt = total; - if (amt > (sounds[cursound].datalen - offset)) - amt = sounds[cursound].datalen - offset; - memcpy(myframe + myoff, sounds[cursound].data + offset, amt * 2); - total -= amt; - offset += amt; - sampsent += amt; - myoff += amt; - if (offset >= sounds[cursound].datalen) - offset = 0; - } - /* Set it up for silence */ - if (sampsent >= sounds[cursound].samplen) - silencelen = sounds[cursound].silencelen; - frame = myframe; - } else { - if (silencelen > 0) { - frame = silence; - silencelen -= res; - } else { - if (sounds[cursound].repeat) { - /* Start over */ - sampsent = 0; - offset = 0; - } else { - cursound = -1; - nosound = 0; - } - } - } -#if 0 - if (frame) - printf("res is %d, frame[0] is %d\n", res, frame[0]); -#endif - res = write(soundfd, frame, res * 2); - if (res > 0) - return 0; - return res; - } - return 0; -} - -static int iax_regtimeout(int timeout) -{ - if (timeout) { - gettimeofday(®time, NULL); - regtime.tv_sec += timeout; - } else { - regtime.tv_usec = 0; - regtime.tv_sec = 0; - } - return 0; -} - -static int check_iax_register(void) -{ - int res; - if (strlen(regpeer) && strlen(server)) { - registry = iax_session_new(); - - res = iax_register(registry, server,regpeer,regsecret, refresh); - - if (res) { - fprintf(stderr, "Failed registration: %s\n", iax_errstr); - return -1; - } - iax_regtimeout(5 * refresh / 6); - } else { - iax_regtimeout(0); - refresh = 60; - } - return 0; -} - -static int check_iax_timeout(void) -{ - struct timeval tv; - int ms; - if (!regtime.tv_usec || !regtime.tv_sec) - return -1; - gettimeofday(&tv, NULL); - if ((tv.tv_usec >= regtime.tv_usec) && (tv.tv_sec >= regtime.tv_sec)) { - check_iax_register(); - /* Have it check again soon */ - return 100; - } - ms = (regtime.tv_sec - tv.tv_sec) * 1000 + (regtime.tv_usec - tv.tv_usec) / 1000; - return ms; -} - -static int gentone(int sound, int uninterruptible) -{ - cursound = sound; - sampsent = 0; - offset = 0; - silencelen = 0; - nosound = uninterruptible; - printf("Sending tone %d\n", sound); - return 0; -} - -void -sighandler(int sig) -{ - if(sig == SIGHUP) { - puts("rehashing!"); - } else if(sig == SIGINT) { - static int prev = 0; - int cur; - - if ( (cur = time(0))-prev <= 5) { - printf("Terminating!\n"); - exit(0); - } else { - prev = cur; - printf("Press interrupt key again in the next %d seconds to really terminate\n", 5-(cur-prev)); - } - } -} - -void -parse_args(FILE *f, unsigned char *cmd) -{ - static char *argv[MAXARGS]; - unsigned char *parse = cmd; - int argc = 0, t = 0; - - // Don't mess with anything that doesn't exist... - if(!*parse) - return; - - bzero(argv, sizeof(argv)); - while(*parse) { - if(*parse < 33 || *parse > 128) { - *parse = 0, t++; - if(t > MAXARG) { - fprintf(f, "Warning: Argument exceeds maximum argument size, command ignored!\n"); - return; - } - } else if(t || !argc) { - if(argc == MAXARGS) { - fprintf(f, "Warning: Command ignored, too many arguments\n"); - return; - } - argv[argc++] = parse; - t = 0; - } - - parse++; - } - - if(argc) - parse_cmd(f, argc, argv); -} - -int -main(int argc, char *argv[]) -{ - int port; - int netfd; - int c, h=0, m, regm; - FILE *f; - int fd = STDIN_FILENO; - char rcmd[RBUFSIZE]; - fd_set readfd; - fd_set writefd; - struct timeval timer; - struct timeval *timerptr = NULL; - gsm_frame fo; - - load_options(); - - if (!strlen(callerid)) - gethostname(callerid, sizeof(callerid)); - - signal(SIGHUP, sighandler); - signal(SIGINT, sighandler); - - if ( !(f = fdopen(fd, "w+"))) { - fprintf(stderr, "Unable to create file on fd %d\n", fd); - return -1; - } - - if ( (audiofd = audio_setup(audiodev)) == -1) { - fprintf(stderr, "Fatal error: failed to open sound device"); - return -1; - } - - if ( (port = iax_init(0) < 0)) { - fprintf(stderr, "Fatal error: failed to initialize iax with port %d\n", port); - return -1; - } - - iax_set_formats(AST_FORMAT_GSM); - netfd = iax_get_fd(); - - check_iax_register(); - - fprintf(f, "Text Based Telephony Client.\n\n"); - issue_prompt(f); - - timer.tv_sec = 0; - timer.tv_usec = 0; - - while(1) { - FD_ZERO(&readfd); - FD_ZERO(&writefd); - FD_SET(fd, &readfd); - if(fd > h) - h = fd; - if(answered_call && !writeonly) { - FD_SET(audiofd, &readfd); - if(audiofd > h) - h = audiofd; - } - if (cursound > -1) { - FD_SET(audiofd, &writefd); - if (audiofd > h) - h = audiofd; - } - FD_SET(netfd, &readfd); - if(netfd > h) - h = netfd; - - if ( (c = select(h+1, &readfd, &writefd, 0, timerptr)) >= 0) { - if(FD_ISSET(fd, &readfd)) { - if ( ( fgets(&*rcmd, 256, f))) { - rcmd[strlen(rcmd)-1] = 0; - parse_args(f, &*rcmd); - } else fprintf(f, "Fatal error: failed to read data!\n"); - - issue_prompt(f); - } - if(answered_call) { - if(FD_ISSET(audiofd, &readfd)) { - static int ret, rlen = 0; - static short rbuf[FRAME_SIZE]; - - if ( (ret = read(audiofd, rbuf + rlen, 2 * (FRAME_SIZE-rlen))) == -1) { - puts("Failed to read audio."); - return -1; - } - rlen += ret/2; - if(rlen == FRAME_SIZE) { - rlen = 0; - - if(!most_recent_answer->gsmout) - most_recent_answer->gsmout = gsm_create(); - - gsm_encode(most_recent_answer->gsmout, rbuf, fo); - if(iax_send_voice(most_recent_answer->session, - AST_FORMAT_GSM, (char *)fo, sizeof(fo)) == -1) - puts("Failed to send voice!"); - } - } - } - do_iax_event(f); - m = iax_time_to_next_event(); - if(m > -1) { - timerptr = &timer; - timer.tv_sec = m /1000; - timer.tv_usec = (m % 1000) * 1000; - } else - timerptr = 0; - regm = check_iax_timeout(); - if (!timerptr || (m > regm)) { - timerptr = &timer; - timer.tv_sec = regm /1000; - timer.tv_usec = (regm % 1000) * 1000; - } - if (FD_ISSET(audiofd, &writefd)) { - send_sound(audiofd); - } - } else { - if(errno == EINTR) - continue; - fprintf(stderr, "Fatal error in select(): %s\n", strerror(errno)); - return -1; - } - } - return 0; -} - -void -do_iax_event(FILE *f) { - int sessions = 0; - struct iax_event *e = 0; - struct peer *peer; - - while ( (e = iax_get_event(0))) { - peer = find_peer(e->session); - if(peer) { - handle_event(f, e, peer); - } else if (e->session == registry) { - fprintf(stderr, "Registration complete: %s (%d)\n", - (e->event.regreply.status == IAX_REG_SUCCESS) ? "Success" : "Failed", - e->event.regreply.status); - registry = NULL; - } else { - if(e->etype != IAX_EVENT_CONNECT) { - fprintf(stderr, "Huh? This is an event for a non-existant session?\n"); - continue; - } - sessions++; - - if(sessions >= MAX_SESSIONS) { - fprintf(f, "Missed a call... too many sessions open.\n"); - } - - - if(e->event.connect.callerid && e->event.connect.dnid) - fprintf(f, "Call from '%s' for '%s'", e->event.connect.callerid, - e->event.connect.dnid); - else if(e->event.connect.dnid) { - fprintf(f, "Call from '%s'", e->event.connect.dnid); - } else if(e->event.connect.callerid) { - fprintf(f, "Call from '%s'", e->event.connect.callerid); - } else printf("Call from"); - fprintf(f, " (%s)\n", inet_ntoa(iax_get_peer_addr(e->session).sin_addr)); - - if(most_recent_answer) { - fprintf(f, "Incoming call ignored, there's already a call waiting for answer... \ -please accept or reject first\n"); - iax_reject(e->session, "Too many calls, we're busy!"); - } else { - if ( !(peer = malloc(sizeof(struct peer)))) { - fprintf(f, "Warning: Unable to allocate memory!\n"); - return; - } - - peer->time = time(0); - peer->session = e->session; - if (peer->gsmin) - free(peer->gsmin); - peer->gsmin = 0; - if (peer->gsmout) - free(peer->gsmout); - peer->gsmout = 0; - - peer->next = peers; - peers = peer; - - iax_accept(peer->session); - iax_ring_announce(peer->session); - most_recent_answer = peer; - ringing = 1; - gentone(TONE_RINGER, 0); - fprintf(f, "Incoming call!\n"); - } - issue_prompt(f); - } - iax_event_free(e); - } -} - -void -call(FILE *f, char *num) -{ - struct peer *peer; - - if(!newcall) - newcall = iax_session_new(); - else { - fprintf(f, "Already attempting to call somewhere, please cancel first!\n"); - return; - } - - if ( !(peer = malloc(sizeof(struct peer)))) { - fprintf(f, "Warning: Unable to allocate memory!\n"); - return; - } - - peer->time = time(0); - peer->session = newcall; - peer->gsmin = 0; - peer->gsmout = 0; - - peer->next = peers; - peers = peer; - - most_recent_answer = peer; - - offhook = 1; - - iax_call(peer->session, callerid, num, NULL, 10); -} - -void -answer_call(void) -{ - if(most_recent_answer) - iax_answer(most_recent_answer->session); - printf("Answering call!\n"); - answered_call = 1; - offhook = 1; - ringing = 0; - gentone(TONE_ANSWER, 1); -} - -void -reject_call(void) -{ - iax_reject(most_recent_answer->session, "Call rejected manually."); - most_recent_answer = 0; - ringing = 0; - gentone(TONE_NONE, 1); -} - -void -handle_event(FILE *f, struct iax_event *e, struct peer *p) -{ - short fr[FRAME_SIZE]; - int len; - - switch(e->etype) { - case IAX_EVENT_HANGUP: - iax_hangup(most_recent_answer->session, "Byeee!"); - fprintf(f, "Call disconnected by peer\n"); - free(most_recent_answer); - most_recent_answer = 0; - answered_call = 0; - peers = 0; - newcall = 0; - if (offhook) - gentone(TONE_CONGEST, 0); - break; - - case IAX_EVENT_REJECT: - fprintf(f, "Authentication was rejected\n"); - break; - case IAX_EVENT_ACCEPT: - fprintf(f, "Accepted...\n"); - issue_prompt(f); - break; - case IAX_EVENT_RINGA: - fprintf(f, "Ringing...\n"); - issue_prompt(f); - gentone(TONE_RINGTONE, 0); - break; - case IAX_EVENT_ANSWER: - answer_call(); - gentone(TONE_ANSWER, 1); - break; - case IAX_EVENT_VOICE: - switch(e->event.voice.format) { - case AST_FORMAT_GSM: - if(e->event.voice.datalen % 33) { - fprintf(stderr, "Weird gsm frame, not a multiple of 33.\n"); - break; - } - - if (!p->gsmin) - p->gsmin = gsm_create(); - - len = 0; - while(len < e->event.voice.datalen) { - if(gsm_decode(p->gsmin, e->event.voice.data + len, fr)) { - fprintf(stderr, "Bad GSM data\n"); - break; - } else { - int res; - - res = write(audiofd, fr, sizeof(fr)); - if (res < 0) - fprintf(f, "Write failed: %s\n", strerror(errno)); - } - len += 33; - } - break; - default : - fprintf(f, "Don't know how to handle that format %d\n", e->event.voice.format); - } - break; - default: - fprintf(f, "Unknown event: %d\n", e->etype); - } -} - -void -dump_call(void) -{ - if(most_recent_answer) - { - printf("Dumping call!\n"); - iax_hangup(most_recent_answer->session,""); - free(most_recent_answer); - } - answered_call = 0; - most_recent_answer = 0; - answered_call = 0; - peers = 0; - newcall = 0; - offhook = 0; - ringing = 0; - gentone(TONE_NONE, 0); -} - -void -parse_cmd(FILE *f, int argc, char **argv) -{ - if(!strcasecmp(argv[0], "HELP")) { - if(argc == 1) - dump_array(f, help); - else if(argc == 2) { - if(!strcasecmp(argv[1], "HELP")) - fprintf(f, "Help <Command>\t-\tDisplays general help or specific help on command if supplied an arguement\n"); - else if(!strcasecmp(argv[1], "QUIT")) - fprintf(f, "Quit\t\t-\tShuts down the miniphone\n"); - else fprintf(f, "No help available on %s\n", argv[1]); - } else { - fprintf(f, "Too many arguements for command help.\n"); - } - } else if(!strcasecmp(argv[0], "STATUS")) { - if(argc == 1) { - int c = 0; - struct peer *peerptr = peers; - - if(!peerptr) - fprintf(f, "No session matches found.\n"); - else while(peerptr) { - fprintf(f, "Listing sessions:\n\n"); - fprintf(f, "Session %d\n", ++c); - fprintf(f, "Session existed for %d seconds\n", (int)time(0)-peerptr->time); - if(answered_call) - fprintf(f, "Call answered.\n"); - else fprintf(f, "Call ringing.\n"); - - peerptr = peerptr->next; - } - } else fprintf(f, "Too many arguments for command status.\n"); - } else if(!strcasecmp(argv[0], "ANSWER")) { - if(argc > 1) - fprintf(f, "Too many arguements for command answer\n"); - else answer_call(); - } else if(!strcasecmp(argv[0], "REJECT")) { - if(argc > 1) - fprintf(f, "Too many arguements for command reject\n"); - else { - fprintf(f, "Rejecting current phone call.\n"); - reject_call(); - } - } else if (!strcasecmp(argv[0], "DUMP")) { - dump_call(); - } else if (!strcasecmp(argv[0], "HANGUP")) { - dump_call(); - } else if(!strcasecmp(argv[0], "CALL")) { - if(argc > 2) - fprintf(f, "Too many arguements for command call\n"); - else { - call(f, argv[1]); - } - } else if(!strcasecmp(argv[0], "QUIT")) { - if(argc > 1) - fprintf(f, "Too many arguements for command quit\n"); - else { - fprintf(f, "Good bye!\n"); - exit(1); - } - } else fprintf(f, "Unknown command of %s\n", argv[0]); -} - -void -issue_prompt(FILE *f) -{ - fprintf(f, "TeleClient> "); - fflush(f); -} - -void -dump_array(FILE *f, char **array) { - while(*array) - fprintf(f, "%s\n", *array++); -} diff --git a/libs/libiax2/src/miniphone.h b/libs/libiax2/src/miniphone.h deleted file mode 100644 index 6e3677a3cf4d0e4719e447e5e984c5db2e924264..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/miniphone.h +++ /dev/null @@ -1,6 +0,0 @@ -#define RBUFSIZE 256 -#define MAXARGS 10 -#define MAXARG 256 -#define MAX_SESSIONS 4 - -extern void parse_cmd(FILE *, int, char **); diff --git a/libs/libiax2/src/options.c b/libs/libiax2/src/options.c deleted file mode 100644 index a01e3f88141fcdc2ed71e5c460d8b7da606368b3..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/options.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Snomphone: IAX software for SNOM 100 Phone - * - * IAX Support for talking to Asterisk and other Gnophone clients - * - * Copyright (C) 1999, Linux Support Services, Inc. - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU General Public License - */ - -#define CONFIG_FILE "/etc/miniphone.conf" -#define USER_FILE "%s/.miniphone-conf" - -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> - -char regpeer[256]; -char regsecret[256]; -char server[256]; -int refresh = 60; -char context[256]; -char language[256]; - -#define TYPE_STRING 0 -#define TYPE_INT 1 - -struct opt { - char *name; - void *where; - int len; - int type; -}; - -static struct opt opts[] = { - { "regpeer", regpeer, sizeof(regpeer), TYPE_STRING }, - { "regsecret", regsecret, sizeof(regsecret), TYPE_STRING }, - { "server", server, sizeof(server), TYPE_STRING }, - { "context", context, sizeof(context), TYPE_STRING }, - { "language", language, sizeof(language), TYPE_STRING }, - { "refresh", &refresh, sizeof(refresh), TYPE_INT }, -}; - -static int __load_options(char *filename) -{ - FILE *f; - int lineno = 0; - char buf[256]; - char *var, *value; - int x; - char *c; - f = fopen(filename, "r"); - if (!f) { - fprintf(stderr, "Failed to open '%s': %s\n", filename, strerror(errno)); - return -1; - } - while(!feof(f)) { - fgets(buf, sizeof(buf), f); - if (!feof(f)) { - /* Ditch comments */ - if ((c = strchr(buf, '#'))) - *c = 0; - lineno++; - /* Strip CR */ - buf[strlen(buf)-1] = '\0'; - if (strlen(buf)) { - var = strtok(buf, "="); - value = strtok(NULL, "="); - if (!var || !value) { - fprintf(stderr, "Syntax error line %d\n", lineno); - continue; - } - for (x=0;x<sizeof(opts) / sizeof(opts[0]); x++) { - if (!strcasecmp(var, opts[x].name)) { - switch(opts[x].type) { - case TYPE_STRING: - strncpy((char *)opts[x].where, value, opts[x].len); - break; - case TYPE_INT: - if (sscanf(value, "%i", (int *)opts[x].where) != 1) { - fprintf(stderr, "Not a number at line %d\n", lineno); - } - break; - default: - fprintf(stderr, "Don't know what to do about type %d\n", opts[x].type); - } - break; - } - } - if (!(x < sizeof(opts) / sizeof(opts[0]))) { - fprintf(stderr, "Dunno keyword '%s'\n", var); - continue; - } - } - } - } - fclose(f); - return 0; -} - -int load_options(void) -{ - char fn[256]; - __load_options(CONFIG_FILE); - if (getenv("HOME")) { - snprintf(fn, sizeof(fn), USER_FILE, getenv("HOME")); - __load_options(fn); - } - return 0; -} - -static int __save_options(char *filename) -{ - FILE *f; - f = fopen(filename, "w"); - if (!f) { - fprintf(stderr, "Failed to open '%s': %s\n", filename, strerror(errno)); - return -1; - } - fclose(f); - return 0; -} - -int save_options(void) -{ - char fn[256]; - if (getenv("HOME")) { - snprintf(fn, sizeof(fn), USER_FILE, getenv("HOME")); - return __save_options(fn); - } else - return __save_options(CONFIG_FILE); - -} diff --git a/libs/libiax2/src/options.h b/libs/libiax2/src/options.h deleted file mode 100644 index b9f791d479793524805b083bb8333dd9ee931a4e..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/options.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Snomphone: IAX software for SNOM 100 Phone - * - * IAX Support for talking to Asterisk and other Gnophone clients - * - * Copyright (C) 1999, Linux Support Services, Inc. - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU General Public License - */ - -extern char regpeer[256]; -extern char regsecret[256]; -extern char regpeer[256]; -extern char server[256]; -extern int refresh; -extern char context[256]; -extern char language[256]; - -int save_options(void); -int load_options(void); diff --git a/libs/libiax2/src/ring10.h b/libs/libiax2/src/ring10.h deleted file mode 100644 index 13fce373e7418f204f61893394f9e87ee0666141..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/ring10.h +++ /dev/null @@ -1,1752 +0,0 @@ -/* - * Signed 16-bit audio data - * - * Source: /home/markster/ring10.raw - * - * Copyright (C) 1999, Mark Spencer and Linux Support Services - * - * Distributed under the terms of the GNU General Public License - * - */ - -static signed short ring10[] = { -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 0x82a0, 0x8dc7, 0x607e, 0xc0c6, 0x2bd3, -0x8df5, 0x828d, 0x0716, 0xaca6, 0xcefe, 0x41df, 0xd185, 0x8aa3, 0x8b1a, 0x789b, -0x82a2, 0x804f, 0x7ea8, 0x8113, 0x7f7d, 0x7fff, 0x801e, 0x801d, 0x7f32, 0x82ec, -0x83e1, 0x7fb0, 0x7f71, 0x80de, 0x7f3d, 0x7fe3, 0x81b4, 0x7c37, 0x8553, 0x7b29, -0x7ede, 0xde6e, 0x0e64, 0xf9f4, 0x015e, 0x00f6, 0xfe56, 0x0019, 0xf8bb, 0xfd90, -0x08cc, 0x05ab, 0xfd0b, 0xf9c6, 0xf875, 0xf789, 0xfc74, 0x032e, 0xf97a, 0xf4bb, -0x0212, 0x006e, 0x03df, 0x17c5, 0x0f50, 0xfb23, 0xfdbd, 0xf7cf, 0xdf5b, 0xe2d3, -0xf111, 0xef27, 0x11c5, 0x33a4, 0x168d, 0x0145, 0x0494, 0xe85c, 0xdac3, 0xf0c7, -0xeea8, 0x0023, 0x3036, 0x252a, 0xffb7, 0x01d1, 0xf637, 0xd506, 0xe8eb, 0xf5ff, -0xe5ca, 0x1ec5, 0x3fa4, 0x0e3c, 0x1570, 0x2b37, 0xea23, 0xca43, 0xf392, 0xdf0e, -0xde40, 0x2e7c, 0x276f, 0x035c, 0x2ccc, 0x1acf, 0xcf4a, 0xeb5b, 0x0fb1, 0xe01a, -0x0c69, 0x3a97, 0xfb54, 0x0751, 0x20f1, 0xdce9, 0xd2a2, 0x19b3, 0x096f, 0xf1b6, -0x38de, 0x1f70, 0xf32b, 0x2569, 0x0650, 0xc3d7, 0xf1ad, 0x1aa5, 0xe87e, 0x0c7f, -0x406d, 0xffaa, 0x0ba8, 0x2e02, 0xe545, 0xcebb, 0x10fc, 0x0102, 0xded8, 0x2b7c, -0x2053, 0xec6f, 0x266e, 0x1770, 0xcb63, 0xf18e, 0x2015, 0xe6ef, 0xfe64, 0x3700, -0xf628, 0xfb00, 0x2e43, 0xee48, 0xcd4a, 0x1867, 0x0ec3, 0xdd77, 0x2291, 0x1c80, -0xe325, 0x19b7, 0x1719, 0xcb88, 0xeded, 0x258c, 0xe7e8, 0xf0c6, 0x2d21, 0xf3d5, -0xf494, 0x290d, 0xef7b, 0xca28, 0x12c8, 0x0d8d, 0xd5f3, 0x171d, 0x1994, 0xe0c0, -0x1348, 0x1929, 0xcf9b, 0xe6fb, 0x20ae, 0xe921, 0xed2b, 0x2c54, 0xf96e, 0xf19f, -0x21b6, 0xf12e, 0xc8b4, 0x0907, 0x0964, 0xd049, 0x0eb8, 0x1fa6, 0xe6b5, 0x0cec, -0x16b6, 0xcd0c, 0xda57, 0x17c9, 0xe440, 0xe2a2, 0x2b4d, 0xffa2, 0xec7e, 0x1ee9, -0xf674, 0xbfcb, 0xf769, 0x0402, 0xcfe8, 0x104b, 0x2734, 0xe7e9, 0x07d9, 0x19f4, -0xd032, 0xd00b, 0x0e46, 0xe17d, 0xe2d8, 0x3456, 0x0781, 0xed01, 0x238d, 0xfa72, -0xbb51, 0xf543, 0x050b, 0xccd5, 0x1491, 0x3358, 0xedad, 0x10c4, 0x283b, 0xd051, -0xc9e9, 0x11f8, 0xe2cb, 0xe534, 0x43aa, 0x1090, 0xf11b, 0x3267, 0x02c3, 0xb72d, -0xf9ac, 0x0fbd, 0xce45, 0x1d7b, 0x4389, 0xef2e, 0x1593, 0x348e, 0xd0cb, 0xca8c, -0x1f61, 0xe981, 0xdef7, 0x4774, 0x15ae, 0xefab, 0x3b28, 0x0a9e, 0xb2f6, 0xf9e9, -0x1976, 0xcc08, 0x15ab, 0x4534, 0xee6c, 0x159b, 0x3753, 0xcf09, 0xc69a, 0x2270, -0xf15c, 0xdee6, 0x48ce, 0x1af4, 0xf169, 0x3da0, 0x0d68, 0xb573, 0xff9e, 0x20ba, -0xcbfe, 0x142d, 0x4879, 0xed49, 0x1434, 0x3d96, 0xd714, 0xca99, 0x298b, 0xf708, -0xd92c, 0x4632, 0x1acc, 0xea6e, 0x3d2c, 0x1412, 0xb534, 0xfbfa, 0x24f9, 0xcd72, -0x0df9, 0x48f8, 0xeb87, 0x0bca, 0x3dd5, 0xd6cc, 0xc015, 0x2605, 0xfa87, 0xd1a9, -0x40d0, 0x1c59, 0xe0de, 0x34f9, 0x14c6, 0xaf61, 0xf2a5, 0x23e6, 0xc929, 0x01be, -0x4423, 0xe53b, 0x0182, 0x3c3a, 0xd758, 0xbb9d, 0x1fa9, 0xf454, 0xc611, 0x36e8, -0x18f7, 0xdac9, 0x2e8a, 0x126d, 0xac14, 0xead6, 0x2215, 0xc990, 0xf9f5, 0x43cb, -0xea01, 0xfcbf, 0x38fd, 0xd9f3, 0xb7cd, 0x1bc4, 0xfd41, 0xca56, 0x31e3, 0x1d4b, -0xdca2, 0x2a9f, 0x1c24, 0xb8aa, 0xeb59, 0x25d5, 0xd2d0, 0xfa10, 0x44fa, 0xefe0, -0xfced, 0x3ef4, 0xe9a1, 0xbdf0, 0x19ac, 0x0198, 0xca6f, 0x2f04, 0x25b6, 0xe187, -0x29ba, 0x250a, 0xbe42, 0xe40e, 0x24ef, 0xd75d, 0xf476, 0x44f8, 0xf719, 0xf7a1, -0x3c94, 0xf20e, 0xbcdf, 0x16a3, 0x07e8, 0xc8d4, 0x2a3e, 0x2b3f, 0xdf4e, 0x235d, -0x2c92, 0xc2c7, 0xdf39, 0x2873, 0xd790, 0xea2a, 0x47fd, 0xfd0e, 0xf0e3, 0x3bd8, -0xf4e9, 0xb265, 0x0c2c, 0x0751, 0xc302, 0x29bb, 0x37bd, 0xe138, 0x1e0c, 0x2d09, -0xbddb, 0xd246, 0x24c4, 0xd87a, 0xe5df, 0x4ff6, 0x08d6, 0xf0d8, 0x3d61, 0xf8bf, -0xaede, 0x0a36, 0x0df3, 0xc0f5, 0x23ec, 0x3e92, 0xe3d7, 0x1cad, 0x348e, 0xc0d6, -0xcd4e, 0x265c, 0xd9b6, 0xdf83, 0x510e, 0x0c41, 0xeece, 0x4153, 0xfeeb, 0xa9f6, -0x04b3, 0x12a4, 0xbf2f, 0x20d1, 0x42f4, 0xe1b1, 0x1b1e, 0x3980, 0xc2b4, 0xcb50, -0x2b74, 0xded0, 0xd835, 0x4e7a, 0x0b46, 0xe555, 0x4015, 0x0517, 0xaa54, 0x0504, -0x1932, 0xbc34, 0x1a77, 0x48b1, 0xe0bb, 0x149b, 0x3ba7, 0xc34a, 0xc481, 0x2bc2, -0xe401, 0xd20e, 0x4f53, 0x1389, 0xe3b7, 0x418b, 0x0a15, 0xa70d, 0x0024, 0x1f9f, -0xbf65, 0x142d, 0x4a81, 0xe0ca, 0x1152, 0x4325, 0xcb03, 0xc18a, 0x2b95, 0xeb45, -0xcf92, 0x4c54, 0x18ad, 0xe08b, 0x3f12, 0x1264, 0xa9fc, 0xfd97, 0x246f, 0xbf86, -0x0ce2, 0x4e7c, 0xe4f3, 0x0c20, 0x44e0, 0xd069, 0xbdcb, 0x2b8e, 0xf32d, 0xcad4, -0x464f, 0x1e76, 0xdf62, 0x3b07, 0x17ea, 0xaafb, 0xf5a0, 0x2835, 0xc7c2, 0x0842, -0x4d2b, 0xe634, 0x03ef, 0x42bc, 0xd7f2, 0xbb73, 0x2662, 0xf892, 0xc8b3, 0x3e30, -0x1f20, 0xdcca, 0x354a, 0x1c6b, 0xaf75, 0xf0f7, 0x2963, 0xc908, 0xfdbf, 0x4c3c, -0xebe5, 0x00e3, 0x44c4, 0xdf15, 0xb9e9, 0x243b, 0x00e9, 0xcb76, 0x3b53, 0x248e, -0xdc27, 0x2fcb, 0x22e5, 0xb66c, 0xec96, 0x2b19, 0xd0ef, 0xf97b, 0x48ae, 0xecc0, -0xf8b4, 0x411d, 0xe769, 0xb9f7, 0x1c41, 0x0022, 0xc369, 0x2ced, 0x23ac, 0xd8eb, -0x2522, 0x232a, 0xb611, 0xe19f, 0x2738, 0xd013, 0xece5, 0x434c, 0xf00e, 0xefcc, -0x3b79, 0xeb32, 0xb19c, 0x135e, 0x04ef, 0xc1b9, 0x27a8, 0x2992, 0xd7b3, 0x1ba5, -0x2481, 0xb8c5, 0xd97d, 0x246f, 0xd113, 0xe45d, 0x4486, 0xf7f7, 0xeb36, 0x395a, -0xf122, 0xaea5, 0x0c28, 0x05eb, 0xbde4, 0x2585, 0x36a2, 0xde67, 0x1b86, 0x2dac, -0xbd03, 0xd2b8, 0x2624, 0xd8b8, 0xe802, 0x521b, 0x0855, 0xefbc, 0x4048, 0xfad2, -0xafe2, 0x0fb1, 0x12b2, 0xc62c, 0x2c2a, 0x43f5, 0xe562, 0x1fcb, 0x3791, 0xc2ac, -0xd4d1, 0x2dfd, 0xde0a, 0xe53f, 0x5578, 0x0f49, 0xf2b6, 0x4609, 0x0105, 0xabf5, -0x09a8, 0x157e, 0xc286, 0x23e7, 0x425f, 0xe36a, 0x1d93, 0x3580, 0xbf80, 0xcaf2, -0x2a04, 0xf16e, 0xd92b, 0x0eaa, 0xf1a7, 0x1ddb, 0x5b52, 0x0665, 0xd2e3, 0x15f8, -0xf606, 0x9d42, 0xdba7, 0xf312, 0xd349, 0x21ed, 0x576a, 0x34e8, 0x2450, 0x2679, -0xdc01, 0xb506, 0xcb0f, 0xa454, 0xccf3, 0x2c13, 0x1673, 0xf8ca, 0x4ff1, 0x63ac, -0xec26, 0xd77c, 0xf1f9, 0xc268, 0xb11a, 0xdfe4, 0x02e7, 0x10f5, 0x3512, 0x19dd, -0x0edc, 0x3568, 0xf6f7, 0xbe10, 0xda93, 0xf4fe, 0xda03, 0xe293, 0x15dd, 0x15f3, -0x1ba5, 0x1521, 0x12e8, 0x23ab, 0x0fc3, 0xdb3e, 0xb671, 0xe960, 0xe13c, 0xc695, -0x1a81, 0x3d23, 0x1c56, 0x190d, 0x4234, 0x1970, 0xd784, 0xd86b, 0xb5e8, 0xc9f3, -0xeb89, 0xe344, 0x17ae, 0x5713, 0x37fc, 0xffe2, 0x36b3, 0x1dfe, 0xb963, 0xbf9c, -0xc9a1, 0xcc7b, 0xe409, 0x08a6, 0x2077, 0x3b4d, 0x3cba, 0x0553, 0x220e, 0x226e, -0xd219, 0xb7ec, 0xcb8b, 0xdf2a, 0xd0c7, 0xf5be, 0x2ff0, 0x42a6, 0x3c24, 0x25ae, -0x2d6d, 0x0d94, 0xde80, 0xb78b, 0xb12b, 0xdf7a, 0xde33, 0x0046, 0x47b1, 0x5170, -0x29c0, 0x2945, 0x3ab5, 0xf08f, 0xc806, 0xc229, 0xbbf4, 0xe40d, 0xf365, 0x0bfe, -0x448d, 0x5cd8, 0x1e52, 0x10ba, 0x3908, 0xefa4, 0xc243, 0xcf89, 0xd02d, 0xde92, -0xf8e0, 0x191e, 0x2f7b, 0x48e6, 0x1e38, 0x1074, 0x3785, 0xf8be, 0xbd1c, 0xc06b, -0xdc36, 0xdb97, 0xe3c0, 0x2042, 0x37c5, 0x36ff, 0x1b73, 0x2064, 0x2c9a, 0xefa2, -0xbf0c, 0xb7f0, 0xe221, 0xe243, 0xd998, 0x2263, 0x4bae, 0x3596, 0x18aa, 0x3763, -0x27d0, 0xdcc6, 0xcacc, 0xc06f, 0xd83d, 0xecfe, 0xeefa, 0x1ffa, 0x5052, 0x393f, -0x0af5, 0x3c9e, 0x316b, 0xd2df, 0xc575, 0xd3c8, 0xddd2, 0xdf98, 0xfbd7, 0x2929, -0x4879, 0x4052, 0x160c, 0x3708, 0x2b31, 0xdac6, 0xc0c3, 0xcfc0, 0xe71d, 0xddec, -0x0145, 0x3847, 0x457c, 0x356b, 0x214a, 0x3a5f, 0x1474, 0xd892, 0xc579, 0xc6a7, -0xe77a, 0xe4dc, 0x00ab, 0x3b89, 0x4eba, 0x290a, 0x16ea, 0x3dc6, 0x0956, 0xcc12, -0xc3bd, 0xc9e9, 0xe4be, 0xe60b, 0x0561, 0x3707, 0x4c82, 0x2444, 0x1406, 0x3a8e, -0xff5b, 0xc494, 0xbf9f, 0xcb26, 0xdfef, 0xe755, 0x1060, 0x334f, 0x40e5, 0x1f87, -0x16b9, 0x33e8, 0xfa6e, 0xc670, 0xb774, 0xcc17, 0xe18f, 0xdd0f, 0x102c, 0x3f0d, -0x4098, 0x1b95, 0x24b2, 0x315a, 0xe9d8, 0xc459, 0xb314, 0xc524, 0xe2a6, 0xe1cf, -0x100a, 0x44af, 0x455c, 0x1551, 0x264f, 0x2ab1, 0xd681, 0xb90c, 0xb4d6, 0xc68d, -0xddac, 0xef74, 0x1f57, 0x4357, 0x4192, 0x0e60, 0x1bcb, 0x20fd, 0xd477, 0xb435, -0xb3e3, 0xcdc3, 0xd9c4, 0xef97, 0x2384, 0x3b60, 0x34c9, 0x119d, 0x1f15, 0x0fb3, -0xd15d, 0xb30d, 0xa9e3, 0xd431, 0xdc02, 0xe98a, 0x2987, 0x4204, 0x290c, 0x1181, -0x2d0c, 0x0800, 0xcb55, 0xb8f5, 0xaaa6, 0xd49f, 0xe57c, 0xf063, 0x281c, 0x4c65, -0x2d19, 0x0cd2, 0x2ddb, 0xfefe, 0xc171, 0xbd4c, 0xb7c2, 0xd4c5, 0xe6f3, 0x0040, -0x2b86, 0x4b6d, 0x2ed1, 0x0ce3, 0x2d97, 0x01f9, 0xc2ad, 0xb8fc, 0xc53e, 0xe1cf, -0xea35, 0x0eb0, 0x38b8, 0x4a3b, 0x2a1e, 0x1457, 0x2a1e, 0xfbca, 0xcdf1, 0xbc93, -0xcc0b, 0xec27, 0xeb05, 0x144b, 0x4443, 0x496d, 0x2233, 0x2180, 0x30b2, 0xf03c, -0xcced, 0xbf0d, 0xcc55, 0xeec3, 0xf367, 0x186f, 0x45cd, 0x4e7d, 0x215a, 0x2485, -0x3122, 0xe7a8, 0xc40a, 0xbf85, 0xd4dd, 0xebe8, 0xf32b, 0x2121, 0x49bb, 0x4c61, -0x1af5, 0x1f88, 0x2c32, 0xe8c5, 0xc512, 0xc0b7, 0xdbf9, 0xe9ea, 0xf2f4, 0x2584, -0x43e2, 0x3e1b, 0x19cf, 0x28d2, 0x2442, 0xe27b, 0xc589, 0xbe8a, 0xdddc, 0xe567, -0xed4e, 0x27f2, 0x48cd, 0x3505, 0x0e88, 0x2cd5, 0x207d, 0xda54, 0xc1cf, 0xb8c1, -0xd925, 0xe569, 0xefd0, 0x2723, 0x4dd1, 0x38b2, 0x0de5, 0x2d90, 0x155b, 0xca06, -0xbab6, 0xbf37, 0xdd46, 0xe3fd, 0xfb50, 0x2e5d, 0x487b, 0x343e, 0x0abe, 0x25e9, -0x0f65, 0xcb83, 0xb474, 0xbc50, 0xe2ab, 0xe1df, 0xfd3e, 0x3672, 0x458b, 0x294e, -0x10fd, 0x2afa, 0x027f, 0xcae8, 0xb95b, 0xbc6f, 0xe536, 0xe3af, 0xfd1c, 0x3b18, -0x4cb1, 0x23ff, 0x13eb, 0x3353, 0xfb34, 0xc4aa, 0xb71a, 0xb9f2, 0xe1d7, 0xe97f, -0x058d, 0x3a0f, 0x4fcd, 0x2408, 0x11a3, 0x2fb9, 0xf271, 0xbb7f, 0xb447, 0xc317, -0xde44, 0xe56a, 0x110a, 0x3ccc, 0x494a, 0x1f80, 0x11af, 0x26a1, 0xeb09, 0xbcd0, -0xaf90, 0xc8d4, 0xe63f, 0xe47d, 0x1435, 0x3f4f, 0x3fbe, 0x17c7, 0x1a4f, 0x2393, -0xe191, 0xbfa1, 0xb0e4, 0xc7c9, 0xe2d9, 0xe363, 0x1625, 0x4320, 0x3da9, 0x11c4, -0x1e02, 0x1d1b, 0xd6be, 0xbe96, 0xb123, 0xc8a4, 0xe6ce, 0xef2e, 0x1c03, 0x4584, -0x3fd1, 0x1006, 0x20d8, 0x197b, 0xcf64, 0xb99e, 0xb693, 0xd396, 0xe8eb, 0xfb01, -0x2aca, 0x4b38, 0x3f87, 0x0de0, 0x1f2f, 0x1503, 0xd574, 0xba46, 0xb72d, 0xf07a, -0xfa16, 0xf608, 0x29c0, 0x3a7e, 0x42a7, 0x43ac, 0x2717, 0xec6f, 0xd732, 0xc1ac, -0xa146, 0xef37, 0x122b, 0x05c1, 0x5c67, 0x8e8c, 0x3d5e, 0x0043, 0x00d0, 0xb9ef, -0xa38d, 0xc8dd, 0xc921, 0x15c9, 0x5fe3, 0x531a, 0x477d, 0x5852, 0x1b9f, 0xb930, -0xd1b6, 0xde60, 0xbcce, 0xe7f7, 0x16b1, 0x2aeb, 0x4605, 0x3592, 0xfe8c, 0x0c1d, -0x1b24, 0xd084, 0xd667, 0x2736, 0x06f7, 0xdfa7, 0x1976, 0x0df9, 0xc5e8, 0x032b, -0x324e, 0xea0e, 0x1ab4, 0x46e4, 0xf72e, 0x0369, 0x0ef3, 0xbe35, 0xbd17, 0x10fd, -0xfb35, 0xeb3f, 0x4e43, 0x2da4, 0xfe31, 0x2f50, 0xf64c, 0xafd6, 0xe267, 0xfd01, -0xca77, 0x1087, 0x48c1, 0xfcf4, 0x1bb0, 0x31af, 0xd234, 0xc0cb, 0x054e, 0xec6b, -0xce29, 0x29db, 0x1bb4, 0xf0fd, 0x3608, 0x12eb, 0xbb40, 0xeaa8, 0x190f, 0xce00, -0xed59, 0x39ef, 0xf1f0, 0xfb2a, 0x3535, 0xe3b3, 0xbf33, 0x1a9b, 0x013b, 0xc2ab, -0x2976, 0x21e0, 0xd3d8, 0x1ca6, 0x14ae, 0xb242, 0xe538, 0x2958, 0xd98c, 0xf279, -0x4106, 0xf13e, 0xf68b, 0x3379, 0xe023, 0xb4a8, 0x104b, 0x0685, 0xcca4, 0x2e61, -0x2d96, 0xe2b8, 0x26ac, 0x2510, 0xc114, 0xd9e5, 0x1f91, 0xdbc9, 0xe515, 0x40bd, -0x0693, 0xff44, 0x3c5e, 0xf664, 0xb8dc, 0x0b37, 0x1314, 0xc29c, 0x161f, 0x3582, -0xe32e, 0x17c0, 0x2de6, 0xc7c1, 0xcfeb, 0x23a6, 0xe644, 0xe65f, 0x4256, 0xf765, -0xe698, 0x4148, 0xfbe1, 0xa6b4, 0x03fa, 0x1c92, 0xcb85, 0x1a54, 0x37af, 0xe830, -0x1b0b, 0x255d, 0xc13f, 0xd3d9, 0x205e, 0xde69, 0xe2ab, 0x48d5, 0x0931, 0xee2f, -0x3d79, 0x0658, 0xb36c, 0xf59e, 0x11f4, 0xd042, 0x110b, 0x2e1b, 0xe763, 0x2269, -0x3bda, 0xcefb, 0xd37b, 0x2d7f, 0xe9d7, 0xd48e, 0x3fd2, 0x0e86, 0xea62, 0x3cd5, -0x11e0, 0xc1dc, 0x08e0, 0x1f68, 0xd3f1, 0x1fc8, 0x3da6, 0xe12f, 0x1d62, 0x4060, -0xccb6, 0xd211, 0x316f, 0xf370, 0xe20e, 0x4657, 0x1280, 0xf30a, 0x3df0, 0x07fc, -0xb956, 0x023e, 0x1978, 0xcbba, 0x137d, 0x3ff7, 0xecbc, 0x1698, 0x3f29, 0xdf9f, -0xcc1c, 0x1bdc, 0xef17, 0xd3da, 0x346b, 0x1296, 0xeb25, 0x3885, 0x190f, 0xbf13, -0xfb71, 0x1df2, 0xc509, 0xffa2, 0x3a66, 0xe5fd, 0x04f6, 0x36be, 0xda99, 0xc67e, -0x1fc2, 0xef95, 0xcfa8, 0x39df, 0x0f1a, 0xd986, 0x2d7b, 0x0e88, 0xb2a2, 0xf40f, -0x1bd3, 0xc95c, 0x0511, 0x408d, 0xec48, 0x03d2, 0x3281, 0xd7a0, 0xb9a0, 0x13ab, -0xf02d, 0xc92c, 0x3af6, 0x26c0, 0xe5f8, 0x2de7, 0x18b9, 0xafd8, 0xddbf, 0x15bc, -0xc4d3, 0xf6dc, 0x4b73, 0xf89f, 0x018a, 0x3c4e, 0xdf11, 0xb20d, 0x12d7, 0xf511, -0xbf7e, 0x33aa, 0x286f, 0xe309, 0x3107, 0x1f74, 0xb1c3, 0xe10f, 0x1fd3, 0xc7d4, -0xef6e, 0x4b78, 0xf32f, 0xf8e5, 0x43cb, 0xe7da, 0xaf46, 0x115a, 0xfeb2, 0xbf7a, -0x2e9a, 0x2ed7, 0xde2f, 0x2807, 0x259c, 0xb09f, 0xd3d4, 0x2606, 0xd544, 0xeb3d, -0x5107, 0xfecf, 0xf63f, 0x4304, 0xedfe, 0xae0d, 0x0d7f, 0x0957, 0xc47d, 0x2f62, -0x3b51, 0xdfea, 0x2a01, 0x3390, 0xb825, 0xd3e9, 0x29f1, 0xd82e, 0xe2e3, 0x509a, -0x061c, 0xf530, 0x48b1, 0xf740, 0xabeb, 0x0d93, 0x0ed4, 0xbed0, 0x274e, 0x3e3b, -0xddc2, 0x2168, 0x35a1, 0xbbb0, 0xcedb, 0x2b94, 0xdd5b, 0xdd2d, 0x4e6a, 0x068d, -0xe741, 0x3eef, 0xfe34, 0xad12, 0x0bb7, 0x1a73, 0xbea5, 0x1c31, 0x4269, 0xdc1a, -0x1611, 0x37d6, 0xc048, 0xcaa3, 0x2f7e, 0xe59c, 0xd94c, 0x4ed8, 0x0af6, 0xe225, -0x3c84, 0xfd49, 0xa4b2, 0x048d, 0x1ed5, 0xc496, 0x1caa, 0x4641, 0xddd4, 0x1578, -0x37dc, 0xc13b, 0xcab7, 0x30dc, 0xfec0, 0xd462, 0x1387, 0x07dd, 0x14c1, 0x4b92, -0x0d74, 0xda49, 0x12de, 0x02fe, 0xb8fe, 0xeaae, 0x0363, 0xdab0, 0x23b0, 0x68fb, -0x3681, 0x1351, 0x29fc, 0xf22e, 0xb781, 0xd225, 0xc11d, 0xd7d8, 0x354d, 0x26b8, -0x09af, 0x60fa, 0x5f8c, 0xe302, 0xde80, 0xff6a, 0xbb95, 0xafec, 0x029f, 0x161d, -0x0fee, 0x3924, 0x2b6c, 0x1ed5, 0x24fe, 0xec7b, 0xc1fe, 0xe22b, 0xfbcd, 0xdc4d, -0xf3f7, 0x210f, 0x1d01, 0x1305, 0x1342, 0x1f6c, 0x0852, 0xfea5, 0xdd42, 0xc083, -0xf243, 0xde95, 0xd818, 0x23f7, 0x3eab, 0x0891, 0x1381, 0x52fd, 0xff10, 0xc983, -0xe091, 0xc3b8, 0xcafc, 0xe7d7, 0xfc8d, 0x2043, 0x559d, 0x2c2e, 0x0418, 0x4485, -0x0b4c, 0xb4e5, 0xc68e, 0xddbf, 0xd0b6, 0xdc81, 0x1e4b, 0x2d10, 0x365b, 0x2c50, -0x170a, 0x303e, 0x0a60, 0xcc89, 0xb88a, 0xdbc7, 0xe3e7, 0xcdd2, 0x0b38, 0x3c7e, -0x392b, 0x254c, 0x3272, 0x2fc9, 0xf0ee, 0xd4d8, 0xb5b4, 0xc03b, 0xdef0, 0xd8e9, -0x0edc, 0x533e, 0x46e4, 0x0fc4, 0x358a, 0x34b8, 0xd1c3, 0xbf29, 0xbb64, 0xbeea, -0xdb1c, 0xf31b, 0x17f1, 0x44fa, 0x4bfb, 0x0a36, 0x1fe2, 0x2ce9, 0xcf0d, 0xb605, -0xc6c6, 0xcc96, 0xcf30, 0xf9cd, 0x25fb, 0x36d1, 0x4086, 0x1499, 0x21d8, 0x287f, -0xde77, 0xb0fd, 0xba6d, 0xe0f5, 0xd3e4, 0xee77, 0x3561, 0x4077, 0x2baa, 0x1d38, -0x3753, 0x1587, 0xd2e2, 0xb252, 0xb44b, 0xe5a7, 0xdbb5, 0xe778, 0x3790, 0x55cb, -0x234e, 0x10ab, 0x42e9, 0x083e, 0xc15a, 0xc2a9, 0xbe30, 0xd7d1, 0xe76a, 0xfa22, -0x2b37, 0x53cb, 0x29a6, 0x0950, 0x4086, 0x0f68, 0xbba0, 0xb824, 0xcc9c, 0xd743, -0xd665, 0x06ae, 0x3597, 0x44f1, 0x2854, 0x19d4, 0x3395, 0xfe8f, 0xc1b9, 0xad2d, -0xc39d, 0xde05, 0xd850, 0x0bf2, 0x4266, 0x457f, 0x1d4b, 0x2284, 0x337f, 0xe442, -0xbc43, 0xb8ba, 0xc33a, 0xe0e4, 0xe8f8, 0x10b5, 0x4262, 0x4afc, 0x1744, 0x1d2b, -0x3125, 0xe2b5, 0xbcb6, 0xbdea, 0xccfd, 0xdfe5, 0xefed, 0x1bae, 0x3f5e, 0x451d, -0x167c, 0x1ea7, 0x2848, 0xdf70, 0xbb35, 0xbbfc, 0xd959, 0xe266, 0xec2b, 0x20e3, -0x435c, 0x3878, 0x0fee, 0x25e8, 0x1ba1, 0xdaf0, 0xc061, 0xb76f, 0xdd9c, 0xe727, -0xece4, 0x247e, 0x48ee, 0x303d, 0x099a, 0x320b, 0x19b9, 0xd0b8, 0xc508, 0xbe20, -0xd52c, 0xe430, 0xf5f1, 0x21d1, 0x4aae, 0x3670, 0x0bc4, 0x349a, 0x16c6, 0xc9e1, -0xbb8f, 0xc44e, 0xdbed, 0xde26, 0x03b2, 0x34c9, 0x4689, 0x30a8, 0x17ea, 0x33bd, -0x0b87, 0xcd79, 0xb9b9, 0xc3c1, 0xe227, 0xdffc, 0x07ae, 0x3deb, 0x4732, 0x25e8, -0x1ef9, 0x370f, 0xfb29, 0xcc78, 0xbf32, 0xc5c0, 0xe807, 0xe571, 0x074b, 0x4121, -0x4902, 0x1968, 0x206c, 0x3da5, 0xf467, 0xc9c7, 0xc240, 0xc6d8, 0xe2b1, 0xeca9, -0x0f7d, 0x3a80, 0x4ac1, 0x1bda, 0x1cdc, 0x3836, 0xee35, 0xc32e, 0xc0a2, 0xce3e, -0xdfd7, 0xe9c8, 0x162c, 0x3eb5, 0x48b0, 0x1a61, 0x1e8f, 0x2cf5, 0xe5c6, 0xbb80, -0xb378, 0xd228, 0xe3dd, 0xeba5, 0x2266, 0x46f5, 0x3e1f, 0x13fa, 0x26ea, 0x21ec, -0xd925, 0xbdc7, 0xb66d, 0xd76b, 0xe81e, 0xf025, 0x269d, 0x4d69, 0x3d40, 0x1027, -0x2c58, 0x1cc9, 0xd265, 0xbfd4, 0xbabe, 0xd919, 0xe822, 0xf931, 0x2bc9, 0x4c69, -0x3d20, 0x158d, 0x31ca, 0x1821, 0xce8a, 0xb8af, 0xba0f, 0xdfb6, 0xe677, 0xfd3b, -0x385e, 0x53d9, 0x3764, 0x14a8, 0x30af, 0x0a51, 0xcb95, 0xbad7, 0xbc48, 0xe366, -0xea7e, 0x06cf, 0x3f08, 0x53c7, 0x2fe0, 0x189d, 0x383f, 0x00fd, 0xc5f3, 0xbf0d, -0xc38f, 0xe4a3, 0xecee, 0x0ef5, 0x432c, 0x54a7, 0x2a15, 0x190d, 0x3675, 0xf7bc, -0xc3e0, 0xbc22, 0xc381, 0xe210, 0xec59, 0x15ed, 0x4300, 0x4fd8, 0x269c, 0x1bda, -0x324a, 0xed57, 0xbb9c, 0xb705, 0xceb8, 0xeb30, 0xed72, 0x1baa, 0x48ad, 0x4bd3, -0x1fde, 0x1ea9, 0x2826, 0xe505, 0xc2b3, 0xb577, 0xceec, 0xeeb9, 0xef73, 0x1fd5, -0x4c99, 0x41f7, 0x12c7, 0x24ad, 0x22eb, 0xd504, 0xbfe3, 0xba2a, 0xd063, 0xea6f, -0xf037, 0x1c9c, 0x4acf, 0x430c, 0x0b68, 0x200d, 0x1c9e, 0xcce4, 0xb9ad, 0xbc29, -0xd211, 0xe475, 0xfc21, 0x2910, 0x443b, 0x3a83, 0x0ef1, 0x2295, 0x15ac, 0xd00d, -0xb774, 0xbaff, 0xded3, 0xe41e, 0xf945, 0x331e, 0x49b7, 0x3276, 0x128d, 0x28c7, -0x08f2, 0xce8e, 0xbb2e, 0xb907, 0xe4c0, 0xe9f8, 0xf98a, 0x3323, 0x4a75, 0x2718, -0x0ddc, 0x3369, 0x0795, 0xc936, 0xc192, 0xc3cc, 0xe2b9, 0xe583, 0xfce9, 0x312f, -0x4951, 0x266f, 0x0ffe, 0x3698, 0x0679, 0xca63, 0xc301, 0xc844, 0xde4c, 0xe26e, -0x076e, 0x3283, 0x4507, 0x259a, 0x11af, 0x30ff, 0xfd1c, 0xc1b2, 0xb384, 0xc924, -0xe414, 0xde8f, 0x0781, 0x295f, 0x51b4, 0x5b09, 0x17c9, 0xf17b, 0xd9cd, 0xb11a, -0x8396, 0xbd98, 0x073f, 0x0598, 0x5258, 0x7bf8, 0x3dd3, 0x096d, 0xe7f8, 0xa966, -0x9271, 0xc3c7, 0xb173, 0xf5d9, 0x6db2, 0x3b89, 0x2231, 0x4aaf, 0x1c3b, 0xc115, -0xcb06, 0xd460, 0xbb98, 0x03f6, 0xf9d7, 0xecaf, 0x4aa5, 0x27cf, 0xcf8c, 0x0764, -0x3489, 0xd9cb, 0xf31b, 0x39b5, 0xebc3, 0xeb7f, 0x1192, 0xceee, 0xbd72, 0x16f9, -0x1b5a, 0xf888, 0x4a44, 0x34a8, 0xedd8, 0x18bb, 0xf8d6, 0xa74c, 0xd19c, 0x139c, -0xeaf7, 0x0d0b, 0x5317, 0x0e81, 0x0c44, 0x35bd, 0xe010, 0xb51d, 0x075b, 0xfc77, -0xc9ae, 0x2b95, 0x35a1, 0xf0e8, 0x2c61, 0x2481, 0xc370, 0xe826, 0x20b5, 0xd95a, -0xf832, 0x43e0, 0xf261, 0xf7ef, 0x414e, 0xf14b, 0xbf9e, 0x1c6c, 0x1380, 0xd3d1, -0x2650, 0x1f52, 0xd592, 0x1ddb, 0x2414, 0xc347, 0xebd1, 0x3e70, 0xf240, 0xeb89, -0x3d66, 0xf738, 0xe57b, 0x2fe8, 0xf22d, 0xbd68, 0x1e7b, 0x2466, 0xd858, 0x2613, -0x3122, 0xdc86, 0x16b9, 0x277b, 0xc324, 0xdb13, 0x2c78, 0xe8ab, 0xed0b, 0x49bb, -0x0342, 0xf02a, 0x3b6c, 0xf7d9, 0xb9c6, 0x0fd8, 0x1192, 0xc763, 0x12e5, 0x2738, -0xe26c, 0x1a89, 0x2a72, 0xcd72, 0xdca7, 0x27a9, 0xe962, 0xd98a, 0x271e, 0xf948, -0xe783, 0x29f0, 0x000e, 0xc137, 0x064c, 0x17e6, 0xcd48, 0x0efb, 0x329b, 0xdc50, -0xf9d6, 0x28fd, 0xd866, 0xc34b, 0x13df, 0xefa3, 0xdcbf, 0x3578, 0x09a7, 0xe33f, -0x2c3f, 0x02a6, 0xaa76, 0xf3eb, 0x1870, 0xc21d, 0x029e, 0x3d07, 0xedbb, 0x0a92, -0x33dc, 0xd94f, 0xc985, 0x15a5, 0xdf1c, 0xd3f5, 0x3f5e, 0x0fca, 0xe50f, 0x3b04, -0x1a3d, 0xb99b, 0xf6d1, 0x1c75, 0xcc21, 0x0987, 0x3e95, 0xed51, 0x0dcf, 0x3b32, -0xd980, 0xc6f7, 0x280e, 0xf587, 0xd3c2, 0x4871, 0x233c, 0xe02f, 0x3039, 0x183d, -0xaecf, 0xf137, 0x2776, 0xcc66, 0x0bf0, 0x5162, 0xeddf, 0x088c, 0x4536, 0xd457, -0xb205, 0x2315, 0xf51a, 0xc60d, 0x4281, 0x2682, 0xe5d9, 0x3aad, 0x1cab, 0xb02d, -0xf294, 0x20af, 0xbecb, 0x0084, 0x4c16, 0xeaf2, 0x054e, 0x449f, 0xdf02, 0xbd48, -0x25bf, 0xfda9, 0xcb15, 0x3a93, 0x1e9b, 0xddd4, 0x3408, 0x1f70, 0xb333, 0xf3df, -0x32ab, 0xd133, 0x014e, 0x52b2, 0xf138, 0xfe00, 0x4260, 0xe1f2, 0xbbac, 0x28bf, -0x0404, 0xcc81, 0x4649, 0x2e56, 0xdee8, 0x3677, 0x23ef, 0xabc0, 0xea62, 0x3159, -0xcf59, 0xfdcf, 0x575a, 0xf403, 0xfe40, 0x4759, 0xe094, 0xb225, 0x1ffa, 0xfefc, -0xc26f, 0x3a61, 0x2be1, 0xdb44, 0x2efe, 0x2504, 0xadcb, 0xe074, 0x2713, 0xc6d3, -0xecc2, 0x48d6, 0xea4d, 0xf2ec, 0x43a0, 0xe1fc, 0xaa5f, 0x1825, 0xffd7, 0xba38, -0x2bdb, 0x24a3, 0xce10, 0x1cd8, 0x1cfc, 0xab2e, 0xdc4d, 0x276d, 0xca22, 0xeb01, -0x4a08, 0xeb0e, 0xe94c, 0x3cd7, 0xe45f, 0xa6c6, 0x0f8c, 0x066f, 0xc2d2, 0x2a01, -0x2aea, 0xd9bf, 0x251a, 0x2933, 0xb64d, 0xd9b5, 0x26a1, 0xd2ba, 0xe822, 0x4af1, -0xfec7, 0xf323, 0x3fdf, 0xf78e, 0xb4c1, 0x0f7f, 0x0e1c, 0xc7ce, 0x25fb, 0x3129, -0xdeb5, 0x2268, 0x3385, 0xc266, 0xd9b6, 0x2efc, 0xddb0, 0xe00f, 0x45ac, 0x0168, -0xea8d, 0x3cd9, 0xfeda, 0xb603, 0x13c5, 0x166b, 0xc192, 0x1f5a, 0x3804, 0xda94, -0x15a3, 0x35b3, 0xc729, 0xd3ae, 0x2e68, 0xe359, 0xde70, 0x4764, 0x0725, 0xe6b1, -0x3882, 0xfed4, 0xad23, 0x0819, 0x16c2, 0xc15b, 0x1c91, 0x4358, 0xe49c, 0x1162, -0x35d1, 0xc8f8, 0xc74f, 0x2676, 0xe0e9, 0xd0d7, 0x4b09, 0x1cea, 0xedea, 0x3f3b, -0x11f4, 0xb09a, 0xfc73, 0x177b, 0xba40, 0x109f, 0x4fcb, 0xf285, 0x1d0f, 0x3dc2, -0xc588, 0xc98d, 0x329a, 0xfd8a, 0xcc33, 0x1573, 0x1810, 0x1532, 0x434e, 0x102d, -0xd555, 0x08d4, 0x0011, 0xb77c, 0xec37, 0x098c, 0xd4fc, 0x2033, 0x7926, 0x32be, -0xfe95, 0x28ab, 0xef9c, 0xa428, 0xcffc, 0xcbdf, 0xd07c, 0x3681, 0x2f87, 0x0680, -0x626e, 0x5e9c, 0xd624, 0xd9e4, 0x080a, 0xadfe, 0xa2f5, 0x12af, 0x142c, 0xffde, -0x3703, 0x3570, 0x269e, 0x24fb, 0xe8a1, 0xb7ec, 0xe753, 0xf82a, 0xce4d, 0x001a, -0x2e98, 0x1f84, 0x0eb8, 0x1beb, 0x2603, 0xfcff, 0xfd98, 0xd8c0, 0xc719, 0xfc52, -0xddd2, 0xe3ec, 0x2ee0, 0x4393, 0x042b, 0x1929, 0x569a, 0xef83, 0xc35d, 0xd9e5, -0xc6ce, 0xd1e0, 0xed86, 0x0b2a, 0x23b2, 0x504c, 0x20ad, 0x029d, 0x3b72, 0xf5a5, -0xad6b, 0xbe54, 0xddfc, 0xd162, 0xddcd, 0x2952, 0x324b, 0x3156, 0x1d3f, 0x12f5, -0x235b, 0xf27f, 0xc001, 0xb250, 0xdfdd, 0xe3f3, 0xd455, 0x14e4, 0x3c06, 0x3326, -0x1a60, 0x30e7, 0x24a0, 0xe2c3, 0xcd08, 0xb21c, 0xc75c, 0xdc66, 0xe088, 0x1e09, -0x54ef, 0x4197, 0x0dca, 0x356f, 0x22ce, 0xcaf2, 0xc0ce, 0xbc3d, 0xcfda, 0xe59b, -0xfe5c, 0x27b1, 0x4caa, 0x45a1, 0x0add, 0x274f, 0x1c6c, 0xcde6, 0xc343, 0xd011, -0xdf48, 0xe021, 0x0b0c, 0x335a, 0x3c8e, 0x345d, 0x0d86, 0x278e, 0x1b8f, 0xdc12, -0xbc28, 0xc6ff, 0xead3, 0xdba0, 0xfdee, 0x39b8, 0x3f03, 0x2143, 0x1858, 0x376b, -0x021b, 0xcaa8, 0xbb59, 0xc6f6, 0xef67, 0xe041, 0xf9ba, 0x3cd7, 0x4cfd, 0x168d, -0x1037, 0x3fec, 0xf71d, 0xbed3, 0xc8d6, 0xcbc6, 0xdd8f, 0xea8c, 0x09b1, 0x2e92, -0x4701, 0x1829, 0x091c, 0x3ad7, 0xfd4b, 0xb999, 0xbe68, 0xdc50, 0xdc39, 0xd663, -0x1009, 0x330e, 0x37f3, 0x1ad3, 0x1cca, 0x3476, 0xf66a, 0xc5e8, 0xbb6f, 0xd5e8, -0xe008, 0xd5ea, 0x10b5, 0x3f63, 0x3725, 0x1102, 0x2911, 0x3855, 0xe9cb, 0xc610, -0xc44b, 0xd547, 0xdd89, 0xe4aa, 0x195d, 0x4084, 0x3d9b, 0x10ab, 0x2a1f, 0x3667, -0xe38c, 0xc1a0, 0xc4c5, 0xdd94, 0xe21b, 0xe99c, 0x1f49, 0x4312, 0x3b69, 0x0f14, -0x2b3d, 0x2eaa, 0xdeab, 0xc00a, 0xc634, 0xe225, 0xe0e3, 0xf311, 0x2b9a, 0x44fd, -0x3881, 0x11ee, 0x2f2a, 0x2428, 0xdc87, 0xc347, 0xc2d0, 0xe6e0, 0xe5b0, 0xf196, -0x2d4e, 0x4a97, 0x3366, 0x1388, 0x3ae0, 0x1bf8, 0xd058, 0xc212, 0xc09b, 0xdbf3, -0xe25c, 0xfa1f, 0x3093, 0x4e94, 0x31f0, 0x12fe, 0x3bde, 0x11ad, 0xc841, 0xb8bd, -0xbe0b, 0xdd25, 0xdd7e, 0x0138, 0x3ac9, 0x4ccb, 0x2ba2, 0x1359, 0x3033, 0xfbc6, -0xc14d, 0xb543, 0xbd7e, 0xdcf8, 0xde2b, 0x0754, 0x388b, 0x409a, 0x1e0d, 0x134a, -0x2ba8, 0xeee4, 0xbe5b, 0xafaf, 0xbb90, 0xe059, 0xde74, 0x0736, 0x3d1c, 0x4310, -0x16f1, 0x1686, 0x2f2a, 0xe9de, 0xbe17, 0xb446, 0xc0ca, 0xdd27, 0xe1a0, 0x0ccd, -0x3c13, 0x4661, 0x1949, 0x196a, 0x2a50, 0xdf8d, 0xb6a7, 0xb25a, 0xc8aa, 0xdf0e, -0xe6dc, 0x19c8, 0x411d, 0x423f, 0x15db, 0x1a0d, 0x2316, 0xdf69, 0xba97, 0xb2a9, -0xd092, 0xe29a, 0xebf2, 0x2556, 0x4a3b, 0x3fb1, 0x16cb, 0x2603, 0x1c1b, 0xd67d, -0xbcf3, 0xb765, 0xdad1, 0xea4b, 0xf176, 0x27e4, 0x4d31, 0x3b4c, 0x0fab, 0x2ad5, -0x1a4d, 0xd10b, 0xbc49, 0xba78, 0xda1f, 0xe903, 0xffda, 0x308c, 0x4a2f, 0x38ce, -0x11cc, 0x299c, 0x105c, 0xcdc3, 0xba31, 0xc03e, 0xe616, 0xe849, 0xfec7, 0x37e1, -0x4e98, 0x3198, 0x12d8, 0x2aeb, 0x03e5, 0xcb29, 0xbccb, 0xc232, 0xe734, 0xeb9c, -0x07ed, 0x3d12, 0x4b48, 0x2515, 0x14e8, 0x330c, 0xfd19, 0xc86d, 0xc241, 0xca17, -0xe64b, 0xe918, 0x09ed, 0x3ba3, 0x4eee, 0x25e2, 0x167a, 0x38a6, 0xffcf, 0xcb0e, -0xc615, 0xd055, 0xe3d3, 0xeafc, 0x1602, 0x3e86, 0x49c2, 0x257e, 0x2166, 0x3bcd, -0xfc55, 0xc4ad, 0xbb87, 0xd6e3, 0xe7a1, 0xe64f, 0x1ddd, 0x4682, 0x4516, 0x1dee, -0x1dc5, 0x2b0d, 0xed86, 0xc590, 0xb97d, 0xd84f, 0xec06, 0xe368, 0x1c7f, 0x4cee, -0x3f07, 0x13c3, 0x289d, 0x28fb, 0xdcf0, 0xc5b7, 0xbdb7, 0xd4a7, 0xec46, 0xecd0, -0x1bda, 0x48cc, 0x4019, 0x0cd7, 0x23a7, 0x2698, 0xd5be, 0xbc3e, 0xb90e, 0xcc6c, -0xddf3, 0xf12b, 0x24f1, 0x4448, 0x3b5c, 0x118e, 0x2441, 0x1c2b, 0xd270, 0xb368, -0xb6c7, 0xdd46, 0xdf51, 0xefbb, 0x3138, 0x49d2, 0x3667, 0x1864, 0x2b86, 0x1073, -0xd35e, 0xbbf4, 0xb47a, 0xdfb4, 0xe8bb, 0xf6b2, 0x353a, 0x4fd4, 0x2e9f, 0x12a8, -0x323d, 0x07c8, 0xcb04, 0xc1fa, 0xbd57, 0xdf17, 0xe6e8, 0xfa82, 0x3052, 0x4c63, -0x2d83, 0x12bf, 0x3366, 0x0318, 0xc6dd, 0xbd85, 0xbc4f, 0xd9e1, 0xe604, 0x0814, -0x34df, 0x4a09, 0x2d9d, 0x148f, 0x2e79, 0xfba1, 0xc12c, 0xb277, 0xbf95, 0xdeb7, -0xe211, 0x10bc, 0x423c, 0x4956, 0x24f7, 0x1571, 0x2434, 0xebbb, 0xc333, 0xb587, -0xc733, 0xedc0, 0xebba, 0x0854, 0x3f2e, 0x6f7e, 0x4a81, 0x0e5e, 0x03fe, 0xcb43, -0xa313, 0xa8c3, 0xd5fe, 0x0fe0, 0x3ce3, 0x6922, 0x5cb3, 0x4541, 0x10b8, 0xc5c1, -0xb7c8, 0xca44, 0xca38, 0xd7f7, 0x38e7, 0x4e53, 0x1cb5, 0x3dfb, 0x3d19, 0x06ab, -0xeda0, 0xe9ef, 0xd83d, 0xf9bf, 0x0ebe, 0xca2a, 0x0a79, 0x510e, 0xf01d, 0xe7eb, -0x3be6, 0x1a2e, 0xf989, 0x353e, 0x099c, 0xe538, 0x16d7, 0xd697, 0xa93c, 0x0407, -0x1bee, 0xf75f, 0x46c6, 0x50e3, 0xf430, 0x1813, 0x169b, 0xaf5d, 0xc57c, 0x0fb5, -0xe638, 0xf7e9, 0x459c, 0x122e, 0x0654, 0x352e, 0xfc93, 0xc262, 0xf99c, 0x072c, -0xc8f1, 0x0bf2, 0x32cd, 0xf85b, 0x1790, 0x25c1, 0xde96, 0xd882, 0x18ea, 0xe834, -0xd77c, 0x3995, 0x1231, 0xeab1, 0x28e3, 0x0cfc, 0xc5ef, 0xf7bd, 0x18f1, 0xd03e, -0x057e, 0x320a, 0xe5e4, 0x07c7, 0x2d5d, 0xd88a, 0xc884, 0x2072, 0xfd6c, 0xd3d0, -0x2a59, 0x1066, 0xe564, 0x22a2, 0x047a, 0xb2ee, 0xeaad, 0x1c28, 0xcc6c, 0xf7e5, -0x3c36, 0xee88, 0xfbfb, 0x3085, 0xddf6, 0xb28a, 0x0aaf, 0xf456, 0xbc45, 0x223a, -0x21ed, 0xe31c, 0x2214, 0x1882, 0xb51a, 0xdbdc, 0x18ba, 0xc1ce, 0xe1c3, 0x397c, -0xed39, 0xf426, 0x3690, 0xe68c, 0xb498, 0x0e83, 0x00c5, 0xc494, 0x1ef7, 0x1b31, -0xdc33, 0x1f84, 0x1b7f, 0xb9c1, 0xdc07, 0x2246, 0xd5fb, 0xeaf7, 0x4a41, 0x042a, -0xed8c, 0x29a9, 0xf4c4, 0xbbf5, 0xffbd, 0x02b3, 0xd089, 0x2a98, 0x349a, 0xe5f4, -0x231d, 0x3682, 0xc042, 0xc757, 0x28ee, 0xe56b, 0xda47, 0x3eac, 0x0d7c, 0xfc17, -0x4512, 0x05d1, 0xbb63, 0x0fc8, 0x0da5, 0xb98f, 0x1ecc, 0x3aea, 0xdbbd, 0x1bd6, -0x4041, 0xd007, 0xd35e, 0x2aaf, 0xea38, 0xe711, 0x3e4a, 0xfa47, 0xef65, 0x3f02, -0xf730, 0xae98, 0x0fae, 0x1e19, 0xc953, 0x1ea3, 0x3db2, 0xe20d, 0x1043, 0x2d87, -0xc8ab, 0xca8a, 0x2270, 0xe769, 0xe021, 0x4751, 0x0a42, 0xed5b, 0x468e, 0x0a0e, -0xa823, 0xfc1e, 0x19ce, 0xc19e, 0x0fd8, 0x3c33, 0xe854, 0x1d91, 0x3f3f, 0xd03c, -0xd290, 0x2d60, 0xe292, 0xd443, 0x4229, 0x0590, 0xe446, 0x3c78, 0x0d2e, 0xbba0, -0x0b10, 0x1fdc, 0xccc6, 0x142f, 0x3174, 0xdc18, 0x1061, 0x371b, 0xd368, 0xd200, -0x2d59, 0xf1a5, 0xdc23, 0x3edd, 0x0fb6, 0xe812, 0x2f6f, 0x0a77, 0xb941, 0xfe00, -0x1d36, 0xcc9c, 0x11f2, 0x404a, 0xe70a, 0x0abc, 0x3965, 0xd3be, 0xbed2, 0x1fe7, -0xee09, 0xd03e, 0x3f07, 0x1799, 0xe33b, 0x342f, 0x1443, 0xb44b, 0xf906, 0x1979, -0xbeaf, 0x0a9f, 0x45b3, 0xe73c, 0x0a6f, 0x3e78, 0xd655, 0xc03d, 0x2087, 0xeb0b, -0xcf7a, 0x4395, 0x1915, 0xe1a6, 0x34d0, 0x134e, 0xac96, 0xeeeb, 0x1aa0, 0xc459, -0x0965, 0x4852, 0xe8bd, 0x0151, 0x3569, 0xd16f, 0xb855, 0x1c6f, 0xed54, 0xcabb, -0x428e, 0x1dfb, 0xdf3c, 0x323b, 0x15f0, 0xab84, 0xe597, 0x18a2, 0xc34f, 0x0120, -0x48dd, 0xedf1, 0x07d1, 0x3f6b, 0xd521, 0xb0ac, 0x1903, 0xf0c7, 0xc122, 0x3959, -0x22ad, 0xe010, 0x2ec7, 0x1837, 0xaaf6, 0xe170, 0x1e2b, 0xc7b9, 0xfdb5, 0x4c53, -0xebef, 0xfb34, 0x3ee4, 0xdef9, 0xb297, 0x1b34, 0xfd76, 0xc42a, 0x391e, 0x2b29, -0xde3f, 0x2dc8, 0x2491, 0xb2a5, 0xe544, 0x2b06, 0xcad8, 0xf507, 0x54ba, 0xf673, -0xfa92, 0x48ca, 0xe9a8, 0xafd3, 0x1ef7, 0x084a, 0xc383, 0x3a6e, 0x3354, 0xdbff, -0x2c3f, 0x2b2a, 0xb115, 0xe1c4, 0x348d, 0xd2d5, 0xf3b1, 0x5801, 0xf84b, 0xf5dc, -0x4897, 0xeba9, 0xac5a, 0x1d11, 0x0bb4, 0xbcd7, 0x32ed, 0x3809, 0xdc0a, 0x2aa8, -0x3035, 0xb63c, 0xddf9, 0x3359, 0xe1e6, 0xdc8c, 0x1666, 0xf007, 0x2428, 0x5dbe, -0x00c2, 0xd781, 0x22f0, 0xf405, 0xa1af, 0xed74, 0xf64b, 0xd808, 0x304e, 0x5c2f, -0x2e87, 0x2aaf, 0x32b5, 0xdc5e, 0xbf90, 0xd852, 0xad5b, 0xdde3, 0x38e2, 0x1923, -0x04d1, 0x62c4, 0x5bb8, 0xe529, 0xeaaf, 0xfd61, 0xc422, 0xc0df, 0xfa6b, 0x0d7b, -0x16ff, 0x3f3e, 0x1d78, 0x1a46, 0x3b1d, 0xf55f, 0xc829, 0xeeb5, 0x0157, 0xdd55, -0xf41a, 0x20b5, 0x1533, 0x2329, 0x1f7c, 0x1523, 0x1e43, 0x1419, 0xdc00, 0xbfc2, -0xfbcf, 0xe187, 0xd1ef, 0x2a18, 0x3c8b, 0x1862, 0x2179, 0x4380, 0x06a1, 0xdc67, -0xe0e4, 0xb854, 0xda4e, 0xf2b5, 0xe744, 0x1f54, 0x57ea, 0x2932, 0xfa55, 0x3961, -0x0fd9, 0xbac6, 0xcdda, 0xd258, 0xcf89, 0xe3ab, 0x0707, 0x1a3e, 0x3967, 0x30cc, -0x0264, 0x2d4f, 0x1e6c, 0xcc01, 0xb70b, 0xd1c4, 0xdac0, 0xca7b, 0xfba8, 0x26c2, -0x371b, 0x359b, 0x23c6, 0x2fb4, 0x0da1, 0xd9bd, 0xae9d, 0xb89c, 0xdb61, 0xcb90, -0x0132, 0x482d, 0x42cd, 0x1e49, 0x2e1f, 0x3691, 0xe7fa, 0xc93c, 0xba66, 0xbb0a, -0xe251, 0xe472, 0x0383, 0x3f08, 0x4cc8, 0x1215, 0x1c80, 0x3b71, 0xe4f3, 0xc431, -0xcbb0, 0xc403, 0xd2f9, 0xf12b, 0x1313, 0x2f50, 0x4774, 0x1313, 0x18c4, 0x4058, -0xed5d, 0xb643, 0xc25a, 0xd92a, 0xcdc3, 0xe267, 0x25f0, 0x37bf, 0x38e3, 0x1db0, -0x2909, 0x2dab, 0xe635, 0xb3fb, 0xb52f, 0xe71a, 0xdad1, 0xdbe5, 0x2dd4, 0x4a45, -0x2f11, 0x15fc, 0x375b, 0x1edc, 0xd95e, 0xc7dd, 0xb91d, 0xdb9a, 0xe8d2, 0xea7d, -0x243c, 0x50aa, 0x347a, 0x0b10, 0x3f2c, 0x24ae, 0xc984, 0xc48d, 0xccec, 0xd726, -0xda77, 0xf845, 0x2782, 0x491b, 0x3bb7, 0x1233, 0x3698, 0x200c, 0xcd29, 0xb25f, -0xc2ef, 0xdd85, 0xd457, 0xfe96, 0x3830, 0x43f0, 0x2e94, 0x1a60, 0x3369, 0x07e9, -0xcb4f, 0xb645, 0xba73, 0xdbb8, 0xdb8f, 0xffae, 0x3a33, 0x48d7, 0x2211, 0x15da, -0x362f, 0xfbd5, 0xc39a, 0xb7fb, 0xc2cf, 0xe1cd, 0xe2d2, 0x0604, 0x36c9, 0x495d, -0x209d, 0x15d2, 0x37e6, 0xf91a, 0xc431, 0xbe00, 0xccf7, 0xe3be, 0xe90a, 0x14f8, -0x3bed, 0x4775, 0x22c5, 0x1a55, 0x2eb8, 0xf7ab, 0xcbee, 0xbb0a, 0xd4b7, 0xea3e, -0xe43a, 0x18fd, 0x455e, 0x429e, 0x1d75, 0x27b4, 0x2e04, 0xeadd, 0xca0c, 0xb834, -0xcf7e, 0xebe8, 0xec12, 0x1d2b, 0x4ce6, 0x4388, 0x1410, 0x2882, 0x2863, 0xdbfa, -0xc201, 0xbc64, 0xd1a8, 0xe40d, 0xf23c, 0x21f6, 0x44ac, 0x3ed5, 0x105b, 0x1f33, -0x1ab9, 0xd393, 0xb879, 0xb8a2, 0xd559, 0xdf87, 0xf31b, 0x2555, 0x3b7c, 0x3066, -0x0f9b, 0x206c, 0x1043, 0xd352, 0xb6fe, 0xb4ae, 0xdacb, 0xdd79, 0xed28, 0x2944, -0x40cc, 0x26e3, 0x1073, 0x2c6d, 0x0a8e, 0xd1fe, 0xbe7c, 0xb79c, 0xdbb0, 0xe28f, -0xf1b8, 0x2782, 0x45d6, 0x288a, 0x146e, 0x3752, 0x08d7, 0xccea, 0xc003, 0xbd89, -0xda98, 0xe4f4, 0x0193, 0x3341, 0x4c65, 0x29eb, 0x1665, 0x385c, 0x0502, 0xcaf3, -0xbfdd, 0xc859, 0xe1b4, 0xe85f, 0x0f40, 0x394b, 0x49b1, 0x2907, 0x1adb, 0x324c, -0xf922, 0xc6e9, 0xb961, 0xcbdd, 0xe7b2, 0xe6bd, 0x11f6, 0x3fef, 0x46fb, 0x1df6, -0x1d0f, 0x2f40, 0xeef5, 0xc4a6, 0xb575, 0xcb9f, 0xe637, 0xea22, 0x1afc, 0x450f, -0x486c, 0x1ca2, 0x2081, 0x27c1, 0xe170, 0xbe81, 0xb610, 0xd4bd, 0xe951, 0xed82, -0x22d8, 0x4920, 0x44fd, 0x1967, 0x24be, 0x230d, 0xdd5b, 0xbd48, 0xb2b2, 0xd74f, -0xebd6, 0xf51e, 0x2d0e, 0x4f15, 0x406d, 0x18ea, 0x2d32, 0x1b37, 0xd68b, 0xc044, -0xb935, 0xdd2b, 0xe8ca, 0xf474, 0x309b, 0x54b6, 0x3c42, 0x14ba, 0x347b, 0x1910, -0xd0a8, 0xbcba, 0xb8c9, 0xdc46, 0xe9fe, 0xfff4, 0x3532, 0x5389, 0x3988, 0x14af, -0x3504, 0x102d, 0xc848, 0xb929, 0xbe6f, 0xdd0e, 0xe430, 0x059c, 0x3ba7, 0x4f58, -0x2e33, 0x10f0, 0x2a2f, 0xfdb9, 0xc2f6, 0xafbb, 0xbb99, 0xe4f6, 0xe5f2, 0x07f0, -0x3ce6, 0x4606, 0x2206, 0x1803, 0x2b80, 0xee52, 0xc24f, 0xb46d, 0xbb4a, 0xe32e, -0xe633, 0x0953, 0x4238, 0x4b00, 0x1a28, 0x1723, 0x280d, 0xe191, 0xbf29, 0xb512, -0xbb95, 0xe083, 0xee77, 0x11e1, 0x3d02, 0x4905, 0x18fb, 0x175c, 0x25d3, 0xdaba, -0xb4bd, 0xb51c, 0xcc2b, 0xe1c5, 0xed1f, 0x1d15, 0x42ae, 0x42e0, 0x12aa, 0x15c7, -0x1ce6, 0xdd86, 0xbb2e, 0xb339, 0xd4c6, 0xe6a3, 0xee5c, 0x246d, 0x4599, 0x378a, -0x117f, 0x247f, 0x1587, 0xd40f, 0xc211, 0xba12, 0xda04, 0xe9d2, 0xf097, 0x2593, -0x4a0d, 0x33f2, 0x0e58, 0x2f92, 0x1796, 0xd23e, 0xc5d1, 0xbd1d, 0xd6a8, 0xea03, -0xfd4b, 0x2b76, 0x4d07, 0x372b, 0x12c1, 0x3610, 0x1455, 0xc9fa, 0xc082, 0xc65f, -0xdbf3, 0xe5fa, 0x0864, 0x3695, 0x4d6d, 0x3441, 0x13be, 0x2f2f, 0x090c, 0xce34, -0xb830, 0xc505, 0xfada, 0xec81, 0xfb68, 0x2eba, 0x319e, 0x3ce2, 0x44fb, 0x1d01, -0xdd9d, 0xd66a, 0xb232, 0xa016, 0xf64b, 0xfff6, 0x09d5, 0x7376, 0x8570, 0x20f6, -0xfe82, 0xf200, 0x9a52, 0xa325, 0xc4f5, 0xcbde, 0x2c79, 0x67bb, 0x4c8f, 0x46a8, -0x523c, 0xf79d, 0xabd0, 0xda12, 0xcc15, 0xb71c, 0xf62d, 0x1e60, 0x327a, 0x4b18, -0x2770, 0xf598, 0x157f, 0x094e, 0xbe89, 0xebf7, 0x2a77, 0xf098, 0xe9ee, 0x28e2, -0xf32a, 0xc056, 0x237c, 0x271d, 0xe4a4, 0x3978, 0x35ba, 0xe536, 0x10f5, 0xfdaa, -0xa68b, 0xd3ea, 0x212f, 0xea07, 0x08a6, 0x5e96, 0x0ae2, 0x07c6, 0x37b6, 0xd70c, -0xb092, 0xfe7d, 0xf21a, 0xcad9, 0x34d2, 0x36e9, 0xf083, 0x37da, 0x22a5, 0xbc01, -0xdc00, 0x1395, 0xd553, 0xe5e3, 0x3bac, 0xfd08, 0xfe92, 0x3f5c, 0xee23, 0xbc45, -0x0d39, 0x0a9c, 0xc61a, 0x146f, 0x2951, 0xdb39, 0x171e, 0x293d, 0xc2e7, 0xdd20, -0x32b9, 0xe330, 0xd7b9, 0x3cc5, 0xf7d9, 0xdcad, 0x311b, 0xf1df, 0xb0b8, 0x105b, -0x1a8c, 0xca51, 0x1be5, 0x2f80, 0xd616, 0x11ca, 0x2652, 0xbc4e, 0xcb96, 0x21a7, -0xe4b4, 0xe253, 0x4487, 0x0196, 0xe674, 0x3516, 0xfb04, 0xb3bc, 0xfeb8, 0x1079, -0xc24e, 0x088e, 0x3298, 0xe80b, 0x14c1, 0x2ed3, 0xd1a8, 0xcf82, 0x2207, 0xee50, -0xcf02, 0x2dec, 0x08af, 0xe42a, 0x344d, 0x0fb2, 0xb971, 0xfa3f, 0x1df7, 0xd32e, -0x11cc, 0x3722, 0xda30, 0x07ac, 0x3d3f, 0xd7ab, 0xc34d, 0x271b, 0xfe76, 0xdbb3, -0x3d61, 0x18ed, 0xed9b, 0x3389, 0x0c14, 0xba7c, 0xf987, 0x187e, 0xcd50, 0x1066, -0x476b, 0xf480, 0x1314, 0x42bb, 0xe5fe, 0xc3be, 0x1389, 0xf39f, 0xd575, 0x3648, -0x1e47, 0xf2fa, 0x3e74, 0x234a, 0xbf4c, 0xf288, 0x221b, 0xc710, 0xfa3c, 0x5035, -0xfb9e, 0x0502, 0x44eb, 0xeee6, 0xc43e, 0x1d61, 0xfb1c, 0xc9de, 0x3c74, 0x2aae, -0xe190, 0x3674, 0x2619, 0xaff2, 0xe8b6, 0x2937, 0xc78c, 0xf5df, 0x540b, 0xfb05, -0x020b, 0x434b, 0xe0e6, 0xacc1, 0x10fc, 0xf91d, 0xbcee, 0x3592, 0x3566, 0xe36e, -0x337d, 0x30bf, 0xb32f, 0xd426, 0x2162, 0xc820, 0xe042, 0x4c56, 0xfe46, 0xf61f, -0x4a89, 0xf803, 0xad4d, 0x11a6, 0x0a6c, 0xb6d1, 0x253a, 0x3311, 0xd5a0, 0x2667, -0x3498, 0xb800, 0xd872, 0x2f83, 0xd41e, 0xe4e1, 0x5463, 0xf738, 0xea30, 0x492c, -0xf007, 0xaab2, 0x16ec, 0x11da, 0xc262, 0x2e37, 0x3e3b, 0xdd03, 0x22dd, 0x30e8, -0xb674, 0xd170, 0x2e2c, 0xdcd6, 0xe399, 0x56b9, 0x04f1, 0xea52, 0x4a44, 0xfd31, -0xa60d, 0x09bf, 0x162d, 0xbcc9, 0x1f55, 0x4352, 0xde68, 0x1cd9, 0x3c0d, 0xbf98, -0xc8d8, 0x2a1f, 0xdc64, 0xd503, 0x4d6c, 0x0785, 0xe7a8, 0x476e, 0xff01, 0xa5cd, -0x064f, 0x17bf, 0xbe55, 0x1800, 0x3b7b, 0xd4d9, 0x10f0, 0x3690, 0xbf8d, 0xc71e, -0x297a, 0xe393, 0xd729, 0x47fe, 0x0285, 0xda51, 0x391b, 0xfeb3, 0xa48e, 0xfbc3, -0x19a9, 0xc3a0, 0x108e, 0x3eae, 0xdebc, 0x0f12, 0x36a2, 0xc4c0, 0xbf91, 0x1e2f, -0xe5de, 0xd395, 0x4354, 0x10d5, 0xe319, 0x39c0, 0x0a87, 0xace4, 0xf7d2, 0x18b7, -0xc582, 0x0b6f, 0x3da5, 0xe290, 0x0dde, 0x3c3e, 0xcfe6, 0xc55b, 0x253d, 0xeca1, -0xcf94, 0x3b7a, 0x0f41, 0xdf74, 0x366b, 0x1370, 0xb644, 0xfb14, 0x1f1e, 0xc7c9, -0x07b4, 0x41e9, 0xe70d, 0x071d, 0x3d77, 0xdb66, 0xc478, 0x265f, 0xf916, 0xd180, -0x3ee6, 0x1beb, 0xdeb9, 0x31d9, 0x191a, 0xb479, 0xf52c, 0x2801, 0xccf7, 0x03d4, -0x4bd7, 0xedac, 0x016a, 0x3a65, 0xd6fc, 0xbe27, 0x2266, 0x07f4, 0xd0c6, 0x0dcf, -0x1281, 0x0eb0, 0x45e8, 0x1d9a, 0xd8e3, 0x05c1, 0x084a, 0xb5be, 0xdaec, 0x09a2, -0xe1b9, 0x11ee, 0x6086, 0x43d5, 0x17db, 0x2892, 0xfb50, 0xb60e, 0xc9f7, 0xc054, -0xc68d, 0x23e0, 0x2ffe, 0x062b, 0x4e99, 0x701f, 0xf80e, 0xd329, 0xff2c, 0xcb90, -0xa2d6, 0xed8c, 0x1910, 0x0699, 0x2f80, 0x3089, 0x1d1c, 0x374f, 0x03b2, 0xc14c, -0xd8b6, 0xfb3d, 0xd617, 0xe1a7, 0x22a2, 0x2021, 0x1a55, 0x1dcb, 0x2025, 0x150c, -0x0753, 0xe11c, 0xb5ad, 0xeb4f, 0xe450, 0xcc01, 0x1b1d, 0x3faa, 0x18aa, 0x0e6d, -0x4970, 0x17e5, 0xcba3, 0xd80b, 0xbb23, 0xc5d9, 0xe755, 0xf01c, 0x158e, 0x5028, -0x3e7d, 0xfcdb, 0x3482, 0x21eb, 0xbae5, 0xbfbe, 0xd2fb, 0xcfc4, 0xd821, 0x0aca, -0x27bb, 0x3924, 0x3d1e, 0x0e86, 0x271a, 0x205b, 0xd16c, 0xaf53, 0xc9df, 0xe377, -0xce6f, 0xfa21, 0x34f1, 0x4083, 0x3410, 0x259d, 0x319d, 0x06b6, 0xd9dc, 0xb750, -0xb2df, 0xde42, 0xd8e4, 0xfe96, 0x4970, 0x54f6, 0x25ba, 0x2520, 0x3c2e, 0xedea, -0xc061, 0xba0d, 0xba48, 0xde9c, 0xeb84, 0x0af2, 0x401e, 0x56b2, 0x1aa5, 0x0f66, -0x36cf, 0xe844, 0xb80e, 0xc1dd, 0xc246, 0xcece, 0xe9fe, 0x177a, 0x32d2, 0x4547, -0x1818, 0x0c52, 0x30b6, 0xec12, 0xaf1a, 0xb2f2, 0xcfa8, 0xd2b1, 0xdf9e, 0x2116, -0x3ab2, 0x35ab, 0x1b48, 0x247c, 0x25e1, 0xdedd, 0xb1e5, 0xaf2b, 0xdb4a, 0xe17b, -0xdfc7, 0x27da, 0x4f71, 0x34be, 0x0ed1, 0x2d58, 0x1ef5, 0xd091, 0xc1bb, 0xbe47, -0xd524, 0xeaee, 0xf469, 0x2112, 0x4cf4, 0x3d3e, 0x0aff, 0x304c, 0x281a, 0xcdc7, -0xbbed, 0xd088, 0xe04a, 0xdeea, 0xfee9, 0x2f94, 0x47fc, 0x3dff, 0x1a27, 0x31e9, -0x1deb, 0xd894, 0xbec6, 0xc6e8, 0xe5fc, 0xe340, 0x014d, 0x3cd1, 0x4e2f, 0x32bd, -0x1d0c, 0x372e, 0x0af1, 0xce88, 0xc502, 0xc97d, 0xe495, 0xeb9c, 0x0798, 0x374a, -0x4e4d, 0x2a7e, 0x16b3, 0x3ddd, 0x08ed, 0xc949, 0xc5ee, 0xce08, 0xdf28, 0xe8b7, -0x0fe9, 0x3689, 0x490a, 0x2817, 0x1714, 0x38c1, 0x0109, 0xc527, 0xc1af, 0xd087, -0xdced, 0xe41e, 0x12dc, 0x3476, 0x3cd2, 0x201b, 0x1cbb, 0x2e40, 0xf269, 0xc5fe, -0xb844, 0xcaac, 0xdf7f, 0xe02f, 0x0f09, 0x373a, 0x383b, 0x13eb, 0x21ef, 0x2cbc, -0xe41a, 0xc568, 0xb82e, 0xc319, 0xdca2, 0xe63b, 0x0f93, 0x3ca2, 0x4202, 0x11af, -0x2392, 0x2ac6, 0xd906, 0xb7d3, 0xb715, 0xce35, 0xdb89, 0xef49, 0x2213, 0x3ff6, -0x3f4b, 0x14d9, 0x2398, 0x1f27, 0xd7ab, 0xb866, 0xb50a, 0xd74b, 0xe11e, 0xf58b, -0x2ece, 0x467f, 0x3963, 0x1933, 0x2caa, 0x1426, 0xd5d8, 0xbe81, 0xb620, 0xdf76, -0xe789, 0xf65e, 0x349f, 0x505c, 0x3366, 0x16ea, 0x3646, 0x0f5a, 0xd18a, 0xc1b2, -0xb7f7, 0xdd2a, 0xeb2f, 0xfd79, 0x30f5, 0x516e, 0x31d6, 0x12af, 0x388a, 0x0be7, -0xca82, 0xbdf0, 0xbc89, 0xda3c, 0xe687, 0x06e8, 0x3695, 0x5204, 0x3323, 0x158c, -0x3447, 0x05f1, 0xca02, 0xb88d, 0xc1cf, 0xe381, 0xea5c, 0x110d, 0x40c6, 0x4e27, -0x2a69, 0x1e8c, 0x30b5, 0xf349, 0xc5eb, 0xb6f0, 0xc440, 0xe7cd, 0xebf2, 0x1281, -0x4308, 0x4ce7, 0x1f25, 0x1bf5, 0x2d5c, 0xe897, 0xc291, 0xb85f, 0xc6be, 0xe556, -0xf257, 0x1cc0, 0x442d, 0x4d14, 0x200a, 0x1f36, 0x26a6, 0xdf96, 0xbef2, 0xb898, -0xd0e1, 0xe9a1, 0xf513, 0x2536, 0x486a, 0x4666, 0x1bd4, 0x216e, 0x1a61, 0xd966, -0xbfd6, 0xb46f, 0xd414, 0xeb0f, 0xf5c1, 0x2917, 0x4b03, 0x3b01, 0x120a, 0x279d, -0x127b, 0xce60, 0xc0b2, 0xbaa1, 0xd93a, 0xea16, 0xf79d, 0x29e1, 0x4e28, 0x3952, -0x0c9b, 0x2918, 0x0da3, 0xc8e3, 0xbf5d, 0xbd5b, 0xd7be, 0xe6b5, 0xff78, 0x2bfe, -0x474e, 0x30ea, 0x0afb, 0x2996, 0x09da, 0xc618, 0xb66b, 0xc002, 0xde8f, 0xe009, -0x0068, 0x34b1, 0x479e, 0x290d, 0x1057, 0x2cf4, 0x0037, 0xc901, 0xba19, 0xc161, -0xe4c1, 0xe626, 0x06b7, 0x3bce, 0x46e6, 0x1fc6, 0x1c43, 0x37dd, 0xf4a3, 0xc6e9, -0xc0da, 0xc57a, 0xe45d, 0xe96e, 0x0b68, 0x3e09, 0x4c53, 0x1c9e, 0x1978, 0x350c, -0xec82, 0xc2fd, 0xc069, 0xc683, 0xdf64, 0xee42, 0x1619, 0x39da, 0x4685, 0x1dc8, -0x1c78, 0x2de4, 0xe52f, 0xbb56, 0xb88c, 0xd10f, 0xe424, 0xed39, 0x226e, 0x45c9, -0x4373, 0x1798, 0x1d16, 0x2213, 0xe050, 0xbf9c, 0xb315, 0xd32f, 0xe7c5, 0xec31, -0x23d2, 0x48dd, 0x38f4, 0x0de0, 0x25fc, 0x1996, 0xcef8, 0xbc82, 0xb55a, 0xd59c, -0xe89f, 0xefe0, 0x23a4, 0x4993, 0x37a4, 0x0c32, 0x2be5, 0x17d1, 0xcddd, 0xc07a, -0xb8e9, 0xd329, 0xe54b, 0xfb4e, 0x2cfc, 0x4d3a, 0x3bad, 0x0fee, 0x2b2b, 0x1047, -0xc712, 0xb4f7, 0xbbf0, 0xdc5f, 0xe2f3, 0xfef6, 0x224e, 0x4c36, 0x6c76, 0x2b5c, -0xfa57, 0xe594, 0xbdb1, 0x8b0a, 0xa7ca, 0x0160, 0x0786, 0x400c, 0x8424, 0x5796, -0x1be9, 0xf540, 0xbdf9, 0x9768, 0xc4df, 0xbd3d, 0xdd3d, 0x63d3, 0x4e65, 0x1fea, -0x4e57, 0x38bb, 0xd91b, 0xcd56, 0xe3ad, 0xbffd, 0xfbd6, 0x0607, 0xdb8e, 0x3ccb, -0x4192, 0xd6b0, 0xf73b, 0x42bf, 0xeff1, 0xe330, 0x3dbd, 0xfa84, 0xdccf, 0x13df, -0xde74, 0xb718, 0x0b45, 0x28d2, 0xfb25, 0x3fa0, 0x4276, 0xedb2, 0x1335, 0x0954, -0xadc9, 0xc6fc, 0x1522, 0xf53c, 0xfe45, 0x4b87, 0x18e7, 0x04a7, 0x3412, 0xee3f, -0xb321, 0xfd48, 0x04c9, 0xc508, 0x15a8, 0x372c, 0xeb2f, 0x165c, 0x2ca0, 0xce55, -0xd34d, 0x1c95, 0xe2fd, 0xdd7e, 0x3294, 0xf905, 0xe452, 0x34a4, 0x04d0, 0xbdd7, -0x0a01, 0x1d14, 0xce45, 0x0c02, 0x2888, 0xd716, 0x03dc, 0x2b4a, 0xd5cd, 0xd68c, -0x2ef2, 0xfc10, 0xda6f, 0x316f, 0x0773, 0xda8e, 0x2215, 0x0507, 0xb6f3, 0xfe70, -0x2a5d, 0xd6c8, 0x0b84, 0x4188, 0xe8c4, 0xfdd0, 0x2ec5, 0xd794, 0xc3a2, 0x2279, -0xf779, 0xd09d, 0x423d, 0x27fc, 0xe6f8, 0x2f40, 0x1b5a, 0xbc8b, 0xf157, 0x1fb4, -0xcaa0, 0xfa3a, 0x4232, 0xf922, 0x0ecb, 0x3f09, 0xe3ee, 0xc318, 0x1cef, 0xfdc1, -0xca4c, 0x2a22, 0x20f1, 0xe87d, 0x279c, 0x1afc, 0xbe72, 0xe720, 0x2220, 0xd1d4, -0xf6a7, 0x4e3e, 0xf5f4, 0xecca, 0x3b54, 0xf567, 0xb06f, 0x0a45, 0x0b98, 0xc973, -0x28f0, 0x2f21, 0xdfeb, 0x24a0, 0x2810, 0xaef4, 0xd207, 0x2ab3, 0xcd51, 0xdc82, -0x4ca3, 0xfdde, 0xef82, 0x40ab, 0xf143, 0xac33, 0x082b, 0xfdac, 0xb9b7, 0x28f3, -0x2b71, 0xd054, 0x2723, 0x3651, 0xb6cf, 0xd176, 0x2ba8, 0xd75d, 0xdb92, 0x450f, -0xfd8f, 0xec9c, 0x3e23, 0xf598, 0xaf02, 0x111a, 0x135a, 0xbd2d, 0x2334, 0x3d0a, -0xd3d8, 0x1768, 0x3bb0, 0xbab9, 0xc676, 0x311a, 0xe06f, 0xd889, 0x5018, 0x070b, -0xe756, 0x4942, 0xfd09, 0x9d71, 0x0bcc, 0x1bed, 0xb4ce, 0x1c66, 0x47ec, 0xdc5f, -0x1b74, 0x4238, 0xc481, 0xcf1b, 0x32f5, 0xe1ce, 0xda85, 0x4e4d, 0x0437, 0xe474, -0x4777, 0x07ed, 0xaff9, 0x127d, 0x24cd, 0xc370, 0x199d, 0x3e29, 0xd8bf, 0x14fd, -0x3d8b, 0xc8ea, 0xd1b6, 0x3766, 0xecd3, 0xda6f, 0x4fa7, 0x0ce7, 0xdddd, 0x4019, -0x0c05, 0xaedb, 0x0dbc, 0x2b4c, 0xcdd3, 0x1ddc, 0x470d, 0xe283, 0x1764, 0x40d4, -0xcabb, 0xcd66, 0x3585, 0xf1c2, 0xdda9, 0x4ffb, 0x11e4, 0xe28a, 0x415d, 0x12d2, -0xb486, 0x055e, 0x1fd4, 0xc66e, 0x12ca, 0x417e, 0xe4e2, 0x1229, 0x3e2a, 0xd10c, -0xc800, 0x29e0, 0xed4e, 0xd10c, 0x3fcc, 0x11a3, 0xe1f9, 0x3ad7, 0x16ca, 0xb727, -0x0155, 0x2400, 0xc8c6, 0x0c22, 0x40bf, 0xe1dc, 0x06e9, 0x3e89, 0xd924, 0xc59a, -0x27a2, 0xf22c, 0xcfad, 0x3f51, 0x14cd, 0xda51, 0x2f15, 0x1235, 0xae68, 0xedef, -0x1983, 0xc602, 0x06d9, 0x46e6, 0xe9de, 0x01cd, 0x3928, 0xd470, 0xb512, 0x15ff, -0xec31, 0xc9cd, 0x3f78, 0x243a, 0xe15e, 0x29ed, 0x1245, 0xaba1, 0xe5e9, 0x199e, -0xc296, 0xfe39, 0x4ac5, 0xeb5f, 0xfa56, 0x3c11, 0xd94f, 0xae50, 0x1511, 0xf001, -0xbde3, 0x36c2, 0x230d, 0xd7fe, 0x2c17, 0x1e3a, 0xaa06, 0xe31f, 0x226e, 0xc144, -0xf626, 0x4f4e, 0xeb1e, 0xf4dd, 0x3e8c, 0xdc0a, 0xaf47, 0x1e56, 0xfed8, 0xc48e, -0x3d56, 0x2b0f, 0xd682, 0x2918, 0x1dec, 0xa955, 0xe5bb, 0x2b6b, 0xc9b8, 0xfa77, -0x56f8, 0xf481, 0xfb61, 0x4479, 0xdf2e, 0xabca, 0x1c70, 0xffe7, 0xbc88, 0x3a59, -0x3826, 0xe054, 0x2f4b, 0x2c11, 0xb1dd, 0xe03e, 0x2b29, 0xc998, 0xf18d, 0x59ee, -0xf7ac, 0xf73d, 0x4d8e, 0xed67, 0xb1d8, 0x21a9, 0x1848, 0xccda, 0x07a8, 0xffcd, -0xfa23, 0x5aea, 0x3797, 0xd62f, 0x0ab0, 0x245e, 0xb225, 0xc27c, 0x09d2, 0xd863, -0xfe56, 0x5bb6, 0x4ddb, 0x2aa0, 0x3bda, 0x0b4a, 0xc172, 0xdcc2, 0xc178, 0xb04a, -0x211f, 0x3a69, 0xf99a, 0x3316, 0x7dfa, 0x1afe, 0xd954, 0x046d, 0xdf49, 0xb051, -0xdb3e, 0x09de, 0x0f9f, 0x347e, 0x2f84, 0x0af2, 0x3895, 0x1ade, 0xc5b6, 0xd468, -0xfe63, 0xe6d0, 0xddae, 0x14b5, 0x175e, 0x16c3, 0x1fae, 0x122e, 0x1fcb, 0x16f5, -0xef7f, 0xbe99, 0xdd8a, 0xf61b, 0xc6ce, 0x019a, 0x43c3, 0x2909, 0x1168, 0x39ad, -0x2f76, 0xde14, 0xddd2, 0xc963, 0xbd2a, 0xea45, 0xea62, 0x0266, 0x4616, 0x4e1c, -0x015e, 0x18de, 0x36f6, 0xcf20, 0xb656, 0xd210, 0xd017, 0xd8b3, 0xfb2f, 0x1950, -0x2b27, 0x3c69, 0x095e, 0x0ec5, 0x2d9c, 0xe85e, 0xb75b, 0xc4ac, 0xe1a3, 0xcfe0, -0xdf2a, 0x1a10, 0x3183, 0x376b, 0x1d4c, 0x237d, 0x185c, 0xe4f3, 0xbf7b, 0xab18, -0xcfc2, 0xd346, 0xe11c, 0x2903, 0x45ea, 0x24aa, 0x102b, 0x353d, 0x080f, 0xc677, -0xbdeb, 0xb32e, 0xd477, 0xe331, 0xef66, 0x2325, 0x4c5c, 0x27b3, 0xfaf5, 0x3106, -0x1252, 0xc709, 0xca81, 0xcbe5, 0xd04d, 0xdd4e, 0xfd3c, 0x1a5f, 0x3c21, 0x2935, -0x0252, 0x3750, 0x1e8e, 0xc8e4, 0xb83e, 0xd48f, 0xdc6e, 0xce04, 0x0585, 0x31bc, -0x360a, 0x2009, 0x14c2, 0x394e, 0x10a3, 0xc93d, 0xafa5, 0xd6b1, 0xef04, 0xcd94, -0x0467, 0x48be, 0x4051, 0x1437, 0x1fb5, 0x3cd3, 0xf79e, 0xcc8f, 0xc153, 0xcd1f, -0xeeb7, 0xe37c, 0x03cf, 0x4174, 0x4958, 0x1000, 0x1d3b, 0x4853, 0xf289, 0xbea9, -0xc9e2, 0xd4e7, 0xde7b, 0xe633, 0x1461, 0x3e75, 0x4911, 0x1b5a, 0x2106, 0x4059, -0xf467, 0xbf92, 0xc1f8, 0xd995, 0xdcf6, 0xe0ba, 0x1eb5, 0x4600, 0x4167, 0x1d25, -0x2ef9, 0x3639, 0xe56b, 0xc105, 0xc027, 0xd70a, 0xe1eb, 0xea01, 0x247e, 0x4c66, -0x3f10, 0x14c8, 0x3245, 0x3094, 0xdd32, 0xc132, 0xc147, 0xd9a1, 0xe18c, 0xeeb8, -0x2824, 0x4a69, 0x395c, 0x1015, 0x3040, 0x238d, 0xd48a, 0xc21b, 0xc53b, 0xdc6d, -0xe1ce, 0xf6ef, 0x2ad6, 0x46b7, 0x34da, 0x1114, 0x34eb, 0x1e8c, 0xd361, 0xbe8c, -0xc1c6, 0xe012, 0xdf71, 0xf81f, 0x3359, 0x4a06, 0x2d71, 0x1454, 0x38da, 0x0f58, -0xccf4, 0xbea1, 0xbbb5, 0xdb25, 0xe2c4, 0xfd77, 0x3627, 0x5121, 0x2c35, 0x15a0, -0x3989, 0x0018, 0xc03f, 0xbaf5, 0xc3cd, 0xe02b, 0xe6c9, 0x0e3d, 0x3eb5, 0x4d58, -0x26cb, 0x1318, 0x2fe0, 0xf891, 0xc27d, 0xb828, 0xc71e, 0xe21d, 0xe699, 0x15c5, -0x4058, 0x45ef, 0x2262, 0x1985, 0x28bc, 0xeca7, 0xc32c, 0xb7e4, 0xcfc1, 0xea07, -0xe4ac, 0x173a, 0x461c, 0x3eba, 0x15fa, 0x2087, 0x2703, 0xe29a, 0xc4b3, 0xb600, -0xc8f7, 0xe687, 0xe9ba, 0x15c4, 0x426b, 0x3e74, 0x0edd, 0x1f75, 0x23b8, 0xd925, -0xc0ab, 0xba1f, 0xcb2d, 0xe095, 0xeca2, 0x1990, 0x40e5, 0x3c5d, 0x1023, 0x24d2, -0x1ebd, 0xd280, 0xbab7, 0xba30, 0xd226, 0xe0d0, 0xf39a, 0x22d6, 0x4063, 0x34fc, -0x0f3b, 0x2825, 0x190f, 0xd310, 0xbcd9, 0xbd2e, 0xd80b, 0xdd5a, 0xf3ce, 0x2b22, -0x4783, 0x32fb, 0x13a4, 0x3361, 0x1484, 0xcf84, 0xc067, 0xc184, 0xdb6a, 0xe3e8, -0x0230, 0x3122, 0x4768, 0x320a, 0x16c1, 0x3427, 0x0aed, 0xc9bb, 0xba81, 0xc328, -0xe12c, 0xe1e3, 0x07e1, 0x3ec1, 0x4f67, 0x2ddc, 0x15f0, 0x2f32, 0xfe24, 0xc964, -0xbbfd, 0xc754, 0xe848, 0xe9ef, 0x1196, 0x41b3, 0x4b5f, 0x2760, 0x1f91, 0x35ce, -0xf3d5, 0xc722, 0xbfad, 0xcade, 0xe85a, 0xeaa5, 0x1660, 0x4809, 0x4c60, 0x1f11, -0x212f, 0x36b0, 0xefd1, 0xc764, 0xbc28, 0xc837, 0xe455, 0xec50, 0x1c88, 0x4b3c, -0x4de3, 0x2041, 0x28c6, 0x32d7, 0xe1ea, 0xbea7, 0xbd29, 0xd1a9, 0xe60c, 0xf02d, -0x2433, 0x4c51, 0x4811, 0x1816, 0x23ce, 0x292b, 0xdf35, 0xbcec, 0xb6b3, 0xd50d, -0xe49a, 0xee6a, 0x2b0c, 0x4b27, 0x39f9, 0x15f5, 0x29d8, 0x1859, 0xd36e, 0xc04c, -0xb5ab, 0xd4b0, 0xe461, 0xec0c, 0x2803, 0x4fb2, 0x371f, 0x0f49, 0x2de8, 0x1063, -0xc7dd, 0xbbcc, 0xb195, 0xcdad, 0xe2b5, 0xf6ed, 0x29d0, 0x4ac5, 0x31e4, 0x0aa9, -0x2acb, 0x0735, 0xbe72, 0xb39c, 0xb620, 0xd1d9, 0xdc5c, 0xfcdd, 0x307a, 0x46be, -0x2c7c, 0x0a2b, 0x22ab, 0xfca8, 0xc0ac, 0xafc4, 0xb815, 0xde74, 0xe13f, 0x0269, -0x370e, 0x4107, 0x21c4, 0x13c8, 0x26a3, 0xf061, 0xc3ac, 0xb5ad, 0xbbea, 0xe2b6, -0xe314, 0x03cd, 0x3a8a, 0x453e, 0x1c0b, 0x167a, 0x2afd, 0xe8ae, 0xc330, 0xbb1d, -0xbd71, 0xdff6, 0xea8c, 0x0cd6, 0x3cc1, 0x4b59, 0x1e08, 0x1762, 0x288a, 0xe327, -0xbcf5, 0xbc04, 0xcc41, 0xe3b8, 0xf214, 0x1f63, 0x40b7, 0x4556, 0x1932, 0x14e9, -0x22d4, 0xe5af, 0xc176, 0xbaf1, 0xd516, 0xeaa3, 0xed1a, 0x10a5, 0x4490, 0x6d0e, -0x387d, 0x06ad, 0xf979, 0xc011, 0x9e3c, 0xad92, 0xe582, 0x1234, 0x4531, 0x6a71, -0x4d3b, 0x3443, 0xfe14, 0xbf35, 0xb76f, 0xcbe7, 0xc8b4, 0xe9aa, 0x501f, 0x43d8, -0x1d18, 0x4560, 0x2e0d, 0xf4de, 0xea75, 0xe7b7, 0xd73f, 0x0fdc, 0x11cd, 0xd145, -0x29c3, 0x44d4, 0xdad6, 0xf4f0, 0x3e51, 0x092e, 0x07b6, 0x43ce, 0xfd5a, 0xf591, -0x1f19, 0xc2ea, 0xb2d7, 0x198e, 0x140f, 0xfa53, 0x5e12, 0x4564, 0xf1ae, 0x2e33, -0x0b49, 0xa4bb, 0xdaed, 0x1485, 0xdc90, 0x0cbf, 0x4f0d, 0x0854, 0x15b5, 0x3b75, -0xe6b5, 0xbe4e, 0x0981, 0xfc23, 0xc6c6, 0x22a2, 0x2984, 0xf1db, 0x27f9, 0x1ab0, -0xc60e, 0xe49e, 0x21a8, 0xd681, 0xe953, 0x41f4, 0xf337, 0xeb9d, 0x3560, 0xf514, -0xbd12, 0x135a, 0x1144, 0xc99f, 0x21e0, 0x2271, 0xd155, 0x1a35, 0x25a3, 0xbec7, -0xdc7d, 0x31ed, 0xe802, 0xe46d, 0x3ef6, 0xfc72, 0xeb7d, 0x2fc5, 0xecf1, 0xb132, -0x0d6d, 0x171d, 0xcaf3, 0x20be, 0x36cd, 0xdeff, 0x1430, 0x2c97, 0xc49c, 0xcab8, -0x247c, 0xe2b5, 0xd3f1, 0x3d93, 0x0c22, 0xee37, 0x3907, 0x01ea, 0xb32c, 0x07e5, -0x153f, 0xb7d0, 0x0a61, 0x333d, 0xdb8a, 0x1138, 0x3892, 0xcfca, 0xccd1, 0x2831, -0xeb12, 0xd73f, 0x357e, 0xfe1d, 0xe21b, 0x300a, 0xfded, 0xaf91, 0xffaf, 0x1ba1, -0xc5b1, 0x0c52, 0x3c73, 0xe33f, 0xfac8, 0x2338, 0xd7bc, 0xc7f4, 0x0f99, 0xe739, -0xd9e0, 0x3980, 0x0e6d, 0xe382, 0x335e, 0x15f9, 0xae82, 0xe698, 0x1c86, 0xca1d, -0xf6f1, 0x34d2, 0xf14d, 0x0fec, 0x3c9a, 0xdef1, 0xc8df, 0x20f3, 0xea68, 0xc50a, -0x33ef, 0x1185, 0xd7d4, 0x2ebc, 0x2178, 0xc1c1, 0xf72b, 0x2354, 0xd2eb, 0x0168, -0x30db, 0xe0a6, 0x05a6, 0x3bad, 0xdc09, 0xc45f, 0x276d, 0xfd11, 0xcf0a, 0x363e, -0x204b, 0xe4d0, 0x2851, 0x199c, 0xbc3c, 0xe9df, 0x1c38, 0xcf05, 0x03b3, 0x4c0e, -0xf6ee, 0x068d, 0x44a0, 0xe3e0, 0xb163, 0x17fa, 0xfdee, 0xc709, 0x37cd, 0x2e63, -0xea1c, 0x3531, 0x2ca0, 0xbf9e, 0xeeec, 0x2b06, 0xc5f7, 0xf1c8, 0x5385, 0xfc84, -0x0002, 0x49cb, 0xf52b, 0xbfbf, 0x204d, 0x04c6, 0xc649, 0x35e9, 0x30b9, 0xe658, -0x31b2, 0x2cb7, 0xb96b, 0xe5a8, 0x2f24, 0xd410, 0xf6ab, 0x5771, 0x04b9, 0xfc36, -0x3ec2, 0xecd7, 0xb28a, 0x1904, 0x0954, 0xc24d, 0x3764, 0x3ade, 0xddf2, 0x29ce, -0x3445, 0xb4d5, 0xd352, 0x2d79, 0xd037, 0xe09a, 0x535a, 0x01a5, 0xf095, 0x48ef, -0xf767, 0xa8aa, 0x11b3, 0x097b, 0xb15c, 0x2a36, 0x3db4, 0xd6cd, 0x24b8, 0x3712, -0xb430, 0xcdb4, 0x2b60, 0xd3aa, 0xe09b, 0x53eb, 0xfc4a, 0xea6b, 0x4b2a, 0xf90e, -0xa8c8, 0x1124, 0x129b, 0xbaac, 0x269d, 0x4030, 0xda96, 0x20e1, 0x3a2e, 0xbd1c, -0xd0d8, 0x3158, 0xdd88, 0xdee5, 0x57dc, 0x0a22, 0xeb70, 0x4be8, 0x027e, 0xa602, -0x0680, 0x1714, 0xbfed, 0x242e, 0x47b1, 0xe011, 0x1d8e, 0x3eca, 0xc029, 0xc616, -0x2e06, 0xe28f, 0xd4aa, 0x4f9e, 0x0f06, 0xe649, 0x438d, 0x0564, 0xa6f1, 0x02f6, -0x1bd3, 0xc020, 0x18b7, 0x4204, 0xd71b, 0x0fc8, 0x3e52, 0xc2b8, 0xbf78, 0x2bd7, -0xe6d3, 0xce7b, 0x47d7, 0x0a5d, 0xd7d4, 0x39c7, 0x074e, 0xa273, 0xfc77, 0x1fef, -0xbcf9, 0x0cec, 0x426a, 0xd4f2, 0x044f, 0x3d93, 0xc6ea, 0xbcdf, 0x2bd1, 0xed0b, -0xce10, 0x43d0, 0x0ca2, 0xd5d2, 0x35c4, 0x0c15, 0xa646, 0xfa2d, 0x2097, 0xc0dd, -0x0c2b, 0x439b, 0xdc9c, 0x059f, 0x3b30, 0xca4a, 0xbbcb, 0x2337, 0xe7a3, 0xc717, -0x3dae, 0x1491, 0xdc09, 0x3229, 0x0f3e, 0xac38, 0xf62a, 0x25d7, 0xcda9, 0xe86a, -0x0ccd, 0xe87d, 0x2a51, 0x46ee, 0xea42, 0xe40d, 0x22b1, 0xd631, 0xa84b, 0xf868, -0xe4f9, 0xdc35, 0x395d, 0x50be, 0x1fd6, 0x25ac, 0x1e57, 0xc641, 0xc358, 0xd0f2, -0xac56, 0xf1aa, 0x385d, 0x08e0, 0x0c0c, 0x6c90, 0x3d9a, 0xd534, 0xf575, 0xf32f, -0xb660, 0xc715, 0x00c3, 0x060a, 0x1cc0, 0x3bee, 0x0fef, 0x2648, 0x390e, 0xe520, -0xcaa4, 0xfc07, 0xfa8c, 0xcfc3, 0xff3b, 0x2146, 0x0eaa, 0x22f7, 0x21eb, 0x22a5, -0x2b3f, 0x140f, 0xd035, 0xce0d, 0x018b, 0xcdfd, 0xe402, 0x4024, 0x35a0, 0x11b4, -0x30f7, 0x48c6, 0xfc36, 0xe429, 0xd9e4, 0xb819, 0xe9ae, 0xecf6, 0xeaac, 0x339b, -0x5af6, 0x18c2, 0x0a7d, 0x49f9, 0xfaf8, 0xba8d, 0xd5ae, 0xd0dc, 0xd43b, 0xee6d, -0x117b, 0x23d1, 0x46ee, 0x29ad, 0x0339, 0x3a96, 0x1314, 0xc110, 0xbad0, 0xd9cf, -0xd706, 0xcd74, 0x0d91, 0x315e, 0x3f9c, 0x359b, 0x2190, 0x2aef, 0x0433, 0xcdb2, -0xa574, 0xc711, 0xe12e, 0xcf40, 0x197f, 0x5324, 0x3d77, 0x20a5, 0x375c, 0x2d03, -0xe262, 0xca54, 0xb0b0, 0xc640, 0xed6e, 0xe3a9, 0x14a7, 0x559a, 0x4789, 0x0af5, -0x2c0d, 0x3078, 0xd574, 0xc8f1, 0xc60c, 0xc4a3, 0xddbb, 0xf434, 0x12bf, 0x3a4f, -0x46b5, 0x0de9, 0x28f8, 0x3a3e, 0xd862, 0xb36e, 0xc4b9, 0xd290, 0xcc9e, 0xf150, -0x28e5, 0x36b7, 0x3727, 0x1942, 0x296a, 0x1f3b, 0xd304, 0xaa50, 0xb7e0, 0xe064, -0xcd60, 0xe774, 0x36d2, 0x4354, 0x256f, 0x16b9, 0x32a9, 0x04e9, 0xc94b, 0xbd89, -0xb4e8, 0xde63, 0xe6b3, 0xefc2, 0x2c99, 0x4d30, 0x244c, 0x0dd9, 0x4013, 0x0a25, -0xbf81, 0xc647, 0xc8d3, 0xd098, 0xddd7, 0x0729, 0x2f46, 0x49fe, 0x3186, 0x11dd, -0x33c9, 0x0a1a, 0xc455, 0xb4fe, 0xcbf9, 0xe01f, 0xd9c3, 0x0d63, 0x3ca9, 0x40e4, -0x2597, 0x1f85, 0x2fee, 0xf6c7, 0xc763, 0xb733, 0xcbd2, 0xe734, 0xe337, 0x11ef, -0x4379, 0x4377, 0x1865, 0x216c, 0x32c8, 0xee0c, 0xca47, 0xc04a, 0xd076, 0xe70b, -0xebed, 0x16a9, 0x3f81, 0x44ae, 0x16f6, 0x2266, 0x31f0, 0xe6d6, 0xc30d, 0xc333, -0xd87e, 0xe495, 0xf14b, 0x1f91, 0x3ab4, 0x3a37, 0x1822, 0x291b, 0x2bcf, 0xea2c, -0xc762, 0xbf57, 0xdd08, 0xe181, 0xec7b, 0x28f2, 0x456d, 0x366d, 0x1d72, 0x3891, -0x2266, 0xe229, 0xcd55, 0xbe26, 0xdad8, 0xe6b2, 0xf1ad, 0x2a59, 0x4ce7, 0x346f, -0x18da, 0x3eb3, 0x1a5c, 0xd0e6, 0xc45c, 0xbfe1, 0xd4d3, 0xe11f, 0x014a, 0x2f81, -0x4863, 0x3408, 0x1268, 0x31f4, 0x0ec8, 0xca3c, 0xb9fc, 0xc1dc, 0xdd52, 0xe093, -0x05ff, 0x33c3, 0x43d7, 0x2da7, 0x1671, 0x2bf0, 0x0034, 0xc97d, 0xb0c3, 0xbe5e, -0xe43b, 0xdb68, 0x0387, 0x3ae6, 0x3ee7, 0x1b43, 0x174b, 0x2d76, 0xf26e, 0xc68d, -0xb289, 0xbb76, 0xe0fe, 0xde57, 0x0305, 0x3b0e, 0x44f7, 0x17e8, 0x1ae0, 0x2e9e, -0xe6b9, 0xc23e, 0xb5b3, 0xbe35, 0xde8a, 0xe55c, 0x0e04, 0x3e2d, 0x4749, 0x1891, -0x1cce, 0x2c46, 0xe31a, 0xbc10, 0xb2be, 0xc7d4, 0xe1b0, 0xec58, 0x1b5f, 0x42a4, -0x4577, 0x18af, 0x206d, 0x2610, 0xe0cf, 0xbee7, 0xb63b, 0xd3ec, 0xe4ab, 0xed6c, -0x253f, 0x4a99, 0x42a8, 0x18da, 0x2a90, 0x2130, 0xd967, 0xc013, 0xb623, 0xd3d0, -0xe7d4, 0xf7c7, 0x2d1b, 0x4df4, 0x3dfe, 0x18d3, 0x2e94, 0x12e1, 0xceb7, 0xbc8b, -0xb721, 0xd9e6, 0xe7b6, 0xfe42, 0x37c7, 0x5256, 0x3916, 0x14fa, 0x2b19, 0x0829, -0xcbbc, 0xbc11, 0xba4e, 0xe0c8, 0xec3c, 0x04ba, 0x39d7, 0x4f48, 0x314f, 0x1b2a, -0x320f, 0xfbd4, 0xc7ad, 0xbe46, 0xbcb0, 0xdfec, 0xea9d, 0x0a76, 0x3eae, 0x51ce, -0x28b8, 0x15c7, 0x32b1, 0xf736, 0xc436, 0xbbe2, 0xc2bd, 0xe357, 0xecf4, 0x10c4, -0x40f6, 0x524e, 0x25cd, 0x19ce, 0x301e, 0xec1e, 0xbc6a, 0xbace, 0xd1d8, 0xe825, -0xec23, 0x1b1b, 0x4400, 0x482a, 0x1bce, 0x1896, 0x260d, 0xe7f6, 0xc325, 0xb5e4, -0xd101, 0xeabf, 0xea0d, 0x1d52, 0x47b3, 0x3cf0, 0x1282, 0x235d, 0x2050, 0xd9ae, -0xc4d9, 0xb970, 0xd086, 0xe87d, 0xea86, 0x1b23, 0x48b1, 0x3c02, 0x0e92, 0x2cb2, -0x2472, 0xd2cb, 0xbff8, 0xbc43, 0xce22, 0xe2d3, 0xf745, 0x2364, 0x47bb, 0x3e11, -0x1209, 0x2f53, 0x1fb0, 0xcfac, 0xba0d, 0xbeea, 0xd8e3, 0xde1c, 0xf854, 0x2f24, -0x49ea, 0x387f, 0x14be, 0x2de7, 0x1304, 0xd01b, 0xb948, 0xbc56, 0xe0d1, 0xe484, -0xff93, 0x3655, 0x488a, 0x2bf5, 0x16ba, 0x3637, 0x07aa, 0xcf32, 0xc24d, 0xc063, -0xe449, 0xe713, 0x01e8, 0x3b25, 0x4f83, 0x26c5, 0x1640, 0x3ab8, 0xff8c, 0xc83c, -0xbf7c, 0xc052, 0xdf32, 0xe807, 0x09ef, 0x390f, 0x4d01, 0x25f5, 0x19b1, 0x3685, -0xf201, 0xbb2e, 0xb561, 0xc59a, 0xdeac, 0xe81d, 0x110d, 0x2f0d, 0x5faf, 0x5bc4, -0x12fe, 0xf615, 0xda50, 0xa9ae, 0x886f, 0xcd18, 0x0718, 0x09f1, 0x5bb7, 0x7af7, -0x3e15, 0x0a73, 0xe799, 0xa715, 0x9c71, 0xc971, 0xb0a1, 0x07a7, 0x6f82, 0x3163, -0x2a82, 0x5398, 0x14c9, 0xbfc2, 0xd8b3, 0xd540, 0xc5ce, 0x0fda, 0xf099, 0xf1a7, -0x518e, 0x1c60, 0xcd84, 0x19da, 0x35b8, 0xd346, 0x03a1, 0x377b, 0xdf14, 0xefc5, -0x0c59, 0xc206, 0xc448, 0x2196, 0x11ee, 0xfe70, 0x4f48, 0x1fa8, 0xeb2d, 0x1d5b, -0xeaf2, 0x9f51, 0xdaef, 0x10e0, 0xe2b8, 0x140e, 0x4a7c, 0x0548, 0x11c6, 0x2b5c, -0xd063, 0xb9e9, 0x0c49, 0xee9f, 0xcd6b, 0x32da, 0x2204, 0xe702, 0x2c36, 0x195d, -0xbc4d, 0xef56, 0x1ea6, 0xd1a8, 0xfb24, 0x33f8, 0xe2fa, 0xffb5, 0x3ccd, 0xe4cb, -0xca25, 0x2563, 0x0355, 0xd2da, 0x2bb0, 0x137a, 0xd6ec, 0x2218, 0x1b95, 0xc3b7, -0xf854, 0x3722, 0xe6e8, 0xf671, 0x3596, 0xec18, 0xf030, 0x2d9c, 0xe6e7, 0xc2e9, -0x26d5, 0x1a49, 0xd733, 0x2bbd, 0x26a1, 0xdab2, 0x1ba0, 0x23f0, 0xc355, 0xe703, -0x2bce, 0xdc49, 0xf190, 0x496d, 0xfc6e, 0xf386, 0x3dfc, 0xf7e9, 0xbcff, 0x1444, -0x0996, 0xc579, 0x1fc6, 0x2a9c, 0xe722, 0x261f, 0x2af6, 0xc74c, 0xe3b8, 0x2a8b, -0xe105, 0xe8c4, 0x3bef, 0xfd9f, 0xefc2, 0x313f, 0xf888, 0xbeed, 0x0f0d, 0x10ba, -0xcf13, 0x2814, 0x3a0d, 0xdf51, 0x0dca, 0x2f8f, 0xccfa, 0xc831, 0x1d1f, 0xe940, -0xe8cf, 0x4a93, 0x0d52, 0xef83, 0x3c76, 0xfaba, 0xa5dd, 0x0126, 0x112f, 0xbdc7, -0x1a61, 0x422a, 0xe9fb, 0x1b1a, 0x3694, 0xc9c9, 0xce2b, 0x1ef2, 0xd732, 0xdc7b, -0x46da, 0xff7f, 0xe9fc, 0x46e1, 0x05ac, 0xaeb6, 0x0663, 0x159d, 0xc012, 0x1316, -0x34ba, 0xdd94, 0x12fd, 0x31f6, 0xc596, 0xcbff, 0x2ae2, 0xe4d5, 0xd6c1, 0x4927, -0x0b3d, 0xdd77, 0x3926, 0x07d1, 0xa2d2, 0xfb2e, 0x211d, 0xc317, 0x1769, 0x4b14, -0xe280, 0x1326, 0x411c, 0xc1e2, 0xbac5, 0x2cf6, 0xe603, 0xcb4b, 0x4ed8, 0x191b, -0xe401, 0x458d, 0x1545, 0xac87, 0x005f, 0x1e4a, 0xba9b, 0x0cc0, 0x467e, 0xe1cf, -0x11da, 0x478e, 0xd350, 0xc70d, 0x31c1, 0xf201, 0xce1e, 0x434c, 0x12d6, 0xdd0b, -0x3986, 0x1337, 0xaf6d, 0x006c, 0x2ca7, 0xc8ff, 0x0c23, 0x4bde, 0xe11d, 0x0318, -0x41ef, 0xd0e5, 0xbd29, 0x3042, 0xf8a0, 0xd014, 0x4ad2, 0x1b53, 0xda3d, 0x3aa3, -0x14be, 0xa4bb, 0xf7a1, 0x2b27, 0xc43a, 0x0948, 0x507e, 0xe296, 0x0297, 0x45db, -0xd510, 0xb990, 0x273a, 0xf430, 0xc750, 0x3f4c, 0x1a85, 0xdb6a, 0x3993, 0x1ab4, -0xadf3, 0xf5f6, 0x280d, 0xc5fc, 0xfe8a, 0x4668, 0xe58d, 0x011c, 0x457a, 0xdfc7, -0xbebe, 0x255e, 0xfae1, 0xcb02, 0x3a3a, 0x1b49, 0xd635, 0x2c90, 0x1a6d, 0xb0f1, -0xf0b7, 0x2851, 0xcb11, 0xfd3b, 0x4815, 0xe902, 0xf73a, 0x3af3, 0xde3a, 0xb633, -0x1a27, 0xfae7, 0xc8e7, 0x3373, 0x1efa, 0xdab3, 0x2af8, 0x1f54, 0xb3a4, 0xe5bd, -0x2010, 0xc657, 0xef33, 0x4332, 0xf32a, 0xf8bc, 0x3a43, 0xe716, 0xb380, 0x1025, -0xf94b, 0xbff8, 0x2cbe, 0x2722, 0xd958, 0x2238, 0x24de, 0xb4e0, 0xd8e0, 0x219f, -0xcbf4, 0xec3e, 0x4cc4, 0xf5db, 0xee65, 0x3cb1, 0xe88f, 0xad6b, 0x15fb, 0x0312, -0xbe65, 0x3207, 0x3441, 0xd731, 0x1ee6, 0x2923, 0xb321, 0xd7af, 0x26e1, 0xce3a, -0xeb73, 0x52d6, 0xfb3a, 0xed11, 0x3fa2, 0xeb93, 0xa537, 0x0fde, 0x078b, 0xbcc7, -0x2dd2, 0x39bf, 0xde73, 0x2216, 0x2ba5, 0xb204, 0xd113, 0x2873, 0xd059, 0xe433, -0x5331, 0x00f5, 0xede6, 0x41c9, 0xf3f8, 0xaa8c, 0x0f24, 0x06be, 0xb5e6, 0x29e9, -0x39f4, 0xda5d, 0x25b6, 0x2b84, 0xb07f, 0xd942, 0x36fe, 0xe8ec, 0xcdd1, 0x1733, -0x0849, 0x1aa1, 0x4558, 0xfb48, 0xd3ef, 0x11bd, 0xef48, 0xb142, 0xf697, 0xfdea, -0xd64a, 0x32a6, 0x6fed, 0x25f8, 0x0b17, 0x2a5c, 0xdff3, 0xaef4, 0xd4ec, 0xbcba, -0xe25d, 0x44cb, 0x234b, 0x1321, 0x73ba, 0x4da9, 0xced4, 0xe817, 0x007f, 0xa908, -0xb5df, 0x1df6, 0x1875, 0x0e2c, 0x3ec1, 0x2fcd, 0x272d, 0x2290, 0xe25c, 0xc07e, -0xf134, 0xfb4d, 0xd6f2, 0x0ad3, 0x3447, 0x223c, 0x13f1, 0x2272, 0x269f, 0x025a, -0x0161, 0xd722, 0xd224, 0x0308, 0xde38, 0xef78, 0x3c18, 0x42ed, 0x0555, 0x290a, -0x5400, 0xe6be, 0xca2d, 0xdae9, 0xc68f, 0xd7d0, 0xf47c, 0x10ed, 0x3184, 0x5941, -0x1cf6, 0x0891, 0x3a35, 0xeb6f, 0xae39, 0xc817, 0xe6f7, 0xd6ef, 0xebb0, 0x3372, -0x35f1, 0x34dd, 0x1e90, 0x16f7, 0x21a1, 0xf074, 0xc287, 0xb8c4, 0xe82d, 0xe6eb, -0xdb90, 0x1e19, 0x40af, 0x3208, 0x1a9a, 0x320f, 0x1b9a, 0xdeff, 0xcf46, 0xb4a3, -0xcbd7, 0xdf68, 0xe59a, 0x22fe, 0x55b5, 0x3892, 0x0be2, 0x396b, 0x1a98, 0xc635, -0xc146, 0xc092, 0xd361, 0xe7eb, 0x0383, 0x2879, 0x4c6a, 0x3c0d, 0x05ca, 0x2976, -0x14a9, 0xc798, 0xc116, 0xd2d8, 0xdd50, 0xdcd3, 0x0b09, 0x2bce, 0x3653, 0x2ab8, -0x0a52, 0x2aa9, 0x14b7, 0xd401, 0xb890, 0xcc60, 0xea88, 0xd5e4, 0xfe7d, 0x383b, -0x3ade, 0x1b88, 0x1ad7, 0x3ed1, 0x075f, 0xcd9c, 0xbbc4, 0xcbe8, 0xeb85, 0xd822, -0xfbc3, 0x3e44, 0x459b, 0x10ea, 0x17ee, 0x43df, 0xf7f9, 0xc0a0, 0xc419, 0xcf1f, -0xdea4, 0xe05f, 0x0678, 0x330f, 0x42d4, 0x111c, 0x0fba, 0x3f57, 0xf9a8, 0xb669, -0xbe1b, 0xe146, 0xdd9a, 0xd4be, 0x11a3, 0x389d, 0x37d6, 0x13b2, 0x1c70, 0x3370, -0xf10c, 0xc063, 0xb6e6, 0xd48a, 0xdc66, 0xd809, 0x1789, 0x3f92, 0x3566, 0x0e0f, -0x231e, 0x2ea3, 0xde28, 0xbb31, 0xba09, 0xcf05, 0xd866, 0xdfc8, 0x18f1, 0x3ecd, -0x369b, 0x0a8f, 0x2386, 0x2af2, 0xda2a, 0xb79e, 0xb7d0, 0xd687, 0xde35, 0xe721, -0x22ba, 0x4574, 0x3572, 0x0dd3, 0x2e06, 0x263b, 0xd7ab, 0xbfc7, 0xc2f6, 0xdf1b, -0xe1c3, 0xf1d5, 0x2cb4, 0x4e1c, 0x37cd, 0x115d, 0x35cd, 0x1fe6, 0xd779, 0xc301, -0xc58e, 0xe72d, 0xe5ce, 0xf960, 0x335a, 0x4fb4, 0x357b, 0x1898, 0x426e, 0x1cc2, -0xd473, 0xc727, 0xc831, 0xe1fb, 0xe68f, 0x072e, 0x3da1, 0x58d4, 0x39ac, 0x1d25, -0x4338, 0x1401, 0xcf2b, 0xbee6, 0xca41, 0xe875, 0xe64f, 0x1316, 0x4982, 0x5236, -0x2f67, 0x2085, 0x38b8, 0xfd01, 0xc7c8, 0xba93, 0xc979, 0xebc7, 0xea26, 0x168d, -0x477d, 0x4817, 0x212b, 0x1fdd, 0x335a, 0xef3e, 0xc484, 0xb895, 0xc9b8, 0xec42, -0xe805, 0x136b, 0x4a61, 0x4971, 0x17b6, 0x1f6a, 0x2f97, 0xe4b1, 0xc086, 0xb999, -0xcac9, 0xe5fd, 0xee0c, 0x1807, 0x412f, 0x460f, 0x166d, 0x1f4c, 0x29b3, 0xdc64, -0xb965, 0xb861, 0xd211, 0xe147, 0xeb99, 0x2193, 0x450f, 0x3ce4, 0x113e, 0x1f63, -0x1c84, 0xd769, 0xb874, 0xb487, 0xd682, 0xe1c9, 0xed74, 0x24b0, 0x43a4, 0x33ba, -0x0e1c, 0x2413, 0x10f7, 0xcdd3, 0xb977, 0xb8d7, 0xdbc4, 0xe37c, 0xf175, 0x272e, -0x457d, 0x2d0a, 0x07d0, 0x297e, 0x0f41, 0xca51, 0xb9f7, 0xbc9a, 0xdaa7, 0xddfe, -0xf766, 0x2c64, 0x4532, 0x2d7b, 0x0dd9, 0x2cf4, 0x0c17, 0xc90f, 0xb4bc, 0xc07f, -0xe270, 0xdce1, 0xfc63, 0x371a, 0x4749, 0x2579, 0x1187, 0x2dc1, 0xff1f, 0xc7eb, -0xb7f0, 0xc150, 0xe209, 0xe0bb, 0x0562, 0x39a6, 0x419b, 0x18df, 0x11d0, 0x32b0, -0xf640, 0xc162, 0xbaa8, 0xc92a, 0xe355, 0xdf42, 0x07ce, 0x3de6, 0x485f, 0x1a8d, -0x15e0, 0x345d, 0xf2a7, 0xc2b4, 0xbc48, 0xcb43, 0xe331, 0xe771, 0x171d, 0x41c7, -0x46e8, 0x1e6a, 0x1d99, 0x3169, 0xea47, 0xbb34, 0xb612, 0xcfe5, 0xe372, 0xe4f4, -0x1dce, 0x4978, 0x4538, 0x1abb, 0x1ff9, 0x2726, 0xe2ee, 0xbf5a, 0xb642, 0xd6a7, -0xeb65, 0xe981, 0x26c2, 0x5246, 0x3d0f, 0x142e, 0x2f6c, 0x28fc, 0xda88, 0xc3aa, -0xbdbe, 0xd749, 0xeb54, 0xf1e0, 0x25cd, 0x526c, 0x41ba, 0x10bf, 0x2fe6, 0x2449, -0xd374, 0xbfc4, 0xbbe2, 0xd283, 0xe25c, 0xf99f, 0x2cef, 0x4ac7, 0x3ddf, 0x17d9, -0x3082, 0x1925, 0xce89, 0xb6a1, 0xbc50, 0xe283, 0xe474, 0xfd8d, 0x3bcc, 0x4e96, -0x33c3, 0x167a, 0x2e47, 0x0a43, 0xcef1, 0xbc29, 0xba3d, 0xe1a3, 0xe5f7, 0xfe7c, -0x39db, 0x4bea, 0x270e, 0x128b, 0x30de, 0xfb59, 0xc505, 0xbdab, 0xbd60, 0xe0c5, -0xe64a, 0x0171, 0x35c3, 0x47fc, 0x21b5, 0x11b5, 0x30fa, 0xf4fc, 0xc06e, 0xbaa3, -0xbc7a, 0xd83f, 0xe4e1, 0x0b66, 0x373d, 0x497a, 0x2421, 0x109c, 0x26f1, 0xecb6, -0xbadf, 0xb11f, 0xc45d, 0xdf59, 0xe4b2, 0x1641, 0x3f59, 0x42bc, 0x1c1c, 0x129c, -0x1bee, 0xe133, 0xbe64, 0xb1ad, 0xcc9f, 0xec32, 0xe986, 0x19ae, 0x44e5, 0x3a19, -0x0e88, 0x1ade, 0x1f2c, 0xdec4, 0xc3cc, 0xb2ef, 0xdaab, 0xfd08, 0xe6a7, 0x1123, -0x3704, 0x3898, 0x3ad4, 0x346f, 0xfe92, 0xd1d3, 0xcc04, 0x9cbd, 0xc135, 0x02eb, -0xf63b, 0x365b, 0x8b58, 0x58ad, 0x0415, 0x0488, 0xcf1c, 0x8e64, 0xb611, 0xc2c4, -0xeda1, 0x4ea8, 0x63da, 0x49bb, 0x50ec, 0x3618, 0xc859, 0xb818, 0xe010, 0xbc83, -0xd14a, 0x1ad8, 0x32a9, 0x4030, 0x4434, 0x0f51, 0xf80f, 0x1895, 0xeaf8, 0xc48d, -0x175a, 0x2702, 0xe895, 0x0fd2, 0x2756, 0xcf30, 0xdfad, 0x3a11, 0xfb80, 0xfa5f, -0x565f, 0x121d, 0xf290, 0x2352, 0xddf3, 0xa5f4, 0xfe06, 0x187b, 0xde96, 0x3a13, -0x5105, 0xf698, 0x255a, 0x212e, 0xb7a3, 0xc5a7, 0x10d7, 0xdeff, 0xe90b, 0x551a, -0x1708, 0xfd81, 0x42e8, 0xf9ae, 0xb328, 0xf8c8, 0x0cd4, 0xc910, 0x1398, 0x3cf8, -0xe89b, 0x1c9d, 0x36c1, 0xcb0b, 0xcca6, 0x2759, 0xf1e2, 0xd264, 0x3d80, 0x146d, -0xe372, 0x36c2, 0x0ab3, 0xb2ef, 0x0a0e, 0x2e96, 0xc7be, 0x0dcf, 0x4ba5, 0xdcd8, -0xff1f, 0x391f, 0xcf51, 0xc4c3, 0x314b, 0xfef3, 0xd680, 0x41c6, 0x156e, 0xdd3b, -0x2eeb, 0x0886, 0xa9c9, 0xf3a6, 0x247e, 0xc927, 0x069f, 0x4a37, 0xe895, 0x0061, -0x378e, 0xd6a1, 0xb348, 0x1688, 0xf810, 0xc498, 0x323f, 0x1fc5, 0xe066, 0x29b3, -0x139d, 0xadbb, 0xe71a, 0x2c44, 0xcae3, 0xe8e1, 0x3f89, 0xe822, 0xf034, 0x367a, -0xdf30, 0xb32c, 0x1aba, 0x0281, 0xcc1b, 0x36c4, 0x14ca, 0xc6d5, 0x2590, 0x1c08, -0xa351, 0xd7ce, 0x2a74, 0xd59f, 0xf3fa, 0x477e, 0xf4e0, 0xf8ff, 0x3121, 0xdc01, -0xb775, 0x150c, 0xfcd8, 0xcc0d, 0x38c8, 0x2ece, 0xe423, 0x2849, 0x29b5, 0xc302, -0xda74, 0x1f47, 0xdd2f, 0xf247, 0x3ab2, 0xf2d7, 0x006a, 0x4787, 0xf2b8, 0xbc9f, -0x1f1c, 0x0ac7, 0xbde9, 0x23df, 0x2b4d, 0xd869, 0x1cf2, 0x2e59, 0xc8ac, 0xe6ca, -0x2cef, 0xd907, 0xf197, 0x4b23, 0xf20c, 0xef15, 0x4469, 0xf156, 0xb2a9, 0x1bfd, -0x127b, 0xca28, 0x306d, 0x3438, 0xdf08, 0x20cf, 0x27a1, 0xb9c7, 0xd8d7, 0x2741, -0xd309, 0xe588, 0x5056, 0x03d5, 0xef96, 0x4207, 0xfd8d, 0xae5f, 0x03b5, 0x0589, -0xbd38, 0x23af, 0x3a76, 0xe095, 0x2023, 0x3839, 0xc165, 0xd4ca, 0x2de1, 0xd781, -0xe09b, 0x50bd, 0x0340, 0xea0c, 0x4022, 0xf840, 0xad2c, 0x1331, 0x12e3, 0xc260, -0x2f2a, 0x3b6c, 0xd12c, 0x18a4, 0x3197, 0xb77c, 0xd13d, 0x2bd2, 0xd972, 0xe616, -0x52eb, 0x041e, 0xeb26, 0x3bdc, 0xf119, 0xa2b2, 0x06d5, 0x1049, 0xbd97, 0x289f, -0x44ee, 0xdf14, 0x1d7f, 0x34ac, 0xb7bb, 0xc690, 0x278a, 0xda25, 0xdff9, 0x579a, -0x080c, 0xe6ec, 0x4374, 0xfcbd, 0xa5be, 0x078c, 0x146b, 0xbb5b, 0x2164, 0x4262, -0xdc47, 0x1e50, 0x39f8, 0xbce7, 0xcbb4, 0x2afe, 0xdc45, 0xdb5e, 0x5409, 0x0b3a, -0xe53c, 0x4358, 0x02ae, 0xa896, 0x0857, 0x1af8, 0xc23a, 0x2352, 0x496b, 0xdfb5, -0x197e, 0x3ce3, 0xbe54, 0xc506, 0x3012, 0xe677, 0xd704, 0x5217, 0x11ee, 0xe2e7, -0x3fe4, 0x06fa, 0xa5a3, 0xfdcd, 0x181f, 0xbb44, 0x1747, 0x4a1f, 0xdca9, 0x10d6, -0x4291, 0xc4a6, 0xbd25, 0x2a87, 0xe605, 0xcbf6, 0x4b38, 0x15fb, 0xe0ad, 0x3f35, -0x0d36, 0xa652, 0x0068, 0x234a, 0xbde1, 0x11e2, 0x4aeb, 0xdbe0, 0x0a9d, 0x4344, -0xcb41, 0xbfb5, 0x3005, 0xef5d, 0xcc1b, 0x497b, 0x1516, 0xd825, 0x3b8a, 0x1677, -0xabc7, 0xfeb9, 0x2dcb, 0xc484, 0x08d9, 0x4f69, 0xe275, 0x041d, 0x4846, 0xd81a, -0xc055, 0x3307, 0xfcca, 0xce29, 0x4a68, 0x20cb, 0xd8f3, 0x379a, 0x1b24, 0xaf02, -0xfaf5, 0x36a2, 0xdc0c, 0xf2c4, 0x1be5, 0xefab, 0x3121, 0x54a4, 0xf198, 0xe7b1, -0x2ba4, 0xe144, 0xad6e, 0x0105, 0xf0a8, 0xe331, 0x4379, 0x5911, 0x2529, 0x2cc9, -0x279d, 0xcce3, 0xc4aa, 0xd6d0, 0xaebe, 0xee7a, 0x3b83, 0x0e08, 0x0c23, 0x6c6b, -0x4249, 0xd2d0, 0xee99, 0xf0dc, 0xb1d9, 0xc315, 0x0097, 0x05b2, 0x198e, 0x3a21, -0x0a87, 0x19af, 0x3001, 0xda73, 0xbf3b, 0xf320, 0xf1e8, 0xce48, 0xfde9, 0x1c97, -0x092a, 0x1c03, 0x1996, 0x174f, 0x1e06, 0x0784, 0xc7d4, 0xc266, 0xf6c0, 0xcc3e, -0xdd41, 0x35c9, 0x3070, 0x0e9b, 0x2df6, 0x46cc, 0xf777, 0xdb3b, 0xd86d, 0xb2ad, -0xdad5, 0xea97, 0xeb13, 0x2dfd, 0x5bf5, 0x1d45, 0x0c80, 0x4c6b, 0xf9d2, 0xb332, -0xd3b1, 0xcca7, 0xc90a, 0xeeb9, 0x1637, 0x2142, 0x4501, 0x2b65, 0x034c, 0x35ee, -0x0df0, 0xbcaf, 0xb962, 0xda48, 0xd509, 0xd169, 0x125a, 0x2f7e, 0x3ce9, 0x31e9, -0x1f9f, 0x25c3, 0xf9ce, 0xc7fa, 0xa4bc, 0xc4e4, 0xde14, 0xd114, 0x1820, 0x4ec1, -0x3955, 0x1716, 0x2ffb, 0x23e1, 0xd401, 0xc118, 0xaea8, 0xc267, 0xe761, 0xe650, -0x166b, 0x5317, 0x4508, 0x02ef, 0x256f, 0x2a58, 0xc9bf, 0xbfb1, 0xc690, 0xc4c0, -0xdb5a, 0xfc3e, 0x1d56, 0x406f, 0x4672, 0x07f9, 0x258b, 0x3563, 0xd0af, 0xad4b, -0xc62c, 0xd7ec, 0xd118, 0xfacb, 0x32c8, 0x3cf8, 0x3893, 0x1827, 0x2a88, 0x2056, -0xd2e0, 0xa9a8, 0xbc95, 0xe82d, 0xd209, 0xed42, 0x4049, 0x4bca, 0x27a4, 0x17b5, -0x33c7, 0x048c, 0xc896, 0xbbc4, 0xb5e8, 0xde55, 0xe670, 0xf26e, 0x319d, 0x5284, -0x20bb, 0x0a37, 0x3f54, 0x0425, 0xb7b6, 0xbeac, 0xc4a7, 0xd10a, 0xdf90, 0x067a, -0x32d8, 0x4def, 0x29e9, 0x0de0, 0x33b8, 0x00f9, 0xbb53, 0xb44c, 0xca99, 0xdcb3, -0xdf0d, 0x140a, 0x4211, 0x47c0, 0x2741, 0x1ffe, 0x3026, 0xf2ee, 0xc44d, 0xb8c2, -0xcbde, 0xe86b, 0xed77, 0x1b4d, 0x47ee, 0x4766, 0x1ae9, 0x2386, 0x33e9, 0xea57, -0xc4ae, 0xc182, 0xd3ec, 0xeae1, 0xf2fa, 0x1c99, 0x46ce, 0x4849, 0x16e5, 0x2357, -0x2d0d, 0xe171, 0xc2b4, 0xc619, 0xdb43, 0xe861, 0xf96a, 0x2580, 0x41a1, 0x3fcc, -0x14f6, 0x245e, 0x2692, 0xe3d9, 0xc4b2, 0xc084, 0xdcfb, 0xe481, 0xf277, 0x26e8, -0x4453, 0x3677, 0x1401, 0x2eb5, 0x1c61, 0xda3a, 0xc536, 0xbbc2, 0xd95f, 0xe409, -0xf088, 0x24e3, 0x4a50, 0x36ef, 0x1343, 0x3794, 0x1bd7, 0xd0b1, 0xbf04, 0xc0c0, -0xd999, 0xe102, 0xfe57, 0x307b, 0x4c60, 0x3446, 0x110b, 0x34af, 0x1719, 0xd246, -0xbe92, 0xc661, 0xdf01, 0xde95, 0x04b9, 0x34ae, 0x44b2, 0x2c3e, 0x140f, 0x311d, -0x09e5, 0xcd57, 0xb673, 0xc4ea, 0xe8e6, 0xdfae, 0x02f2, 0x3c51, 0x460d, 0x2037, -0x160e, 0x33a4, 0xffd5, 0xd044, 0xbb77, 0xbff6, 0xe547, 0xe2d3, 0x02a5, 0x3927, -0x483e, 0x1e84, 0x18a8, 0x35a4, 0xf428, 0xc4b4, 0xb810, 0xbe31, 0xdf3f, 0xe3b9, -0x070a, 0x3a6e, 0x4a01, 0x1d3d, 0x19b7, 0x312f, 0xe9ed, 0xb9d2, 0xb185, 0xc27d, -0xdf74, 0xeaac, 0x163c, 0x40b2, 0x480f, 0x196b, 0x1a68, 0x2946, 0xe387, 0xbd44, -0xb687, 0xcdd3, 0xe1c0, 0xe73f, 0x19c6, 0x454e, 0x4471, 0x1517, 0x1f37, 0x2415, -0xde12, 0xbc28, 0xb193, 0xce92, 0xe199, 0xeb2a, 0x208d, 0x45c9, 0x3dfd, 0x140f, -0x2554, 0x1b8d, 0xd3e4, 0xb631, 0xaeee, 0xd2a0, 0xe032, 0xeefc, 0x2bad, 0x4d46, -0x3a27, 0x0f3b, 0x24c9, 0x111e, 0xcdbf, 0xb6b5, 0xb194, 0xd7c9, 0xe60a, 0xf93b, -0x2f30, 0x4968, 0x3246, 0x1306, 0x2d46, 0x06e7, 0xc785, 0xba49, 0xb9ab, 0xde3a, -0xe629, 0xff26, 0x3a02, 0x5456, 0x30f0, 0x10ea, 0x3149, 0x0578, 0xc92c, 0xbe07, -0xc00c, 0xe26f, 0xec57, 0x0aaf, 0x3ec0, 0x560f, 0x2fbd, 0x16da, 0x3543, 0xfe12, -0xc441, 0xbe1e, 0xce80, 0xec2a, 0xeeda, 0x1761, 0x467e, 0x531c, 0x2945, 0x16f3, -0x30b3, 0xfa85, 0xc82a, 0xb95b, 0xd0b9, 0xf0bf, 0xecf0, 0x1a23, 0x4acc, 0x48e2, -0x1c65, 0x1e4d, 0x2902, 0xe8e0, 0xc9c2, 0xbc2f, 0xd2c0, 0xf22e, 0xed1c, 0x1844, -0x4b01, 0x4776, 0x146e, 0x2125, 0x2832, 0xde1c, 0xc52b, 0xbd52, 0xcf76, 0xec76, -0xf496, 0x1c9f, 0x4726, 0x432c, 0x116f, 0x25e7, 0x2766, 0xd731, 0xbc99, 0xc162, -0xd7c6, 0xe12d, 0xf3c2, 0x27ac, 0x489f, 0x3fb7, 0x11f9, 0x23e3, 0x1dd1, 0xd9f9, -0xbc81, 0xbc41, 0xe051, 0xe6f9, 0xf6af, 0x2df2, 0x4613, 0x2fe6, 0x12b9, 0x303c, -0x120f, 0xd130, 0xc1da, 0xbc62, 0xdb80, 0xe279, 0xf4be, 0x2c52, 0x4660, 0x275e, -0x0d1c, 0x3149, 0x075f, 0xc931, 0xbf24, 0xbaf3, 0xd888, 0xe2cc, 0xfb8b, 0x2cb6, -0x4a52, 0x29ea, 0x0caa, 0x3097, 0xff78, 0xbdf9, 0xb45b, 0xc1cb, 0xdd4e, 0xe310, -0x068a, 0x24f2, 0x54ac, 0x60d2, 0x1650, 0xf4c6, 0xe059, 0xb014, 0x83b1, 0xbc91, -0x02f9, 0x0157, 0x4fca, 0x7cb3, 0x41bb, 0x0df7, 0xea9f, 0xace6, 0x957f, 0xc6c1, -0xb25c, 0xf25c, 0x6d4a, 0x3c23, 0x2274, 0x5314, 0x2754, 0xc59a, 0xd13d, 0xdf25, -0xc110, 0x097d, 0xfee9, 0xe7e9, 0x4a58, 0x3073, 0xd0cf, 0x0834, 0x3f47, 0xde37, -0xefad, 0x3de0, 0xef24, 0xe80f, 0x1519, 0xd4ff, 0xbae7, 0x160b, 0x1ed5, 0xf6f3, -0x4a32, 0x391f, 0xed02, 0x1a95, 0x0194, 0xa798, 0xcdb4, 0x1870, 0xed7d, 0x0805, -0x5609, 0x1649, 0x0c10, 0x37fb, 0xe698, 0xb602, 0x0ab1, 0x02bc, 0xc982, 0x29a0, -0x3592, 0xeb4c, 0x26a0, 0x2b39, 0xc51e, 0xe028, 0x25df, 0xdd3d, 0xeb89, 0x3c7d, -0xf25b, 0xf2a8, 0x40cd, 0xf67a, 0xbd91, 0x18e1, 0x1367, 0xcbf7, 0x1e2b, 0x2469, -0xd608, 0x16f8, 0x2a0b, 0xc927, 0xe2cc, 0x37b1, 0xf346, 0xe694, 0x382d, 0xf93e, -0xe10a, 0x2a89, 0xf6d1, 0xba9a, 0x1681, 0x2591, 0xd24e, 0x187c, 0x2fad, 0xd8f6, -0x0b46, 0x2ae5, 0xc8c2, 0xd38a, 0x2a7a, 0xe7b1, 0xdcb3, 0x3e95, 0x03d8, 0xe5e1, -0x3718, 0x0451, 0xb6fc, 0x05d7, 0x1636, 0xc589, 0x0c0d, 0x2d31, 0xe2a5, 0x145e, -0x2ff3, 0xd16c, 0xd748, 0x2961, 0xeee4, 0xd89a, 0x2f77, 0x0413, 0xe432, 0x2a18, -0x07e4, 0xbf90, 0xffac, 0x1a5c, 0xce43, 0x0eae, 0x3e2a, 0xe525, 0xfcdf, 0x3412, -0xe19f, 0xc0d0, 0x160c, 0xf679, 0xdaf7, 0x3d0f, 0x184f, 0xe643, 0x3314, 0x0d97, -0xa9d1, 0xf210, 0x1e09, 0xc374, 0x0591, 0x4995, 0xef24, 0x05bf, 0x3aa6, 0xdaf6, -0xc1a1, 0x198b, 0xe5e1, 0xce1f, 0x40dc, 0x134c, 0xddc5, 0x3b68, 0x1d73, 0xb2c0, -0xf385, 0x2228, 0xc6a9, 0xff0d, 0x4056, 0xea16, 0x071a, 0x3ca3, 0xd74b, 0xbcb1, -0x210f, 0xf2c1, 0xcb2c, 0x414d, 0x1f07, 0xd958, 0x2f24, 0x195a, 0xa747, 0xe84d, -0x2605, 0xc501, 0xff0e, 0x4e0a, 0xea48, 0x02a4, 0x46c5, 0xd723, 0xafda, 0x23af, -0xf6a4, 0xbc7c, 0x3c45, 0x26f8, 0xdc74, 0x367d, 0x2543, 0xb0bd, 0xed3e, 0x27e5, -0xc333, 0xf8e2, 0x4d51, 0xeb5f, 0xfefc, 0x4865, 0xe34b, 0xb937, 0x2748, 0x0266, -0xc562, 0x3a6b, 0x25b1, 0xd774, 0x2daa, 0x2313, 0xb311, 0xef4a, 0x32e8, 0xcf60, -0xf8b2, 0x51fb, 0xee07, 0xf368, 0x44ab, 0xe548, 0xb2da, 0x24f2, 0x07b3, 0xc446, -0x3bc4, 0x2db3, 0xd779, 0x2ee4, 0x281e, 0xace1, 0xe4c5, 0x335a, 0xceab, 0xf17b, -0x55c7, 0xf4d4, 0xf24d, 0x4603, 0xeb3d, 0xaf65, 0x1bbf, 0x08f3, 0xbf31, 0x300f, -0x30d1, 0xd9cf, 0x29ba, 0x2ead, 0xb5b6, 0xdd53, 0x2dff, 0xcf0d, 0xe2d2, 0x4b14, -0xf7cf, 0xf104, 0x48fe, 0xf5f9, 0xb102, 0x175c, 0x0bd9, 0xbcb2, 0x27b4, 0x336a, -0xd7be, 0x2088, 0x3408, 0xbf37, 0xdc20, 0x3264, 0xdb9f, 0xe60e, 0x5013, 0xffb1, -0xe856, 0x4281, 0xff01, 0xb10f, 0x1094, 0x176a, 0xc863, 0x243b, 0x390b, 0xdf6d, -0x1d95, 0x3900, 0xc65f, 0xd25c, 0x2c3a, 0xe187, 0xdbeb, 0x465f, 0x0986, 0xeb79, -0x4044, 0x0711, 0xb0da, 0x0496, 0x1513, 0xc287, 0x187b, 0x3c78, 0xe032, 0x1521, -0x3c5f, 0xccc3, 0xcce1, 0x2b96, 0xe4ca, 0xd2ba, 0x430a, 0x0aa2, 0xdffc, 0x3ad9, -0x0be5, 0xaea0, 0x03b6, 0x1ba6, 0xbbed, 0x0db5, 0x4113, 0xdc05, 0x05bb, 0x3a65, -0xcc55, 0xc14b, 0x25ec, 0xe783, 0xd1d2, 0x4965, 0x1616, 0xdbb4, 0x3263, 0x0a8b, -0xa569, 0xf7cf, 0x1f57, 0xc4d2, 0x1559, 0x517f, 0xea47, 0x0848, 0x3a1f, 0xc9f1, -0xbb1e, 0x266f, 0xea60, 0xcd1c, 0x4d59, 0x23a6, 0xe328, 0x3b46, 0x19d2, 0xabe2, -0xf47d, 0x1e1a, 0xbcd3, 0x09ed, 0x4fb3, 0xe964, 0x0dbc, 0x485b, 0xd3bb, 0xbbbe, -0x2722, 0xffc5, 0xce39, 0x0d09, 0xfe2c, 0x112d, 0x596c, 0x16f5, 0xd170, 0x12a7, -0x07ab, 0xa521, 0xd945, 0x0290, 0xcf7b, 0x0c60, 0x5af6, 0x3c64, 0x1c78, 0x2c17, -0xf082, 0xb62e, 0xcf0c, 0xac7d, 0xba75, 0x27ac, 0x23af, 0xf129, 0x473d, 0x6f3b, -0xefd4, 0xd0fc, 0xfcb5, 0xc5fa, 0xa532, 0xe2aa, 0x08ff, 0x0704, 0x304a, 0x21e6, -0x0f85, 0x38c1, 0x010f, 0xbcdf, 0xd894, 0xf8ab, 0xd8c7, 0xe36a, 0x1b7a, 0x178e, -0x1a72, 0x1741, 0x157f, 0x1dd4, 0x0dfe, 0xe47e, 0xbdd3, 0xf139, 0xe9ae, 0xc861, -0x198e, 0x432e, 0x1c93, 0x1246, 0x4ca3, 0x23d4, 0xd5a3, 0xdda1, 0xc097, 0xcd1a, -0xeddd, 0xed1a, 0x1738, 0x5658, 0x41b1, 0xfba0, 0x3319, 0x2a1d, 0xc048, 0xc0cf, -0xd583, 0xd4c9, 0xdb7a, 0x070a, 0x2588, 0x3798, 0x3aa9, 0x0add, 0x25af, 0x2337, -0xd4c2, 0xb504, 0xca8a, 0xe4dd, 0xd039, 0xf1df, 0x2bb9, 0x3c1d, 0x3426, 0x22ac, -0x331f, 0x0f10, 0xdc7d, 0xbbe1, 0xb47c, 0xdb63, 0xd984, 0xfcbd, 0x450f, 0x5431, -0x271a, 0x210b, 0x3c62, 0xf43d, 0xc565, 0xc201, 0xc114, 0xe4f6, 0xee9b, 0x085b, -0x3cf5, 0x5653, 0x1e82, 0x0d52, 0x38a8, 0xf608, 0xc456, 0xce8b, 0xcfd1, 0xda08, -0xf0f6, 0x16f4, 0x3014, 0x4610, 0x1a46, 0x0c35, 0x36d1, 0xfb60, 0xbc9c, 0xbcea, -0xdb0c, 0xda74, 0xdb6c, 0x17ce, 0x3715, 0x33b3, 0x13c8, 0x1e7d, 0x290c, 0xe55b, -0xb756, 0xb135, 0xdad6, 0xde70, 0xd336, 0x1782, 0x43a0, 0x29e5, 0x03f8, 0x2c8f, -0x2768, 0xd396, 0xc0e1, 0xbc23, 0xccce, 0xdf32, 0xe829, 0x16bf, 0x4610, 0x3567, -0x012e, 0x312c, 0x3059, 0xcf4c, 0xbc48, 0xcf7d, 0xdb0c, 0xd4f7, 0xefe3, 0x2327, -0x3f5e, 0x34bf, 0x11d9, 0x3885, 0x2a09, 0xd700, 0xbd59, 0xc753, 0xde26, 0xd765, -0xf612, 0x31cc, 0x45d3, 0x2d56, 0x17c3, 0x3e94, 0x16b7, 0xce82, 0xc389, 0xc8ab, -0xdd9d, 0xdd82, 0xfe36, 0x3550, 0x4d5b, 0x2a45, 0x1384, 0x3ff2, 0x0ef3, 0xc81d, -0xbe61, 0xcce9, 0xe4aa, 0xe0ab, 0x0699, 0x385e, 0x486b, 0x2294, 0x15f0, 0x3d85, -0x01db, 0xc686, 0xc116, 0xcff5, 0xe34d, 0xe14b, 0x10c9, 0x3f07, 0x466b, 0x1f0d, -0x1d05, 0x3ab5, 0xf8ef, 0xc8ce, 0xc05e, 0xd357, 0xe7d4, 0xe29f, 0x13df, 0x471a, -0x4a47, 0x1c4c, 0x297f, 0x3e3f, 0xed74, 0xc6f8, 0xbfdc, 0xccde, 0xe3d5, 0xeaa0, -0x19ee, 0x4b1b, 0x4d49, 0x1865, 0x2976, 0x37a0, 0xe1a2, 0xb9e8, 0xba35, 0xd299, -0xde2b, 0xecfc, 0x27c6, 0x4ae2, 0x4564, 0x19a4, 0x28b5, 0x2426, 0xd885, 0xbc0a, -0xb90e, 0xd777, 0xe284, 0xf34a, 0x2d9a, 0x4813, 0x38b9, 0x14ee, 0x2c67, 0x1894, -0xd324, 0xbc7e, 0xb3bc, 0xda55, 0xe3e2, 0xef0a, 0x2fd7, 0x4da0, 0x2e6a, 0x0ee2, -0x326e, 0x0fc1, 0xcb23, 0xbee7, 0xb82c, 0xdaac, 0xe70d, 0xf676, 0x2c96, 0x4efe, -0x3180, 0x0f59, 0x3430, 0x0900, 0xc464, 0xbdf3, 0xbfd4, 0xdc18, 0xe54f, 0x02ac, -0x346a, 0x4ca2, 0x2bdb, 0x0ba0, 0x2ca5, 0x00e4, 0xc0c2, 0xb4ae, 0xbea2, 0xdd3b, -0xe1b5, 0x05e5, 0x36cd, 0x455d, 0x228c, 0x0f39, 0x2721, 0xf06a, 0xbe3c, 0xb625, -0xc315, 0xe0db, 0xe130, 0x0824, 0x3af9, 0x4450, 0x1a04, 0x1254, 0x2a20, 0xeab7, -0xbec0, 0xb857, 0xc3f1, 0xdf5a, 0xe831, 0x122e, 0x3daa, 0x44fa, 0x18f6, 0x1739, -0x28bb, 0xe41d, 0xbbf3, 0xb89c, 0xcff6, 0xe5c1, 0xea00, 0x1c60, 0x45d5, 0x43ef, -0x1c06, 0x2434, 0x292a, 0xe39e, 0xc2cb, 0xbd71, 0xd5c4, 0xe95c, 0xf5d3, 0x2a36, -0x4b75, 0x403d, 0x1c75, 0x32bf, 0x27ef, 0xdda2, 0xcb76, 0xc7c5, 0xdb1a, 0xe84b, -0xf612, 0x2b74, 0x5112, 0x4137, 0x18a7, 0x3889, 0x2791, 0xd8ed, 0xc90a, 0xc6c8, -0xd83c, 0xe5cf, 0x01d1, 0x32e1, 0x4e08, 0x3e77, 0x1bcc, 0x39cc, 0x1bcb, 0xcf7c, -0xbfad, 0xc693, 0xe1af, 0xe44a, 0x0379, 0x3b80, 0x5122, 0x34da, 0x12cd, 0x2ff7, -0x0b3f, 0xcb7c, 0xb95e, 0xc0f4, 0xe555, 0xe1ce, 0x01a1, 0x3cc9, 0x475e, 0x2196, -0x156a, 0x33d5, 0xf97d, 0xc4c1, 0xb9ed, 0xbd90, 0xe1db, 0xe24b, 0x021d, 0x3cfa, -0x4dca, 0x1ea3, 0x12f7, 0x33e9, 0xf159, 0xbf15, 0xb984, 0xbdf4, 0xd9dc, 0xe483, -0x0d28, 0x3bb5, 0x4aee, 0x1fcf, 0x1792, 0x2e75, 0xe773, 0xb55d, 0xaeed, 0xc525, -0xdc07, 0xe07a, 0x162d, 0x403a, 0x41df, 0x18e6, 0x1816, 0x22ca, 0xe0d7, 0xba3f, -0xab7d, 0xc6d9, 0xe296, 0xe464, 0x1a6b, 0x45ec, 0x3cb4, 0x1203, 0x21d7, 0x1e19, -0xd553, 0xc042, 0xb44a, 0xca17, 0xe29f, 0xe893, 0x1a35, 0x457e, 0x3ca4, 0x0eee, -0x274f, 0x1dc0, 0xd010, 0xbe2a, 0xb43a, 0xca4c, 0xe2e4, 0xf448, 0x246d, 0x4965, -0x3fdb, 0x10f7, 0x25b8, 0x162e, 0xcca7, 0xb882, 0xb947, 0xd7a5, 0xe438, 0xfea1, -0x33b7, 0x4cfe, 0x3b14, 0x1175, 0x24b7, 0x0bf7, 0xcecd, 0xbc06, 0xbdfc, 0xe81e, -0xee24, 0x01b0, 0x3af8, 0x476e, 0x28b0, 0x20d9, 0x3412, 0xf8f1, 0xc8c9, 0xbcf1, -0xbe75, 0xed66, 0xf061, 0x0477, 0x2e04, 0x4a13, 0x58d9, 0x3473, 0x0a86, 0xde23, -0xc927, 0xa391, 0xa85a, 0xfd01, 0x01c0, 0x26a1, 0x8016, 0x6b60, 0x1f2e, 0x05f0, -0xdab1, 0x948b, 0xb8c2, 0xc47d, 0xcb07, 0x3e6c, 0x61b3, 0x38d1, 0x421e, 0x423b, -0xe147, 0xbac6, 0xe0e9, 0xbe22, 0xd9dd, 0x0b3a, 0x03de, 0x31f4, 0x40dc, 0xf8e0, -0xf398, 0x2cdd, 0xec3a, 0xc582, 0x25ea, 0x1c58, 0xd8cd, 0x0700, 0x13d5, 0xbffb, -0xdfbf, 0x2eeb, 0xf5a6, 0x0a90, 0x5506, 0x0dfc, 0xf5d4, 0x194f, 0xd0b1, 0xa469, -0xf944, 0x0659, 0xe225, 0x3e8d, 0x4455, 0xf804, 0x285d, 0x16e8, 0xac54, 0xcbe6, -0x0dc1, 0xcfa2, 0xef3a, 0x51ba, 0x0cea, 0x02d9, 0x4169, 0xec8e, 0xb42c, 0x04b3, -0xfdcb, 0xc5c1, 0x233b, 0x2fa0, 0xe530, 0x27ec, 0x2937, 0xc096, 0xdeaa, 0x2435, -0xe010, 0xe6f7, 0x3e0a, 0xfd91, 0xeb2e, 0x333b, 0xf30c, 0xb2be, 0x1250, 0x1fd9, -0xc7fa, 0x1877, 0x3b5d, 0xdbdb, 0x0644, 0x23bb, 0xbdc0, 0xcc54, 0x2f0c, 0xf1f3, -0xe57b, 0x48e5, 0x082c, 0xe598, 0x360e, 0xf80f, 0xa876, 0x0659, 0x1b42, 0xc57b, -0x1fb9, 0x48cb, 0xe657, 0x1591, 0x3682, 0xcb26, 0xccd4, 0x2692, 0xe8fa, 0xda38, -0x445f, 0x1220, 0xf0e0, 0x3d8f, 0x09d0, 0xb6bc, 0x00e1, 0x260a, 0xd188, 0x0576, -0x3935, 0xef31, 0x1179, 0x33e9, 0xd401, 0xcde0, 0x2d56, 0xfa21, 0xdbb0, 0x4a3c, -0x1c17, 0xdc92, 0x334e, 0x1ceb, 0xb17d, 0xebbf, 0x27e0, 0xd919, 0x0f7e, 0x4a4b, -0xf20c, 0x107b, 0x3a20, 0xcab0, 0xba0a, 0x24cb, 0xf1fa, 0xcaf2, 0x3f6a, 0x2005, -0xe495, 0x30ba, 0x16ef, 0xb7a7, 0xec01, 0x1401, 0xc9b7, 0x05b6, 0x393b, 0xe12d, -0x07bf, 0x44cb, 0xdee8, 0xbd85, 0x23f1, 0xfc20, 0xc5f2, 0x2bd6, 0x194b, 0xdfc0, -0x26e3, 0x160b, 0xba3e, 0xf25d, 0x2457, 0xcdc4, 0x004b, 0x4634, 0xe4dc, 0xf4a7, -0x3d04, 0xdcc3, 0xb397, 0x1fb0, 0x0021, 0xcbc7, 0x37a0, 0x223d, 0xdd2e, 0x2e4a, -0x1e22, 0xae9d, 0xea89, 0x28db, 0xc94f, 0xf4c9, 0x4a0c, 0xf565, 0xfefa, 0x4525, -0xee89, 0xbfb1, 0x1b8b, 0xfa5c, 0xc436, 0x2f51, 0x24ca, 0xdfcd, 0x2cf4, 0x2a31, -0xbd55, 0xe94e, 0x2b96, 0xd147, 0xee2f, 0x4235, 0xf2bf, 0xf601, 0x3b75, 0xe821, -0xb876, 0x1f6c, 0x056a, 0xc597, 0x378b, 0x2e60, 0xd377, 0x1e9d, 0x283c, 0xb892, -0xdee1, 0x2781, 0xd1f0, 0xf4ba, 0x554c, 0x0123, 0xf9be, 0x420b, 0xea52, 0xaa76, -0x121d, 0x04f0, 0xbdca, 0x333f, 0x4315, 0xe753, 0x27d8, 0x325a, 0xb873, 0xd272, -0x2388, 0xcf65, 0xe913, 0x57fe, 0x07f4, 0xf542, 0x4773, 0xf6c7, 0xab18, 0x11a2, -0x0c42, 0xb926, 0x2816, 0x3c96, 0xde7c, 0x28fb, 0x3ab1, 0xb843, 0xd1f6, 0x2e08, -0xd30e, 0xdd67, 0x552d, 0x04b1, 0xe6f1, 0x4408, 0xfac7, 0xa436, 0x0956, 0x1138, -0xb9e0, 0x267a, 0x42e3, 0xd676, 0x199d, 0x3443, 0xb086, 0xc200, 0x28e5, 0xda7a, -0xd827, 0x53d9, 0x0bab, 0xe3c1, 0x40a6, 0xfc98, 0xa29e, 0x018f, 0x1105, 0xb6e7, -0x1b43, 0x498c, 0xdd00, 0x1541, 0x4138, 0xc0de, 0xbf2e, 0x283d, 0xe09c, 0xce50, -0x4aa8, 0x1053, 0xdfdb, 0x3f0a, 0x0676, 0xa0c4, 0xfe21, 0x1b86, 0xb753, 0x10a7, -0x4958, 0xd934, 0x0821, 0x3f0a, 0xc34f, 0xba57, 0x2b9e, 0xe817, 0xc7b8, 0x46a9, -0x0faa, 0xd39d, 0x38e6, 0x0b67, 0x9f2e, 0xfa87, 0x2298, 0xbafd, 0x0a31, 0x466b, -0xd41d, 0xfd51, 0x3a2b, 0xc101, 0xb40d, 0x2b20, 0xef1f, 0xc9c0, 0x46b9, 0x10a8, -0xce9c, 0x3371, 0x097d, 0x9c55, 0xf5c4, 0x3090, 0xd2df, 0xecd4, 0x147e, 0xe806, -0x2e2d, 0x4ebd, 0xe525, 0xe179, 0x26a7, 0xd61d, 0xaa44, 0x0053, 0xe8dc, 0xe136, -0x46b6, 0x57fc, 0x24b5, 0x2da9, 0x235d, 0xcd31, 0xca81, 0xd1c7, 0xaf26, 0xfdb0, -0x3bad, 0x09ac, 0x1da0, 0x74cf, 0x3a9c, 0xd9e6, 0xf662, 0xf1b3, 0xb74e, 0xc78b, -0x079d, 0x1303, 0x25f7, 0x3f88, 0x14f4, 0x2459, 0x2c9b, 0xdd69, 0xc8da, 0xfb0c, -0xfc56, 0xd94a, 0x0b6d, 0x29c0, 0x150a, 0x22e5, 0x1d92, 0x18ef, 0x1cfc, 0x0c23, -0xcdc3, 0xcd7b, 0x0116, 0xd225, 0xea05, 0x3ecf, 0x321c, 0x114b, 0x3429, 0x4818, -0xf80f, 0xe0f6, 0xd86d, 0xb88f, 0xe34c, 0xec85, 0xf335, 0x37f0, 0x5dfb, 0x1c42, -0x11db, 0x4f23, 0xfc26, 0xba44, 0xd5aa, 0xd324, 0xd1fd, 0xf17c, 0x1856, 0x276a, -0x4692, 0x286a, 0x0ba3, 0x3d7b, 0x1150, 0xc1ac, 0xbdf0, 0xe136, 0xd542, 0xcf26, -0x1384, 0x2faf, 0x3870, 0x2e2c, 0x2318, 0x28d4, 0xfdee, 0xcb16, 0xa730, 0xc88d, -0xdb00, 0xceb6, 0x1995, 0x4d9d, 0x384a, 0x1a5c, 0x3253, 0x2473, 0xd8f1, 0xc53c, -0xafa7, 0xc440, 0xe9ed, 0xe807, 0x176e, 0x51f8, 0x4372, 0x074b, 0x2912, 0x2b6d, -0xcf1e, 0xc37a, 0xc518, 0xc3a3, 0xdc9c, 0xfa3e, 0x1a98, 0x40fa, 0x4783, 0x0983, -0x2539, 0x3545, 0xd15a, 0xad3e, 0xc7ca, 0xd8f8, 0xd06d, 0xf96a, 0x3340, 0x3d0f, -0x375f, 0x19a1, 0x2cbe, 0x2480, 0xd619, 0xaa0f, 0xbfde, 0xe9c8, 0xd157, 0xf05e, -0x42af, 0x4a8c, 0x2ada, 0x1e55, 0x372a, 0x09e1, 0xcd35, 0xbbbe, 0xb8fb, 0xe193, -0xe480, 0xf329, 0x3476, 0x51aa, 0x233d, 0x1102, 0x44ce, 0x08c4, 0xbbca, 0xc158, -0xc692, 0xd1e1, 0xdde2, 0x0656, 0x33cd, 0x4f74, 0x2ddc, 0x0f4d, 0x394e, 0x09e6, -0xbe5c, 0xb5ad, 0xcc4d, 0xdc27, 0xdab2, 0x1043, 0x3ea4, 0x479b, 0x2b41, 0x1d61, -0x308b, 0xf8bb, 0xc464, 0xb735, 0xcd64, 0xe75e, 0xe437, 0x161f, 0x4870, 0x48ad, -0x1c9b, 0x1ea2, 0x33d1, 0xf0d7, 0xc828, 0xc0cf, 0xd2aa, 0xe99c, 0xeb83, 0x1a23, -0x47fe, 0x4a7b, 0x1905, 0x1e38, 0x324a, 0xe958, 0xc1e9, 0xc325, 0xd7e4, 0xe635, -0xf2dc, 0x2267, 0x3faa, 0x415f, 0x1a59, 0x202f, 0x2852, 0xe889, 0xc4bd, 0xbe6c, -0xdab6, 0xe56a, 0xef10, 0x26eb, 0x4556, 0x3a6e, 0x180a, 0x2a09, 0x1fb9, 0xde8b, -0xc5cf, 0xb9e8, 0xd7a7, 0xe7b9, 0xedd9, 0x2300, 0x49df, 0x37d1, 0x12a8, 0x2f9a, -0x18aa, 0xce1b, 0xbdb0, 0xbc6b, 0xd29e, 0xdeee, 0xf71a, 0x2781, 0x45f4, 0x339d, -0x0ccf, 0x2b8f, 0x12d6, 0xc8e8, 0xb6b6, 0xbda1, 0xd3af, 0xd912, 0xfe42, 0x2d6d, -0x3ef8, 0x304b, 0x1689, 0x29cf, 0x067c, 0xcba1, 0xb57d, 0xbede, 0xdf90, 0xdc36, -0xfffb, 0x3465, 0x3c40, 0x2128, 0x1a44, 0x31e1, 0xfd23, 0xcc9c, 0xbac3, 0xbc48, -0xdd17, 0xde23, 0xfd31, 0x3137, 0x4362, 0x1eee, 0x18fc, 0x32b8, 0xf20e, 0xc5cc, -0xbb44, 0xbdcc, 0xd9bd, 0xe2e3, 0x076b, 0x353c, 0x4892, 0x1e7b, 0x18f6, 0x30cf, -0xea76, 0xbae7, 0xb387, 0xc4fa, 0xdcc0, 0xe7b8, 0x15fe, 0x3d5b, 0x45ed, 0x199f, -0x192d, 0x2670, 0xe39c, 0xbd23, 0xb49a, 0xce79, 0xe000, 0xe7b3, 0x1c0b, 0x42fb, -0x4231, 0x1500, 0x214f, 0x24b7, 0xddd0, 0xbdaf, 0xb443, 0xd1d6, 0xe488, 0xf035, -0x248c, 0x481a, 0x412e, 0x17e3, 0x2a09, 0x1e55, 0xd730, 0xbb6d, 0xb458, 0xd6fe, -0xe4f4, 0xf65d, 0x30dd, 0x50e1, 0x3ee0, 0x15ff, 0x2a77, 0x133f, 0xd208, 0xbb41, -0xb5d0, 0xdc9b, 0xea0f, 0xfe2e, 0x33e8, 0x4ec6, 0x3729, 0x17b0, 0x327e, 0x0ae7, -0xcbb1, 0xbd40, 0xbbb0, 0xe021, 0xe92f, 0x0274, 0x3a54, 0x53fa, 0x3201, 0x1417, -0x340a, 0x073d, 0xcaf8, 0xbd21, 0xbddc, 0xdfe9, 0xebda, 0x0cee, 0x3df0, 0x5410, -0x3025, 0x16c7, 0x32e0, 0xfb90, 0xc1f6, 0xbac8, 0xcb01, 0xe852, 0xeb00, 0x14bb, -0x4362, 0x4e09, 0x267e, 0x175e, 0x2ea6, 0xf673, 0xc679, 0xb7ca, 0xce42, 0xef38, -0xea88, 0x19da, 0x4c19, 0x4976, 0x1f9b, 0x2155, 0x2984, 0xe747, 0xc939, 0xbc60, -0xced0, 0xf05b, 0xef4a, 0x1a1b, 0x4d06, 0x49db, 0x1707, 0x21a4, 0x261f, 0xdb58, -0xc42f, 0xbd07, 0xcd03, 0xeb57, 0xf6f1, 0x1fe4, 0x4885, 0x45cb, 0x1391, 0x2121, -0x232c, 0xd7ec, 0xbd29, 0xbf59, 0xd799, 0xe575, 0xf6b7, 0x28c6, 0x4774, 0x3e39, -0x1137, 0x1ef7, 0x1744, 0xd610, 0xbc35, 0xb9e4, 0xdd70, 0xe860, 0xf41e, 0x2929, -0x4423, 0x2e1c, 0x110a, 0x2d77, 0x0e41, 0xced2, 0xc1cd, 0xbb1d, 0xd9b8, 0xe41e, -0xf4ed, 0x2b8f, 0x4959, 0x2b92, 0x0f36, 0x32ac, 0x0962, 0xc983, 0xc063, 0xbadd, -0xd65d, 0xe557, 0xfe42, 0x2c4a, 0x49b0, 0x2cc4, 0x11af, 0x335e, 0x0099, 0xbfb6, -0xb950, 0xc282, 0xda13, 0xe2c3, 0x0c6b, 0x2301, 0x3d0d, 0x5b32, 0x2bf1, 0xf816, -0xd811, 0xc694, 0x94e5, 0xa76b, 0x02b3, 0xf90f, 0x23f0, 0x863b, 0x6a8b, 0x1164, -0xf826, 0xd412, 0x8d7c, 0xade7, 0xbb44, 0xce06, 0x446e, 0x60cd, 0x37d3, 0x464b, -0x4603, 0xdb1a, 0xadc9, 0xd748, 0xbb79, 0xd2d1, 0x0130, 0x0928, 0x3b0a, 0x4390, -0x0002, 0xef18, 0x25c7, 0xf662, 0xbcac, 0x1201, 0x1f14, 0xda32, 0xff28, 0x1fbe, -0xd1ed, 0xd6db, 0x389e, 0x0dbf, 0xf3fb, 0x488e, 0x1c7e, 0xe70e, 0x1374, 0xed9e, -0xa6a3, 0xedff, 0x24fa, 0xe3d7, 0x2454, 0x55ff, 0xfbf6, 0x19ad, 0x27e2, 0xbe48, -0xc206, 0x1296, 0xe45b, 0xdd35, 0x4db6, 0x1c33, 0xef46, 0x4348, 0x0b24, 0xb5eb, -0xf732, 0x126a, 0xcd2b, 0x063c, 0x37c5, 0xec01, 0x18d9, 0x3cc8, 0xd616, 0xd2bc, -0x273a, 0xf84b, 0xd381, 0x30e7, 0x1385, 0xdff9, 0x30f4, 0x18b0, 0xc10e, 0x0696, -0x364d, 0xd762, 0xfbf8, 0x3d8c, 0xe397, 0xf63d, 0x3932, 0xe0e0, 0xc7fb, 0x31c6, -0x0e47, 0xd472, 0x33f1, 0x19cb, 0xd9b6, 0x297e, 0x174d, 0xb770, 0xf385, 0x2b80, -0xd844, 0x020b, 0x44ae, 0xecdc, 0xffc6, 0x3c84, 0xe59b, 0xc239, 0x1b9c, 0x03d8, -0xcdfc, 0x284d, 0x2050, 0xe856, 0x29ba, 0x1da6, 0xc79c, 0xf13e, 0x2a8b, 0xdb89, -0xe7cf, 0x315a, 0xf321, 0xf5f9, 0x332c, 0xf230, 0xc508, 0x1566, 0x093d, 0xce9a, -0x23e7, 0x1dac, 0xd1bc, 0x1aa1, 0x2c3b, 0xbf9a, 0xd5cb, 0x286f, 0xe374, 0xeccb, -0x3bb8, 0xfa4b, 0xf5e8, 0x2f2d, 0xe9fe, 0xbb23, 0x0ce2, 0xff3a, 0xc469, 0x2484, -0x2c01, 0xe186, 0x1b3d, 0x26db, 0xc966, 0xd43c, 0x0cf6, 0xd3cc, 0xeaf1, 0x349d, -0xf49e, 0xfa1b, 0x3da3, 0xf2ae, 0xb5a2, 0x09f1, 0x0303, 0xbee6, 0x1c15, 0x2f77, -0xe137, 0x187e, 0x2a96, 0xc3d0, 0xd414, 0x1e88, 0xd685, 0xe774, 0x4a59, 0xfa19, -0xe6e2, 0x3f71, 0xf365, 0xa657, 0x0aac, 0x0b27, 0xbbf9, 0x22a4, 0x3896, 0xdde2, -0x1ea6, 0x2ddb, 0xb6a3, 0xcf13, 0x234d, 0xd209, 0xdfcd, 0x4de4, 0x0530, 0xf235, -0x458e, 0xfe1c, 0xaf9c, 0x04ff, 0x0ba8, 0xc04a, 0x1dfe, 0x3a8f, 0xe44e, 0x1ebd, -0x3786, 0xc838, 0xd340, 0x2d49, 0xe462, 0xdc75, 0x4606, 0x05e5, 0xe8d6, 0x3e07, -0x0367, 0xb349, 0x0d09, 0x1be3, 0xc56a, 0x2148, 0x4004, 0xd8d7, 0x1595, 0x3a7d, -0xc56d, 0xd126, 0x3261, 0xe7bb, 0xe124, 0x5308, 0x0eb8, 0xeb26, 0x437a, 0x042c, -0xaf26, 0x0eb2, 0x218d, 0xc6ad, 0x22c2, 0x4ab9, 0xe2d2, 0x1874, 0x40cd, 0xca8d, -0xc838, 0x2e68, 0xedb9, 0xd7fa, 0x4c7a, 0x1526, 0xe7cb, 0x4150, 0x0c9e, 0xae99, -0x0430, 0x20bb, 0xc1b5, 0x1187, 0x47d4, 0xe4da, 0x1440, 0x42ec, 0xcdff, 0xc6df, -0x2c13, 0xec08, 0xd2d5, 0x46ed, 0x0ef1, 0xdd36, 0x3d9e, 0x0f6f, 0xadf9, 0x0331, -0x2434, 0xc516, 0x0f43, 0x4485, 0xde32, 0x0700, 0x3d61, 0xce91, 0xbeff, 0x2926, -0xf4fa, 0xd134, 0x41a9, 0x1664, 0xdc49, 0x34e2, 0x1333, 0xace3, 0xf361, 0x1f70, -0xc693, 0x0699, 0x47e9, 0xe934, 0x0537, 0x4024, 0xd7ae, 0xba09, 0x1da8, 0xf1cd, -0xcbb4, 0x3981, 0x188e, 0xddeb, 0x326b, 0x1892, 0xb095, 0xf130, 0x20bc, 0xc29d, -0xf9a7, 0x3f9b, 0xe3d4, 0xfb7a, 0x3e64, 0xdf3d, 0xbe59, 0x2395, 0xf6d6, 0xc4b9, -0x3386, 0x1936, 0xd767, 0x2b7a, 0x1dd1, 0xb547, 0xeefe, 0x2814, 0xcaa5, 0xf817, -0x487c, 0xeb89, 0xf26b, 0x397c, 0xdf7f, 0xb39b, 0x1c04, 0xfe68, 0xc54d, 0x349f, -0x2a68, 0xdbdd, 0x22d6, 0x1ddd, 0xb0a0, 0xe0fa, 0x21cc, 0xc993, 0xf898, 0x52ec, -0xf689, 0xf70a, 0x426a, 0xe741, 0xaf61, 0x151d, 0xf921, 0xc0cc, 0x3886, 0x3002, -0xdf54, 0x2dc5, 0x25fe, 0xb022, 0xe019, 0x2b01, 0xdc46, 0xdf34, 0x113b, 0xf3ef, -0x2b9e, 0x5380, 0xf6a9, 0xdedb, 0x2143, 0xe2d9, 0xa1ed, 0xf09b, 0xf0dc, 0xdb67, -0x3407, 0x5e55, 0x32ca, 0x27e1, 0x25c5, 0xd709, 0xc36a, 0xcfc9, 0xa7f8, 0xea51, -0x3bd7, 0x0e16, 0x0801, 0x6978, 0x4f5b, 0xdcee, 0xefc1, 0xfe47, 0xbe36, 0xbc03, -0xf6fb, 0x0a54, 0x1b49, 0x3bd0, 0x15ec, 0x2382, 0x3cb2, 0xeb19, 0xc5aa, 0xedb7, -0xf957, 0xd7a6, 0xf768, 0x22e7, 0x17a3, 0x2061, 0x1ba7, 0x1fd9, 0x23d8, 0x0c01, -0xd667, 0xc4b5, 0xfb1e, 0xd994, 0xd7e9, 0x3398, 0x3e92, 0x166b, 0x27af, 0x4ec2, -0x0515, 0xd7d3, 0xde1a, 0xb994, 0xdcbe, 0xf079, 0xeced, 0x2d31, 0x5f61, 0x253a, -0x040a, 0x4aa6, 0x0dcf, 0xb7f1, 0xcf3e, 0xd1b1, 0xcf61, 0xe63f, 0x105c, 0x26cc, -0x431a, 0x31ef, 0x089d, 0x3279, 0x1505, 0xc9c8, 0xbc77, 0xd253, 0xdbe3, 0xd185, -0x028c, 0x2ef7, 0x3d5b, 0x2ff3, 0x2436, 0x2ecc, 0xffae, 0xd27d, 0xae72, 0xb7bb, -0xda8b, 0xd2ea, 0x0b5f, 0x4d03, 0x43e6, 0x19f3, 0x2a63, 0x2e3d, 0xdc83, 0xc2d3, -0xb8a6, 0xbf1e, 0xe681, 0xe9fe, 0x0c02, 0x47ed, 0x4b9b, 0x0b96, 0x1c09, 0x3193, -0xdad3, 0xc2e7, 0xcba3, 0xc7a2, 0xd979, 0xf765, 0x1768, 0x34eb, 0x4272, 0x0e6d, -0x1cba, 0x35bf, 0xe2f7, 0xb4ec, 0xc2dc, 0xdbc9, 0xd4b0, 0xeaf5, 0x2a04, 0x3d45, -0x3135, 0x163c, 0x29bf, 0x1de9, 0xd862, 0xb512, 0xbc25, 0xe60f, 0xdb2d, 0xe4e1, -0x2e4c, 0x46ed, 0x2280, 0x0c95, 0x3390, 0x0dba, 0xc912, 0xc227, 0xbe99, 0xd9c1, -0xe290, 0xed33, 0x2239, 0x44f4, 0x1ed4, 0x0166, 0x3720, 0x122c, 0xc1e5, 0xbe0b, -0xcc00, 0xd5f1, 0xd17f, 0xf3b3, 0x23a2, 0x3db4, 0x2624, 0x0cc4, 0x33e1, 0x1023, -0xc9ae, 0xb631, 0xc8cd, 0xdd8a, 0xceea, 0xfaf7, 0x3621, 0x3ded, 0x1ca5, 0x1b0d, -0x3ba6, 0x0216, 0xce92, 0xc394, 0xc90e, 0xdd1a, 0xd9c7, 0x0438, 0x3a3b, 0x43f5, -0x193b, 0x1b93, 0x427f, 0xfe8c, 0xc66d, 0xc591, 0xd58c, 0xe393, 0xe1bc, 0x0fe2, -0x3df6, 0x448e, 0x1c8a, 0x21c0, 0x3e71, 0xf9bd, 0xc96f, 0xc456, 0xd5d9, 0xe4b5, -0xe922, 0x1ce5, 0x418b, 0x417b, 0x1d09, 0x2518, 0x341d, 0xf03a, 0xcbea, 0xc1e1, -0xd6e8, 0xe7f3, 0xe55f, 0x1d2e, 0x4954, 0x3f9e, 0x1b23, 0x31e7, 0x3163, 0xe580, -0xcb7b, 0xbe90, 0xd27b, 0xe98e, 0xede5, 0x22f3, 0x51cc, 0x440f, 0x174a, 0x3744, -0x308b, 0xdab4, 0xc2e8, 0xc03f, 0xd50d, 0xe3f9, 0xf766, 0x2e0e, 0x4fbc, 0x4269, -0x17f2, 0x2ec2, 0x1f55, 0xd524, 0xbca2, 0xbb93, 0xda21, 0xe34e, 0xfad1, 0x31b6, -0x47da, 0x36e7, 0x19ff, 0x2ef6, 0x0ef3, 0xd0a0, 0xb94c, 0xb54a, 0xdd97, 0xe171, -0xf86b, 0x35bc, 0x47ba, 0x2983, 0x1694, 0x3324, 0x023b, 0xc961, 0xbc03, 0xb2d4, -0xd7d9, 0xe2e7, 0xf9f7, 0x3391, 0x4b1a, 0x23f3, 0x1255, 0x2f9f, 0xf2dd, 0xbf1b, -0xb8c8, 0xb595, 0xd67b, 0xe49e, 0x04eb, 0x3553, 0x491e, 0x20bc, 0x101c, 0x2d09, -0xefb9, 0xbc9b, 0xb456, 0xbc74, 0xdcb8, 0xe7e3, 0x1085, 0x3e2d, 0x4862, 0x20a4, -0x178e, 0x24e7, 0xe5be, 0xbfc5, 0xb5ac, 0xc6ce, 0xe4c1, 0xe9df, 0x156b, 0x41e6, -0x4347, 0x169b, 0x1dcf, 0x2537, 0xdbdb, 0xbd60, 0xb4ac, 0xc74f, 0xe58f, 0xf1d1, -0x1bdb, 0x438d, 0x41e3, 0x1215, 0x1c5f, 0x197b, 0xd34e, 0xbb05, 0xb7f2, 0xd3b2, -0xe362, 0xf0f9, 0x2581, 0x46a8, 0x3c22, 0x115f, 0x2009, 0x122f, 0xd304, 0xbd34, -0xb54b, 0xd890, 0xe911, 0xf7d8, 0x2be6, 0x4644, 0x3124, 0x11c4, 0x2d7b, 0x0ee0, -0xcfc2, 0xc445, 0xbf59, 0xdf01, 0xe6a3, 0xf6fe, 0x2fa7, 0x4f24, 0x32c6, 0x10fe, -0x360f, 0x14d0, 0xd1fe, 0xc5f6, 0xc3cd, 0xdf16, 0xe84d, 0x00f9, 0x3302, 0x4f34, -0x330f, 0x190f, 0x3c38, 0x0f70, 0xcd2f, 0xc1c9, 0xccf8, 0xe5e1, 0xe528, 0x0d0a, -0x3fdc, 0x4c89, 0x2965, 0x1572, 0x3558, 0x0773, 0xcf30, 0xbe56, 0xcfa1, 0xeeb4, -0xe390, 0x0d40, 0x446b, 0x47d6, 0x22c9, 0x1f4d, 0x33f7, 0xf611, 0xcd9c, 0xbd57, -0xc66d, 0xec7d, 0xe7bf, 0x0df9, 0x474d, 0x4b43, 0x1b2f, 0x1f2d, 0x35f1, 0xea3c, -0xc455, 0xbc6b, 0xc16f, 0xe41e, 0xef9d, 0x16e5, 0x457b, 0x4d9b, 0x1df1, 0x2052, -0x310e, 0xe35e, 0xbd3b, 0xbe4a, 0xd17b, 0xe63a, 0xf0dd, 0x2445, 0x4bde, 0x4c1f, -0x20d2, 0x25a1, 0x2da1, 0xe9a8, 0xc288, 0xb909, 0xd9c6, 0xee3e, 0xf6a6, 0x2ef9, -0x50a3, 0x43ee, 0x1dd3, 0x2eed, 0x2309, 0xe027, 0xcabc, 0xbd16, 0xdbde, 0xee25, -0xf339, 0x2c27, 0x5390, 0x40a0, 0x1b96, 0x375c, 0x1d2b, 0xd734, 0xc78b, 0xb807, -0xd541, 0xecee, 0xfe54, 0x2fa0, 0x5361, 0x3f28, 0x1522, 0x3393, 0x1266, 0xc88d, -0xbc85, 0xb8d2, 0xd4a8, 0xe5ab, 0x0438, 0x3396, 0x4c0c, 0x33cd, 0x0a79, 0x2169, -0xfe45, 0xc2f1, 0xb2f9, 0xb954, 0xe0e9, 0xe165, 0x029e, 0x2aa5, 0x318e, 0x465f, -0x33d0, 0x0444, 0xd0f3, 0xc734, 0xa46c, 0x9309, 0xec1b, 0xfbdf, 0x010e, 0x6440, -0x7e13, 0x1ed8, 0xeedd, 0xe7dd, 0x9c36, 0x94bd, 0xaeea, 0xb4e6, 0x08d9, 0x4ccc, -0x44d3, 0x3995, 0x43b3, 0xfbc8, 0xa9f8, 0xbc47, 0xb7e9, 0xb05c, 0xd4b9, 0x0205, -0x2fad, 0x38f1, 0x145d, 0xf759, 0x0aec, 0xf6cf, 0xb93a, 0xdb0a, 0x14b9, 0xe52f, -0xdb64, 0x2275, 0xfc04, 0xc169, 0x1482, 0x2708, 0xda58, 0x13ad, 0x34f3, 0xe68c, -0xf5c6, 0x0b27, 0xbfca, 0xc11f, 0x1a39, 0xf895, 0xf15a, 0x535e, 0x1fbe, 0xfd1c, -0x2fab, 0xeb46, 0xb207, 0xf114, 0xfe7d, 0xd0f4, 0x2a5f, 0x4be3, 0xf98f, 0x2db3, -0x365b, 0xcbe5, 0xd12f, 0x160e, 0xe93e, 0xe29c, 0x4478, 0x1d6f, 0x0413, 0x49f1, -0x0cdb, 0xc582, 0x08ff, 0x1ce3, 0xd295, 0x10d4, 0x44fb, 0xeff9, 0x15bb, 0x4310, -0xddfd, 0xd8c9, 0x34f7, 0xfaaf, 0xd716, 0x4457, 0x1cff, 0xe28a, 0x3514, 0x1237, -0xb5a9, 0x01cc, 0x3075, 0xd90a, 0x1130, 0x4b8f, 0xf1cd, 0x0fee, 0x37f4, 0xcf77, -0xc32c, 0x262d, 0xfb1f, 0xde11, 0x4cfa, 0x220f, 0xe7b6, 0x379f, 0x1630, 0xb473, -0xeb2b, 0x1f40, 0xcdde, 0xfb49, 0x44ba, 0xf7a8, 0x0b44, 0x3ad4, 0xdf56, 0xbc11, -0x192e, 0xfdae, 0xc1e6, 0x2be2, 0x260a, 0xe13b, 0x285b, 0x1e09, 0xb912, 0xe471, -0x2223, 0xd36d, 0xfe2f, 0x46c5, 0xe36b, 0xf7a8, 0x4755, 0xdf55, 0xa7b3, 0x1a23, -0x0b84, 0xc893, 0x2faf, 0x2991, 0xe2bb, 0x2481, 0x13cb, 0xb383, 0xe0a3, 0x1702, -0xc7e4, 0xf45d, 0x4b67, 0xf6a6, 0xf97a, 0x3e6f, 0xecd9, 0xadf3, 0xfeb4, 0xfd06, -0xc788, 0x1f7a, 0x200a, 0xe5ba, 0x31ba, 0x2511, 0xb3da, 0xe100, 0x2776, 0xc990, -0xe1ba, 0x44f0, 0xef0a, 0xe6e3, 0x3c2c, 0xf024, 0xb397, 0x1376, 0x054e, 0xc2a5, -0x2c7f, 0x2067, 0xc5d1, 0x227f, 0x2507, 0xa6ee, 0xd8b4, 0x2da2, 0xd0d2, 0xe5d2, -0x4ae3, 0xf3c8, 0xec01, 0x3d1d, 0xe4c8, 0xa76d, 0x0cd7, 0x02fe, 0xc051, 0x2a3f, -0x2ff4, 0xd96d, 0x206e, 0x2cdb, 0xbcc2, 0xcfce, 0x1d9e, 0xd936, 0xe286, 0x3c62, -0xf899, 0xf161, 0x4188, 0xfacc, 0xb89c, 0x13b2, 0x0f18, 0xbfc2, 0x1908, 0x2b9b, -0xdd40, 0x1c58, 0x31c8, 0xcc18, 0xe1de, 0x3029, 0xe1a2, 0xeab8, 0x4814, 0xf8bb, -0xec3b, 0x41cd, 0xfd3d, 0xbb42, 0x1ab1, 0x1bc5, 0xd03f, 0x2b94, 0x39e6, 0xe56b, -0x20f6, 0x302f, 0xc7e3, 0xe07e, 0x304b, 0xe35d, 0xef37, 0x556b, 0x0a77, 0xf3f3, -0x471e, 0x0715, 0xb6bf, 0x0a15, 0x15a7, 0xc8f0, 0x27ce, 0x49e1, 0xef3f, 0x24d8, -0x3fc8, 0xcf85, 0xd3a9, 0x2981, 0xe391, 0xe1e2, 0x5568, 0x1a44, 0xf6f8, 0x47a5, -0x0bb1, 0xb4f6, 0x0758, 0x180f, 0xc264, 0x1c7f, 0x4997, 0xe7b6, 0x1790, 0x3eec, -0xcc71, 0xc989, 0x25c5, 0xe0ff, 0xd5eb, 0x4cb5, 0x1585, 0xe9fb, 0x3f4e, 0x079f, -0xa4e8, 0xf8b6, 0x18b7, 0xbe0e, 0x140f, 0x4dcd, 0xe6f8, 0x106e, 0x3e48, 0xc659, -0xb8d1, 0x1fc6, 0xe2f7, 0xcafc, 0x4b21, 0x1aac, 0xddf9, 0x38ef, 0x0d86, 0xa172, -0xefb8, 0x1ae3, 0xb8b9, 0x022b, 0x4952, 0xe3b7, 0x0763, 0x3fb6, 0xcaa1, 0xb546, -0x2034, 0xe7b3, 0xc26e, 0x4341, 0x1b44, 0xd872, 0x37f9, 0x158c, 0xa302, 0xed16, -0x212e, 0xbda6, 0x0112, 0x4eb5, 0xe481, 0x0180, 0x448c, 0xd2be, 0xb34a, 0x2659, -0xf969, 0xc3e7, 0x4253, 0x2498, 0xd3ac, 0x2f84, 0x1c93, 0xa86a, 0xeae4, 0x2be9, -0xc824, 0xfb1e, 0x5254, 0xeb1f, 0xf85a, 0x40c6, 0xd602, 0xacc6, 0x20d2, 0xfcc1, -0xbfa1, 0x3d9b, 0x2b83, 0xd669, 0x2fcc, 0x202d, 0xa65f, 0xe170, 0x2e20, 0xdd4c, -0xe4e8, 0x1128, 0xe9c6, 0x2b2e, 0x54f5, 0xec68, 0xd881, 0x25b3, 0xe44f, 0x9e7f, -0xf130, 0xeb8e, 0xd492, 0x3413, 0x5451, 0x26e6, 0x289d, 0x2623, 0xcf51, 0xbd9d, -0xcfb5, 0xa20d, 0xdfe7, 0x36b7, 0x0cc4, 0x056d, 0x65fe, 0x4dbe, 0xdc03, 0xeb0b, -0xf3c5, 0xb95e, 0xbfab, 0xf463, 0x0575, 0x1cd4, 0x3d59, 0x1332, 0x1c9e, 0x36b2, -0xe6ff, 0xc1d2, 0xebab, 0xf875, 0xd9ed, 0xf751, 0x1ec8, 0x177a, 0x1fdf, 0x14b0, -0x158a, 0x1d8b, 0x09a1, 0xd3cc, 0xc301, 0xfa03, 0xda41, 0xd913, 0x31d2, 0x3bcd, -0x1398, 0x2276, 0x47f0, 0x04ad, 0xdb13, 0xde05, 0xbc40, 0xe0b4, 0xf233, 0xedf8, -0x2b4d, 0x5c62, 0x258d, 0x04db, 0x4756, 0x0b9d, 0xbaa9, 0xd2dc, 0xd3e6, 0xd2e5, -0xeb10, 0x1044, 0x260b, 0x4492, 0x307c, 0x0989, 0x37e3, 0x1952, 0xc9b1, 0xbe5d, -0xd980, 0xdd51, 0xcfb1, 0x0665, 0x3440, 0x3f66, 0x32e5, 0x2caa, 0x3828, 0x04a2, -0xd6f3, 0xb98c, 0xc152, 0xdc75, 0xd7fc, 0x131d, 0x50a8, 0x4584, 0x218f, 0x39e9, -0x3a8c, 0xe3c0, 0xca56, 0xc147, 0xc3c0, 0xe3a0, 0xec33, 0x13df, 0x4aaa, 0x4c83, -0x117c, 0x2896, 0x399a, 0xdc86, 0xc6f6, 0xcd47, 0xc6ce, 0xd9cc, 0xf86e, 0x19ad, -0x3a91, 0x491f, 0x123e, 0x24d9, 0x3cde, 0xe11b, 0xb37c, 0xc2df, 0xd7a4, 0xd130, -0xef29, 0x2c49, 0x3d20, 0x37d9, 0x16ea, 0x291c, 0x26ac, 0xda1f, 0xaaed, 0xb607, -0xe686, 0xd568, 0xe17d, 0x337f, 0x4b43, 0x2881, 0x1389, 0x38c7, 0x12c8, 0xcd26, -0xbcc3, 0xb56e, 0xdd1b, 0xe483, 0xea42, 0x2a90, 0x51ed, 0x261e, 0x0805, 0x4126, -0x1494, 0xbddc, 0xbaf3, 0xc450, 0xd324, 0xd5cd, 0xf712, 0x2ef6, 0x4d20, 0x2af3, -0x0e0c, 0x3762, 0x0ac6, 0xbe79, 0xae49, 0xc076, 0xd8d1, 0xd3ec, 0x0029, 0x3a43, -0x4756, 0x22ca, 0x1958, 0x35d2, 0xf721, 0xbeb2, 0xb3fe, 0xbef0, 0xda1f, 0xdc92, -0x07d3, 0x4050, 0x4bd0, 0x19d3, 0x154a, 0x3522, 0xefeb, 0xbbc4, 0xb715, 0xc994, -0xdf48, 0xe0b3, 0x1046, 0x40b6, 0x462c, 0x16f6, 0x1aab, 0x3230, 0xe981, 0xbd2a, -0xbab3, 0xd2a2, 0xe5c9, 0xe97f, 0x1c0b, 0x466f, 0x4272, 0x167d, 0x2642, 0x3042, -0xe930, 0xc684, 0xbe13, 0xdccc, 0xed63, 0xea9d, 0x2413, 0x5441, 0x43f9, 0x180c, -0x36e2, 0x2e3f, 0xdd7b, 0xc957, 0xc358, 0xdaa2, 0xeec1, 0xf6ba, 0x27c0, 0x5560, -0x448c, 0x1635, 0x38ef, 0x285a, 0xd524, 0xc336, 0xc6ef, 0xdd82, 0xe86a, 0x024a, -0x3514, 0x5243, 0x4024, 0x1679, 0x30ad, 0x19cb, 0xd2e3, 0xbea4, 0xc57f, 0xe4e0, -0xe5d6, 0xfff4, 0x3873, 0x4af7, 0x2f8e, 0x188b, 0x3243, 0x0881, 0xcd5e, 0xbb93, -0xbf31, 0xe52f, 0xe3f9, 0xfc94, 0x39c7, 0x4714, 0x1d41, 0x169d, 0x38c9, 0xfecd, -0xcb1a, 0xc0fc, 0xbdbe, 0xdc75, 0xe1b5, 0xfaa7, 0x3213, 0x48a1, 0x1b68, 0x15dc, -0x3a99, 0xf55f, 0xc01b, 0xbf71, 0xc2a6, 0xd4e4, 0xdf4d, 0x066a, 0x3170, 0x40f1, -0x1a26, 0x18e0, 0x342c, 0xedf9, 0xba41, 0xb3b4, 0xc38e, 0xd795, 0xe02b, 0x10cf, -0x387d, 0x3bf9, 0x151b, 0x1afe, 0x254b, 0xde99, 0xbc43, 0xb3bd, 0xc921, 0xde4a, -0xe189, 0x1332, 0x3ec6, 0x3af6, 0x0d82, 0x1fcf, 0x23ba, 0xd6bf, 0xb847, 0xb180, -0xcc73, 0xe0cc, 0xeb2b, 0x1cb5, 0x417e, 0x395b, 0x0e37, 0x260e, 0x1c37, 0xceea, -0xb693, 0xb466, 0xd44d, 0xde55, 0xeccf, 0x28e9, 0x4c64, 0x3a26, 0x1085, 0x2a16, -0x12d5, 0xcc04, 0xb7f6, 0xb4e4, 0xda25, 0xe424, 0xf801, 0x3387, 0x4c82, 0x2ff0, -0x133d, 0x33da, 0x0a6a, 0xc653, 0xba9f, 0xb9a4, 0xdb0d, 0xe2d3, 0xfd70, 0x3932, -0x535b, 0x2ec6, 0x131d, 0x36f2, 0x041c, 0xc4de, 0xbc13, 0xbb88, 0xdb49, 0xe632, -0x0792, 0x3bf9, 0x5215, 0x2df5, 0x197b, 0x38ba, 0xfc1c, 0xc000, 0xb9c1, 0xc559, -0xe3b9, 0xea55, 0x13bb, 0x45e0, 0x506f, 0x2598, 0x1a8a, 0x31d4, 0xf25d, 0xc2c1, -0xb752, 0xc926, 0xeaa3, 0xebad, 0x18ac, 0x4b3a, 0x4b14, 0x1dc9, 0x246e, 0x2f24, -0xe2ff, 0xc4be, 0xbca8, 0xccb7, 0xee7a, 0xf1d7, 0x1fad, 0x5446, 0x4e8c, 0x1a55, -0x2bfd, 0x2de3, 0xdbcc, 0xc7c4, 0xc19e, 0xcdf0, 0xeebf, 0x0347, 0x2b46, 0x50aa, -0x4efc, 0x1ae7, 0x2bc2, 0x29fc, 0xd661, 0xbcdd, 0xc496, 0xddc3, 0xe917, 0xff6c, -0x336f, 0x4f83, 0x433f, 0x1820, 0x2877, 0x176c, 0xd63d, 0xbf37, 0xbd41, 0xe3e4, -0xec70, 0xfccc, 0x35e8, 0x4cad, 0x2f68, 0x12a7, 0x2fac, 0x08d7, 0xcd76, 0xc4f5, -0xbf59, 0xdfbb, 0xe9f3, 0xfd34, 0x3194, 0x4aa3, 0x2767, 0x0f36, 0x33c2, 0x0048, -0xc54f, 0xc2fd, 0xbd10, 0xd605, 0xe41c, 0xff51, 0x2a83, 0x4801, 0x28e6, 0x0aff, -0x2f62, 0xfdb7, 0xbd39, 0xb775, 0xc18e, 0xd7dc, 0xe021, 0x0a7d, 0x33af, 0x423a, -0x2081, 0x0d26, 0x28f2, 0xf6aa, 0xc604, 0xb20f, 0xca22, 0xf929, 0xe0c9, 0xfe41, -0x2c91, 0x285c, 0x3479, 0x40e1, 0x11dd, 0xd23c, 0xd207, 0xa861, 0xa807, 0xfe96, -0xf904, 0x0d6b, 0x7934, 0x78f8, 0x0f08, 0xfce1, 0xe859, 0x8e1b, 0xa714, 0xc4a3, -0xd05d, 0x3229, 0x6379, 0x4af3, 0x48ea, 0x4a2d, 0xe67d, 0xa875, 0xd782, 0xc120, -0xb7cb, 0xfb9f, 0x1f2e, 0x34e8, 0x4bf0, 0x20cd, 0xf0b2, 0x1643, 0x0563, 0xbcd0, -0xf27f, 0x2741, 0xe7cd, 0xef58, 0x2d5f, 0xebc6, 0xc657, 0x2de0, 0x1cb6, 0xe47e, -0x4360, 0x2d6e, 0xe23e, 0x16ee, 0xf98d, 0xa445, 0xddbb, 0x207f, 0xe2c0, 0x123e, -0x5bce, 0x016d, 0x1099, 0x3582, 0xc93d, 0xb242, 0x0573, 0xeaa3, 0xcd42, 0x3ec8, -0x2edf, 0xedf6, 0x39f9, 0x19b8, 0xb85b, 0xe3bc, 0x1369, 0xd1a8, 0xf1db, 0x3e71, -0xf679, 0x05fa, 0x4211, 0xe5a8, 0xbfbb, 0x17fb, 0x0686, 0xc767, 0x1e4b, 0x24e5, -0xdea8, 0x2460, 0x26bf, 0xbfbf, 0xebef, 0x3662, 0xdb5b, 0xe735, 0x478f, 0xf36f, -0xe6aa, 0x3a12, 0xedab, 0xb885, 0x2168, 0x1a11, 0xd137, 0x2b7c, 0x29a9, 0xd6be, -0x2004, 0x24d0, 0xb744, 0xddad, 0x2f52, 0xe201, 0xeeef, 0x4b3b, 0xfc02, 0xef7b, -0x3d92, 0xf6b9, 0xb6be, 0x0b17, 0x0d77, 0xc534, 0x191c, 0x30b3, 0xe945, 0x23b0, -0x2f3b, 0xc9bb, 0xd7dc, 0x269c, 0xe46c, 0xd902, 0x3766, 0x0212, 0xeb25, 0x39af, -0x03e0, 0xb8e7, 0x077c, 0x169d, 0xcc6f, 0x1b10, 0x2e0e, 0xd19a, 0x0fd8, 0x38f6, -0xca91, 0xc8f9, 0x29d6, 0xf078, 0xdd5c, 0x3b96, 0x09ef, 0xf001, 0x3507, 0xfbb1, -0xb660, 0x03d5, 0x0e0a, 0xc387, 0x17f0, 0x3e5b, 0xe93c, 0x15a4, 0x38a5, 0xd46a, -0xc5fe, 0x1360, 0xe4bc, 0xda9b, 0x39bc, 0x0c8d, 0xef2a, 0x3f9f, 0x0fdb, 0xb193, -0xf8d2, 0x1694, 0xb855, 0xffea, 0x4558, 0xed39, 0x083b, 0x3cd1, 0xda45, 0xc36d, -0x1e6e, 0xe476, 0xc765, 0x430f, 0x19a5, 0xde45, 0x3c55, 0x16d3, 0xa619, 0xf171, -0x1f0a, 0xbe1b, 0x04f9, 0x4d9d, 0xeec4, 0x0d1f, 0x3e78, 0xccbe, 0xb49f, 0x1d9b, -0xeb29, 0xc2b6, 0x448d, 0x28e1, 0xe2a4, 0x3aab, 0x21b9, 0xad2c, 0xe5d9, 0x1d14, -0xbe21, 0xf5ec, 0x4db1, 0xef99, 0x030b, 0x4e45, 0xe3cc, 0xb105, 0x20c5, 0xfc50, -0xb9ac, 0x35e2, 0x2898, 0xd9cf, 0x3397, 0x236d, 0xace6, 0xea90, 0x2c38, 0xc65d, -0xf7eb, 0x5313, 0xe39f, 0xf211, 0x477a, 0xdbe9, 0xad7a, 0x1ffa, 0x0017, 0xc201, -0x3906, 0x27ff, 0xd56a, 0x2d70, 0x20b7, 0xa843, 0xe22b, 0x2d3a, 0xc8d1, 0xeff9, -0x5809, 0xf171, 0xf1ca, 0x4aa1, 0xe752, 0xa7f6, 0x1531, 0x03a8, 0xbd38, 0x3515, -0x35e4, 0xd873, 0x2cec, 0x2fa3, 0xaedb, 0xd92e, 0x2cc6, 0xccea, 0xe531, 0x5116, -0xf947, 0xf6dd, 0x4ce8, 0xef45, 0xaeac, 0x190f, 0x0bfc, 0xbc68, 0x2afb, 0x3612, -0xd723, 0x2687, 0x3899, 0xbdfb, 0xda26, 0x3069, 0xdbaf, 0xe6bf, 0x5016, 0x0057, -0xf1d5, 0x480e, 0xf64b, 0xad29, 0x13a0, 0x16f4, 0xc33e, 0x2614, 0x4041, 0xe193, -0x201a, 0x3648, 0xc1be, 0xd35e, 0x2aee, 0xe031, 0xe3b6, 0x52de, 0x0b18, 0xedc3, -0x4b67, 0x084a, 0xaf95, 0x0ccc, 0x1af7, 0xc089, 0x19da, 0x4369, 0xe6d2, 0x1d97, -0x422d, 0xcfe2, 0xd1f7, 0x2e93, 0xe6d4, 0xd904, 0x4acc, 0x0d46, 0xe47d, 0x425b, -0x0eb4, 0xb1bb, 0x06af, 0x2009, 0xc469, 0x12a4, 0x3fee, 0xdd98, 0x0e0f, 0x3d40, -0xcdb1, 0xc9b2, 0x2f38, 0xedc8, 0xcf7d, 0x42ef, 0x1026, 0xd9af, 0x3710, 0x1033, -0xad12, 0xfd62, 0x2285, 0xc358, 0x0c72, 0x48be, 0xe51c, 0x0a9a, 0x2ff8, 0xbdc8, -0xc28d, 0x2cc9, 0xfec9, 0xc7ca, 0x13e5, 0x17e1, 0x02ca, 0x35c6, 0x0fac, 0xcd93, -0xf8c0, 0xfbac, 0xbba6, 0xe67f, 0x0735, 0xd6a6, 0x1bde, 0x7350, 0x2eb9, 0xfad9, -0x2334, 0xeee4, 0xa104, 0xc9e5, 0xcf89, 0xd376, 0x2f8b, 0x2f58, 0x13f9, 0x6199, -0x5172, 0xd760, 0xdae6, 0x0109, 0xaaab, 0x9f01, 0x11f6, 0x1c74, 0xff8b, 0x303b, -0x3d89, 0x2a49, 0x1900, 0xe5d6, 0xbb94, 0xe00a, 0xeeb6, 0xce23, 0x0253, 0x3291, -0x20e8, 0x0d77, 0x2650, 0x2ac1, 0xf46d, 0xf971, 0xdbe5, 0xc599, 0xf13a, 0xdd86, -0xebfb, 0x30a4, 0x422d, 0x0726, 0x20e1, 0x53cf, 0xe990, 0xbf8d, 0xd717, 0xc738, -0xcc12, 0xed69, 0x1207, 0x2679, 0x4b59, 0x2072, 0x0f6e, 0x3b3c, 0xef93, 0xaf82, -0xc07e, 0xdcf5, 0xccea, 0xe17b, 0x31b5, 0x3ad1, 0x3673, 0x24ae, 0x1fad, 0x2260, -0xf0dd, 0xc29e, 0xb494, 0xe43c, 0xe377, 0xdb2b, 0x2318, 0x45fc, 0x34e0, 0x20c4, -0x3ea5, 0x232d, 0xdb31, 0xcc1d, 0xb320, 0xc65a, 0xdf18, 0xea47, 0x25f0, 0x5cd4, -0x4386, 0x10e7, 0x3d78, 0x214b, 0xc538, 0xbca9, 0xbe8b, 0xcd16, 0xe049, 0x05f5, -0x2fe8, 0x5197, 0x45f2, 0x0fc2, 0x2f2f, 0x1971, 0xc5a7, 0xb7fc, 0xca80, 0xd975, -0xd7df, 0x0c99, 0x3a4e, 0x3fc6, 0x30e6, 0x13a0, 0x2b87, 0x0f79, 0xcd82, 0xaf27, -0xc107, 0xe381, 0xd5f3, 0x035c, 0x44e6, 0x44fc, 0x1db9, 0x1e95, 0x3a4e, 0xf713, -0xc17f, 0xb545, 0xc44b, 0xea43, 0xe0b2, 0x034f, 0x458e, 0x4e96, 0x1557, 0x1819, -0x3caa, 0xeb53, 0xb81f, 0xc29d, 0xcb34, 0xd827, 0xea2e, 0x153f, 0x3683, 0x4599, -0x17a8, 0x1025, 0x3238, 0xefae, 0xb3df, 0xb7d0, 0xd811, 0xd6f7, 0xd85a, 0x1792, -0x3a94, 0x35ea, 0x1657, 0x21c8, 0x243d, 0xdfb1, 0xbb30, 0xb0e9, 0xceed, 0xddbf, -0xdff2, 0x1be1, 0x44e0, 0x3265, 0x0879, 0x260d, 0x1f6a, 0xcd4c, 0xba1b, 0xbafd, -0xcb3d, 0xd899, 0xeb07, 0x19d6, 0x3c13, 0x3544, 0x08ed, 0x2407, 0x1daa, 0xcd68, -0xb792, 0xbf01, 0xd1c2, 0xd611, 0xf34b, 0x259b, 0x3b2f, 0x2f39, 0x1053, 0x2d78, -0x1a05, 0xd265, 0xba97, 0xc02a, 0xdab7, 0xd903, 0xf86d, 0x2ff9, 0x403d, 0x28d3, -0x14a1, 0x34af, 0x0a0e, 0xcda4, 0xc3ac, 0xc13a, 0xdd8d, 0xe2ea, 0xfd27, 0x2eb2, -0x45ac, 0x26be, 0x14ec, 0x3dd9, 0x06bc, 0xc81d, 0xc6e2, 0xc719, 0xd8c3, 0xe5c7, -0x0b66, 0x32c9, 0x4b92, 0x2cb4, 0x19ce, 0x3c10, 0x0272, 0xc5eb, 0xbb96, 0xccd7, -0xe07a, 0xdfbb, 0x160a, 0x4341, 0x4749, 0x2676, 0x21c7, 0x2fd3, 0xf0d0, 0xc6ee, -0xb624, 0xcad8, 0xe85f, 0xe7c5, 0x1d81, 0x4b84, 0x45af, 0x1eba, 0x2c0d, 0x30c1, -0xe4ba, 0xca8d, 0xbdbe, 0xcc89, 0xed50, 0xf3dd, 0x2203, 0x5159, 0x4cd1, 0x1b22, -0x2e08, 0x3255, 0xe28f, 0xc7e6, 0xc2e3, 0xd510, 0xe8de, 0xfa14, 0x2846, 0x4a33, -0x4c04, 0x1fed, 0x2f64, 0x2cdb, 0xe195, 0xc51d, 0xc13f, 0xdb62, 0xe696, 0xfa3e, -0x31bd, 0x4d3c, 0x4355, 0x2150, 0x33b3, 0x204a, 0xe0d7, 0xc877, 0xbdd9, 0xdeff, -0xeb46, 0x0024, 0x3a0c, 0x5485, 0x3c57, 0x1fe4, 0x3a57, 0x110e, 0xd1f0, 0xc4f8, -0xbfae, 0xe303, 0xf0e8, 0x0757, 0x3795, 0x525c, 0x364d, 0x163e, 0x3411, 0x078d, -0xc95e, 0xbed3, 0xc146, 0xdd79, 0xe8cb, 0x0fb0, 0x3b8b, 0x4b40, 0x2f52, 0x1708, -0x2c9b, 0xf6f7, 0xc33e, 0xb8f8, 0xc0a0, 0xe27b, 0xe6d8, 0x0c22, 0x3d9b, 0x4878, -0x24a6, 0x186c, 0x2467, 0xe600, 0xc014, 0xb323, 0xbc0b, 0xe0eb, 0xe8da, 0x0f11, -0x3cef, 0x40c5, 0x12df, 0x1430, 0x227a, 0xdb2e, 0xb8c4, 0xb5de, 0xc528, 0xdd7a, -0xe824, 0x13d4, 0x3e15, 0x4384, 0x124e, 0x1469, 0x1e10, 0xd6df, 0xb7fb, 0xb8e3, -0xcdaf, 0xdd42, 0xecbb, 0x1e7d, 0x3c6f, 0x378a, 0x1149, 0x1e8a, 0x1b08, 0xd447, -0xb3c7, 0xb0b3, 0xd341, 0xe16d, 0xebda, 0x22db, 0x4450, 0x345d, 0x0fcd, 0x27aa, -0x137c, 0xcfd2, 0xc241, 0xbb1b, 0xd538, 0xe771, 0xf62c, 0x297f, 0x4c37, 0x3271, -0x103e, 0x360c, 0x143c, 0xc8cb, 0xc2e2, 0xc46f, 0xd919, 0xe83f, 0x0316, 0x2e44, -0x49f7, 0x320d, 0x1102, 0x34eb, 0x0f20, 0xc998, 0xc1e5, 0xc68b, 0xd8b7, 0xe3aa, -0x0e51, 0x3839, 0x473d, 0x306d, 0x1936, 0x313b, 0x023a, 0xca3b, 0xb9cb, 0xc4e8, -0xe9a8, 0xe8e8, 0x0e4f, 0x4390, 0x4a72, 0x23d2, 0x1d52, 0x31ca, 0xf0b0, 0xc813, -0xbd25, 0xc202, 0xe6ea, 0xee18, 0x12c8, 0x4476, 0x4b2e, 0x198b, 0x19a1, 0x2fcc, -0xe518, 0xbf8d, 0xbe9e, 0xcb6d, 0xe622, 0xee0e, 0x167e, 0x3fbf, 0x46fb, 0x1a7d, -0x1f4e, 0x2d08, 0xe17f, 0xbedd, 0xbaa3, 0xcc16, 0xe196, 0xeedc, 0x21cc, 0x44ed, -0x4348, 0x1a18, 0x2363, 0x242e, 0xdc65, 0xbd61, 0xb300, 0xcfa0, 0xe712, 0xe5c7, -0x169f, 0x5f17, 0x7299, 0x2bb1, 0x0b65, 0xe2fd, 0x9b1c, 0xa3b5, 0xaeb5, 0xe147, -0x3787, 0x593a, 0x5290, 0x4a3c, 0x2e69, 0xcbb4, 0xa91f, 0xc5a3, 0xbd85, 0xd07b, -0x1055, 0x3d01, 0x2411, 0x222c, 0x2b1a, 0x0b05, 0xffdc, 0xe3f2, 0xcf8c, 0xf390, -0x15ad, 0xd9f5, 0xc944, 0x2d37, 0x09de, 0xc93f, 0x0d00, 0x229d, 0x0eb5, 0x31fb, -0x193d, 0xdefd, 0x0b6e, 0xe2b8, 0x80c1, 0xd2cb, 0x1719, 0xe9c2, 0x3008, 0x6a8a, -0xfee8, 0x01bc, 0x299a, 0xb39d, 0xa48f, 0x0798, 0xe5e9, 0xddfa, 0x41e1, 0x17dc, -0xf43b, 0x3829, 0x05c3, 0xbd89, 0xf1bc, 0x0dab, 0xcd37, 0xfad8, 0x2e14, 0xf080, -0x107b, 0x24ea, 0xd852, 0xd4a0, 0x17fd, 0xfd24, 0xd818, 0x2b57, 0x168d, 0xdb81, -0x1759, 0x0cdb, 0xc867, 0xf2e6, 0x257d, 0xe349, 0xfff1, 0x39a1, 0xe33d, 0xee45, -0x2b9d, 0xe388, 0xc702, 0x21a8, 0x103e, 0xda0f, 0x2f4b, 0x1b70, 0xd6c1, 0x1b55, -0x104d, 0xb577, 0xe811, 0x28c6, 0xe0aa, 0xfee3, 0x4403, 0xf56f, 0xf711, 0x2c32, -0xe60a, 0xbd96, 0x0d61, 0x048f, 0xce3d, 0x272f, 0x325d, 0xf1c7, 0x2094, 0x1ff0, -0xc860, 0xe30a, 0x2515, 0xdac5, 0xe92d, 0x441f, 0x0548, 0xfb76, 0x3d79, 0xfd5c, -0xbecb, 0x1149, 0x13f9, 0xd214, 0x2a6f, 0x3388, 0xe6f8, 0x2190, 0x2948, 0xc4a5, -0xdd42, 0x2f43, 0xe6af, 0xf03f, 0x54db, 0x13d9, 0xfca6, 0x3215, 0xf506, 0xc57a, -0x12c0, 0x0f9f, 0xd3cc, 0x322e, 0x4301, 0xf273, 0x23ab, 0x356e, 0xd3b2, 0xd051, -0x21b7, 0xf281, 0xecda, 0x4489, 0x12f0, 0x0242, 0x4407, 0x06d1, 0xbafe, 0x0b6c, -0x1d26, 0xc6ee, 0x19bc, 0x44e9, 0xe86d, 0x13b7, 0x39ca, 0xd446, 0xd119, 0x2941, -0xee93, 0xe7c5, 0x4bc2, 0x0643, 0xe908, 0x4535, 0x0444, 0xaaed, 0x0a10, 0x21a1, -0xc807, 0x1964, 0x41d6, 0xe77b, 0x16b3, 0x34e4, 0xc869, 0xc8dc, 0x2196, 0xe4ba, -0xdb97, 0x4973, 0x106a, 0xe7d9, 0x3cc5, 0x0a39, 0xa769, 0xf083, 0x1925, 0xc4c2, -0x075d, 0x3c4a, 0xe3ca, 0x0d28, 0x38d3, 0xc8d1, 0xbd34, 0x29a4, 0xea91, 0xbfc6, -0x3ad0, 0x0fbe, 0xd348, 0x3125, 0x0f03, 0xa6a3, 0xf4e3, 0x222b, 0xbe73, 0x00e2, -0x3cfa, 0xd671, 0xff6d, 0x3893, 0xc753, 0xb6c9, 0x236e, 0xec95, 0xc571, 0x3925, -0x1324, 0xdbd6, 0x2c09, 0x07a8, 0xaa2d, 0xf242, 0x1fa6, 0xc716, 0x042c, 0x441c, -0xe490, 0xffd3, 0x3dc4, 0xdc2a, 0xb9f6, 0x1f30, 0xfbb0, 0xca2e, 0x371c, 0x2003, -0xddf1, 0x31fa, 0x2307, 0xb4d8, 0xf004, 0x2cbc, 0xc878, 0xf7c6, 0x4caf, 0xed6b, -0xfe78, 0x48e2, 0xe5f3, 0xb861, 0x209c, 0xffdd, 0xc990, 0x3a8f, 0x2235, 0xd8df, -0x3307, 0x26fb, 0xb85c, 0xf04e, 0x2cb8, 0xd049, 0xfa7c, 0x49ae, 0xedac, 0xfa25, -0x3f7d, 0xe587, 0xbae6, 0x1de2, 0x03f4, 0xc964, 0x35b0, 0x2bf3, 0xdcc1, 0x287a, -0x2509, 0xb53e, 0xdd34, 0x21f5, 0xd014, 0xf4e6, 0x5327, 0xfbed, 0xf63d, 0x422a, -0xebde, 0xadff, 0x109b, 0x03c0, 0xc66e, 0x34a1, 0x371f, 0xe1e5, 0x266b, 0x298a, -0xb6ec, 0xdb6e, 0x2815, 0xd421, 0xf019, 0x5352, 0xff26, 0xf3f2, 0x43a2, 0xf389, -0xb155, 0x11bc, 0x093e, 0xc3cf, 0x2cd7, 0x37d3, 0xe04d, 0x22e3, 0x2ecd, 0xb8a8, -0xd4f6, 0x2b5c, 0xd879, 0xe9c1, 0x5345, 0x0074, 0xeb1b, 0x3d0d, 0xf0a8, 0xa78e, -0x0f83, 0x1369, 0xc523, 0x2e80, 0x3d4c, 0xdb13, 0x1e41, 0x2ecc, 0xb34d, 0xd013, -0x2f65, 0xd81e, 0xe458, 0x57d2, 0x0406, 0xebe0, 0x457a, 0xf7e1, 0xa66e, 0x0b6f, -0x0e7a, 0xb8d1, 0x251b, 0x3fe1, 0xdd7d, 0x20b9, 0x3687, 0xbb17, 0xd0b9, 0x2e06, -0xd6de, 0xd8c9, 0x50ce, 0x0665, 0xe605, 0x3fce, 0xfc63, 0xac6f, 0x0f4a, 0x249e, -0xcfcc, 0xfc68, 0x0488, 0xeb03, 0x4794, 0x43ec, 0xda83, 0xf3bd, 0x2644, 0xc019, -0xac19, 0xfdb7, 0xdae0, 0xebc8, 0x4a7e, 0x4842, 0x204b, 0x2f4a, 0x0bd7, 0xb466, -0xc7b6, 0xc25a, 0x9ff5, 0xfeaa, 0x3147, 0xf5d6, 0x1606, 0x7098, 0x2536, 0xcb1f, -0xef7c, 0xd8bb, 0xa610, 0xc6a6, 0xf94d, 0x01cf, 0x2326, 0x2e92, 0xfa36, 0x1b23, -0x1fee, 0xc9e0, 0xbf64, 0xf0f7, 0xebf9, 0xcd60, 0xfed7, 0x1727, 0x0a34, 0x1723, -0x0a36, 0x0e7b, 0x18aa, 0xfc64, 0xb854, 0xc985, 0xfdd8, 0xc68b, 0xea58, 0x3e80, -0x2a34, 0x0ba2, 0x2d28, 0x367f, 0xec1b, 0xe1de, 0xce20, 0xb654, 0xf084, 0xed7d, -0xf556, 0x44c2, 0x5de8, 0x118c, 0x103a, 0x43c2, 0xea97, 0xbbb3, 0xd781, 0xd5a7, -0xe105, 0xfd04, 0x1bc6, 0x2dbd, 0x4a4e, 0x2262, 0x090c, 0x37f3, 0x0697, 0xc337, -0xc445, 0xe70d, 0xe217, 0xdb53, 0x1953, 0x38c9, 0x40c1, 0x2ede, 0x22c3, 0x260c, -0xfc8c, 0xcfd4, 0xb0e1, 0xd39e, 0xe34c, 0xdae1, 0x253f, 0x508f, 0x342f, 0x1aa5, -0x3628, 0x1e6e, 0xd753, 0xc9cd, 0xb7c4, 0xd23c, 0xef41, 0xeb30, 0x1cc2, 0x523c, -0x3c38, 0x02b5, 0x29f9, 0x28a2, 0xd759, 0xd1f8, 0xd1bf, 0xd245, 0xe508, 0xfe91, -0x19fc, 0x3b30, 0x3d9b, 0x0a4c, 0x2fd0, 0x37f4, 0xdc8c, 0xbe49, 0xd7b4, 0xe591, -0xd3af, 0xfd0f, 0x3070, 0x36f1, 0x325e, 0x18a4, 0x3386, 0x27ca, 0xdc73, 0xb513, -0xcdc8, 0xf809, 0xd5d9, 0xf013, 0x4334, 0x4964, 0x2395, 0x1b7b, 0x3c5a, 0x0fe4, -0xd7a3, 0xc6c6, 0xc6b6, 0xf0cf, 0xeb7d, 0xf80b, 0x3914, 0x525a, 0x2445, 0x1417, -0x4928, 0x0ff5, 0xc35d, 0xc78a, 0xd244, 0xdff9, 0xe35e, 0x07df, 0x35ae, 0x4ba7, -0x2974, 0x1106, 0x3cf3, 0x0fec, 0xc4b4, 0xb9c7, 0xd562, 0xe489, 0xd970, 0x0e52, -0x3f61, 0x43d6, 0x27aa, 0x2131, 0x364b, 0xfd16, 0xc955, 0xb961, 0xcde0, 0xe8ce, -0xe024, 0x0e4f, 0x4544, 0x4582, 0x18cd, 0x22be, 0x3a77, 0xf22e, 0xc4f3, 0xbabf, -0xcce0, 0xe32e, 0xe352, 0x12f7, 0x43a1, 0x4666, 0x1401, 0x1c0c, 0x30e6, 0xe619, -0xbb56, 0xbb95, 0xd491, 0xe00b, 0xe61a, 0x17a4, 0x3b47, 0x3b00, 0x10e7, 0x1c7e, -0x2707, 0xe361, 0xb750, 0xb2d2, 0xd7be, 0xdb41, 0xe145, 0x2096, 0x40ed, 0x319a, -0x118b, 0x2924, 0x1a2e, 0xd6af, 0xba5f, 0xad6c, 0xd2c9, 0xe064, 0xe67c, 0x25df, -0x4ea4, 0x3357, 0x0fc7, 0x312c, 0x1020, 0xc418, 0xb5ff, 0xb68a, 0xd4f7, 0xe2ef, -0xfb14, 0x2e11, 0x4c3e, 0x3280, 0x08fc, 0x2966, 0x0e36, 0xc69d, 0xb3ba, 0xbf26, -0xde72, 0xe461, 0x0918, 0x3887, 0x4967, 0x313c, 0x1236, 0x2763, 0x0526, 0xcb44, -0xb35a, 0xc8b5, 0xed8f, 0xdf83, 0x05bf, 0x41b2, 0x4548, 0x20ab, 0x1a30, 0x2bd9, -0xf884, 0xce0f, 0xb377, 0xc10c, 0xede8, 0xe5b7, 0x0520, 0x42f2, 0x4b64, 0x19c0, -0x1a50, 0x2fd7, 0xee52, 0xc8d4, 0xbcea, 0xc661, 0xe5d5, 0xe9b8, 0x0e4b, 0x42da, -0x4c23, 0x187a, 0x1ba9, 0x2fdd, 0xe89e, 0xbcad, 0xb84a, 0xd201, 0xe619, 0xeba8, -0x1a61, 0x40ef, 0x41b7, 0x151a, 0x1cbf, 0x2b05, 0xea44, 0xc1f8, 0xbc6c, 0xdb3c, -0xe422, 0xe69f, 0x208e, 0x4881, 0x3cc7, 0x1503, 0x2aa9, 0x27ed, 0xe431, 0xc5cc, -0xbdfa, 0xdd9a, 0xe8e9, 0xf074, 0x2496, 0x4a59, 0x3e74, 0x1374, 0x2e8f, 0x252c, -0xd82c, 0xba66, 0xbeda, 0xe1cc, 0xe3a5, 0xf456, 0x3043, 0x4df4, 0x382a, 0x0d8b, -0x25d9, 0x1516, 0xd249, 0xb805, 0xbbdd, 0xe317, 0xe31f, 0xf717, 0x307f, 0x4438, -0x2ce7, 0x1089, 0x29b8, 0x060d, 0xc757, 0xb6c7, 0xb848, 0xdd4c, 0xde36, 0xf60e, -0x341a, 0x45f6, 0x1fc8, 0x0b03, 0x2ed5, 0xff75, 0xc14a, 0xb3bb, 0xb4dc, 0xd6d2, -0xdc36, 0xfbb0, 0x356c, 0x49c3, 0x2300, 0x0fe9, 0x2f18, 0xf499, 0xb802, 0xb1b2, -0xc06f, 0xdc85, 0xde22, 0x0805, 0x3cc1, 0x488e, 0x1f2e, 0x11d7, 0x2c64, 0xf3b1, -0xbd78, 0xadbb, 0xc5eb, 0xe451, 0xde57, 0x0e82, 0x4140, 0x4137, 0x1916, 0x1b84, -0x28d4, 0xe639, 0xc1a0, 0xb2e7, 0xc697, 0xe4be, 0xdf87, 0x10dc, 0x49b4, 0x457d, -0x1479, 0x2405, 0x2b0f, 0xdcbe, 0xbefc, 0xb3a9, 0xc6dd, 0xe60b, 0xed45, 0x1b13, -0x497b, 0x4531, 0x1324, 0x24b0, 0x243c, 0xd210, 0xb83d, 0xb984, 0xd0bc, 0xe2a6, -0xf3b7, 0x2766, 0x4a82, 0x4204, 0x133f, 0x22b4, 0x1b4e, 0xd4a3, 0xba37, 0xbaaf, -0xdf26, 0xea12, 0xf84b, 0x3177, 0x4e17, 0x39af, 0x193b, 0x308a, 0x13c1, 0xd6b0, -0xc5d3, 0xbffc, 0xe599, 0xeec6, 0xff4d, 0x38ac, 0x5167, 0x346a, 0x1b9d, 0x376a, -0x0ce4, 0xd4a8, 0xc78f, 0xc195, 0xe4f4, 0xf0f5, 0x07bb, 0x3cdc, 0x5981, 0x3510, -0x1b26, 0x3a31, 0x03fb, 0xca72, 0xc53e, 0xcd25, 0xecab, 0xf768, 0x193e, 0x437d, -0x53af, 0x2c6f, 0x15b8, 0x31bf, 0xff10, 0xcc99, 0xc147, 0xd348, 0xee05, 0xee95, -0x1782, 0x2f2b, 0x4b20, 0x5a80, 0x2b14, 0xfd25, 0xdd6a, 0xccb5, 0x9c77, 0xbb91, -0x0abb, 0xfa6d, 0x308d, 0x8b3b, 0x6386, 0x0f1b, 0x0366, 0xd9a6, 0x969a, 0xbb36, -0xbe42, 0xd650, 0x4a43, 0x5e11, 0x39f6, 0x4e5f, 0x3f3f, 0xd1f7, 0xbac7, 0xda01, -0xb75e, 0xdb85, 0x0689, 0x0f50, 0x402d, 0x3a48, 0xf492, 0xf3ba, 0x232e, 0xe3c2, -0xc221, 0x1c7e, 0x103b, 0xda32, 0x0d99, 0x12a9, 0xc374, 0xe4a9, 0x2fee, 0xef59, -0xf571, 0x4551, 0x09ce, 0xee4d, 0x190c, 0xdd87, 0xa5eb, 0xf5c9, 0x0d02, 0xd8dd, -0x32e0, 0x4556, 0xf27b, 0x272d, 0x1a0f, 0xac2d, 0xc929, 0x0d48, 0xd065, 0xe73f, -0x4fb6, 0x0a4b, 0xfcc1, 0x4512, 0xed54, 0xb2b9, 0x0350, 0xfc0b, 0xbed7, 0x1926, -0x2f0c, 0xe1a6, 0x2871, 0x338a, 0xc365, 0xd8fc, 0x2261, 0xe12a, 0xda5e, 0x3836, -0x02a6, 0xeb2d, 0x3c29, 0xfc95, 0xb47f, 0x126c, 0x2240, 0xc4df, 0x1301, 0x42d9, -0xddbd, 0x05c8, 0x2ff4, 0xc609, 0xc9ef, 0x2ebd, 0xf193, 0xda07, 0x46da, 0x0cd3, -0xe052, 0x39eb, 0x0085, 0xa3df, 0xfdbd, 0x1d67, 0xc36d, 0x1321, 0x461a, 0xe3db, -0x121d, 0x3bc5, 0xce7e, 0xc611, 0x1e92, 0xe869, 0xd146, 0x3d6e, 0x12f6, 0xe781, -0x3a2e, 0x100e, 0xb4c0, 0xf87f, 0x2451, 0xce12, 0xfd54, 0x3b61, 0xe9af, 0x0485, -0x363a, 0xd7a5, 0xc531, 0x26b6, 0xfb26, 0xd3af, 0x4024, 0x13d3, 0xcf38, 0x31ca, -0x1fe6, 0xacba, 0xe830, 0x28d0, 0xd67b, 0x03f4, 0x4390, 0xeff5, 0x0d9b, 0x3cdc, -0xd2ef, 0xbce5, 0x1df5, 0xf194, 0xcc0a, 0x3c7b, 0x22be, 0xe9d0, 0x37e4, 0x1f21, -0xbf6a, 0xed14, 0x13f9, 0xccad, 0xfeed, 0x36f2, 0xe931, 0x0bd9, 0x4870, 0xe9a7, -0xc649, 0x2406, 0x009e, 0xc7de, 0x28c6, 0x1d14, 0xe19d, 0x2d2e, 0x24eb, 0xc1ae, -0xf293, 0x2948, 0xd034, 0xfc36, 0x4c80, 0xed33, 0xf76a, 0x4574, 0xe546, 0xb51f, -0x205e, 0x01e4, 0xc8f6, 0x3c9b, 0x2dfd, 0xe000, 0x3231, 0x23e4, 0xac3f, 0xe1e2, -0x2470, 0xc806, 0xf279, 0x51f9, 0xfc93, 0xfd3d, 0x471f, 0xf14b, 0xb564, 0x0d8d, -0xf7a1, 0xbaf7, 0x2ae2, 0x3330, 0xe3cf, 0x2876, 0x2f9d, 0xbe99, 0xd8ed, 0x2066, -0xcc5b, 0xe037, 0x444b, 0xfc55, 0xf1ae, 0x3dee, 0xedb1, 0xa9f3, 0x0f58, 0x052a, -0xb88b, 0x286b, 0x32e9, 0xd191, 0x1a2d, 0x2b19, 0xb1ba, 0xd055, 0x2574, 0xcd9d, -0xe17a, 0x4f5d, 0xf991, 0xe9c8, 0x4424, 0xee22, 0xa03f, 0x0b3e, 0x0833, 0xb2f6, -0x25d7, 0x3fb5, 0xd971, 0x1eca, 0x3552, 0xb55f, 0xc5ed, 0x2341, 0xd2b5, 0xd7c1, -0x523e, 0x069d, 0xe63d, 0x453d, 0xfaec, 0xa137, 0x0414, 0x12c4, 0xb981, 0x1bb8, -0x4054, 0xdb21, 0x1feb, 0x3f6a, 0xbc6b, 0xcb19, 0x2eaa, 0xdddc, 0xd782, 0x53f0, -0x0db9, 0xe5f5, 0x4ae5, 0x09f1, 0xaaaa, 0x08ea, 0x1b96, 0xc280, 0x22c4, 0x4ce0, -0xe24f, 0x1cfe, 0x4491, 0xc23a, 0xc424, 0x2faf, 0xe9a8, 0xd606, 0x50b8, 0x16c3, -0xe5a3, 0x41e4, 0x0b1a, 0xa940, 0xfef6, 0x1bdf, 0xbfb1, 0x1607, 0x4e4e, 0xe252, -0x116e, 0x44af, 0xc71f, 0xbeed, 0x2c56, 0xed57, 0xd13f, 0x46da, 0x1220, 0xdf44, -0x3fcf, 0x0e72, 0xa687, 0xfe99, 0x22c2, 0xc0f4, 0x10f5, 0x4ab0, 0xdcc9, 0x0862, -0x42d3, 0xcce8, 0xbf2b, 0x2c4a, 0xf130, 0xcf23, 0x47a0, 0x1557, 0xd894, 0x3b17, -0x15eb, 0xac91, 0xfc3e, 0x2839, 0xc889, 0x0a6b, 0x4a0a, 0xe524, 0x0571, 0x40a3, -0xd642, 0xc2d3, 0x2b1c, 0xfa19, 0xd4f9, 0x465b, 0x1ef6, 0xe106, 0x371e, 0x15ec, -0xb185, 0xfc2f, 0x2898, 0xcc97, 0x0b55, 0x4c1f, 0xebc4, 0x08bc, 0x3f08, 0xd705, -0xc599, 0x2bb5, 0x081d, 0xcd96, 0x0d3b, 0x0ffa, 0x0823, 0x3f09, 0x1a45, 0xdad9, -0x0662, 0x07b7, 0xbb6a, 0xde9a, 0x0740, 0xda46, 0x0e1e, 0x6549, 0x38b1, 0x04bd, -0x2510, 0xf943, 0xad98, 0xc9a0, 0xca5c, 0xcaba, 0x22c9, 0x2b10, 0x01f0, 0x511a, -0x637c, 0xe409, 0xcfea, 0xff1b, 0xbae4, 0x9b34, 0xfafc, 0x154f, 0xfdb5, 0x2da1, -0x2e82, 0x1b20, 0x2472, 0xf46c, 0xbc6b, 0xd8c3, 0xf895, 0xcd65, 0xe4ee, 0x20c1, -0x1821, 0x08d6, 0x178c, 0x2a03, 0x07e8, 0xfe05, 0xe136, 0xbccf, 0xeb99, 0xdae7, -0xd3aa, 0x1d70, 0x3e94, 0x094b, 0x0900, 0x5434, 0x0901, 0xc4b1, 0xdc6e, 0xc832, -0xca7f, 0xe370, 0xfc55, 0x19fb, 0x5037, 0x3174, 0xfe1c, 0x3bdc, 0x1079, 0xb5a5, -0xbd97, 0xde91, 0xd7dc, 0xd8e9, 0x1ed3, 0x2fd7, 0x3373, 0x2e1c, 0x130d, 0x2861, -0x0ada, 0xcec0, 0xaf81, 0xd3f1, 0xe991, 0xcbf7, 0x0636, 0x408c, 0x3d14, 0x22da, -0x2e7f, 0x334f, 0xf091, 0xd23f, 0xb6f6, 0xbe39, 0xe0ea, 0xdac6, 0x0ab7, 0x52de, -0x5241, 0x1a28, 0x36a7, 0x3ee4, 0xdc10, 0xbfb1, 0xc06c, 0xc69f, 0xdf82, 0xf62e, -0x1f54, 0x4e25, 0x578d, 0x17a6, 0x26c4, 0x37fc, 0xe05d, 0xc099, 0xcd8c, 0xd886, -0xd8c3, 0xfcba, 0x2d83, 0x3fa6, 0x48bb, 0x1e77, 0x2a31, 0x31eb, 0xe98e, 0xbcf5, -0xc196, 0xe4e4, 0xdb34, 0xf4b5, 0x398d, 0x47e8, 0x3526, 0x2168, 0x3d9a, 0x20eb, -0xddcb, 0xbe09, 0xb85c, 0xe775, 0xe3f6, 0xedd1, 0x3731, 0x576a, 0x2d99, 0x1229, -0x4011, 0x0fb4, 0xc58a, 0xc2e0, 0xc163, 0xd8b3, 0xe485, 0xfbc4, 0x28a2, 0x4aba, -0x2b57, 0x06a4, 0x385f, 0x150e, 0xc2cd, 0xb65c, 0xcd33, 0xde60, 0xd4fe, 0x0096, -0x3507, 0x45bc, 0x2781, 0x142c, 0x33ba, 0x049c, 0xc775, 0xb39c, 0xc6ec, 0xe39b, -0xd75b, 0x0203, 0x3c34, 0x4589, 0x1c2f, 0x171d, 0x336b, 0xeff6, 0xbf31, 0xb8c6, -0xc21c, 0xde19, 0xe412, 0x0b3a, 0x399a, 0x4631, 0x1799, 0x116c, 0x3085, 0xeefe, -0xbcec, 0xb922, 0xcdc6, 0xe051, 0xe2d7, 0x10d0, 0x38e1, 0x3dfb, 0x1356, 0x1516, -0x2876, 0xe6f8, 0xbb6a, 0xb636, 0xd128, 0xdda0, 0xdf16, 0x11df, 0x387e, 0x338c, -0x0c5c, 0x211c, 0x2422, 0xdca8, 0xbf10, 0xb435, 0xcd32, 0xde18, 0xe25f, 0x144e, -0x3fe0, 0x3472, 0x0753, 0x2b41, 0x27e8, 0xd555, 0xc117, 0xbddb, 0xcb8c, 0xdaa8, -0xee16, 0x185e, 0x406a, 0x394d, 0x0e4c, 0x3224, 0x2283, 0xcee6, 0xb78f, 0xbe46, -0xd600, 0xd73a, 0xf882, 0x2db5, 0x4253, 0x3500, 0x1558, 0x2eee, 0x13ba, 0xd1b3, -0xb80a, 0xbd32, 0xe28d, 0xdf23, 0xfd44, 0x3980, 0x4ace, 0x2d3f, 0x18f4, 0x34ae, -0x039f, 0xcc97, 0xbb5e, 0xbe2a, 0xe6fa, 0xe555, 0x023b, 0x3de8, 0x4db4, 0x2192, -0x1578, 0x3a68, 0xfe29, 0xc84a, 0xbd0b, 0xc1ef, 0xe3a9, 0xe936, 0x0a3b, 0x3ab4, -0x505a, 0x260d, 0x1903, 0x39c0, 0xf9ac, 0xc53b, 0xbc41, 0xcc45, 0xe5fc, 0xe843, -0x15b8, 0x436d, 0x4dae, 0x24c5, 0x212b, 0x33f2, 0xf1b2, 0xc3a3, 0xb509, 0xcd57, -0xe8db, 0xeb7c, 0x1d1e, 0x4aef, 0x4a01, 0x1af5, 0x24c7, 0x2df1, 0xe4a5, 0xc1ae, -0xb8ad, 0xd2c8, 0xe887, 0xee7b, 0x21d0, 0x4d5f, 0x4806, 0x171f, 0x2854, 0x27e5, -0xdd26, 0xc075, 0xb9c1, 0xd6dc, 0xe94e, 0xf760, 0x2a99, 0x4d0c, 0x4405, 0x1751, -0x2a63, 0x1e7d, 0xd670, 0xba60, 0xb674, 0xde00, 0xe8fc, 0xf57e, 0x3121, 0x51b2, -0x3a66, 0x11d4, 0x29d9, 0x107f, 0xd01f, 0xbbd1, 0xb864, 0xe08f, 0xea2a, 0xfafd, -0x34de, 0x5038, 0x3061, 0x1294, 0x3316, 0x07d3, 0xc6ab, 0xbd82, 0xc0f2, 0xe421, -0xebe4, 0x0398, 0x39c6, 0x54a2, 0x2e8b, 0x0e55, 0x3308, 0x0648, 0xc5ad, 0xbd8e, -0xc53c, 0xdfb2, 0xe8b4, 0x0f4a, 0x3d14, 0x4caa, 0x2bf1, 0x15bf, 0x2e89, 0xf945, -0xc136, 0xb890, 0xcaeb, 0xe950, 0xe7bf, 0x115d, 0x451b, 0x4aa1, 0x20cd, 0x1684, -0x2a91, 0xf0a3, 0xc5b7, 0xb815, 0xc9bf, 0xee16, 0xea12, 0x117d, 0x470b, 0x42c7, -0x113f, 0x1b7c, 0x2b91, 0xe191, 0xc212, 0xbd24, 0xc84b, 0xe419, 0xe8c1, 0x104f, -0x440c, 0x4662, 0x1122, 0x20a6, 0x2d8e, 0xda8b, 0xbcf3, 0xc089, 0xcbf5, 0xde1c, -0xf3c0, 0x2135, 0x414e, 0x3fd9, 0x15e1, 0x26f5, 0x292e, 0xdc7e, 0xb937, 0xb924, -0xd769, 0xe06d, 0xee92, 0x2aa0, 0x48ae, 0x379d, 0x15e3, 0x2afa, 0x167d, 0xd370, -0xbfeb, 0xb8aa, 0xd8da, 0xe695, 0xf331, 0x2abe, 0x4918, 0x2e1c, 0x0f19, 0x32cf, -0x0f46, 0xc822, 0xbf6b, 0xbca2, 0xdadc, 0xe628, 0xf835, 0x2cf1, 0x4b03, 0x2c10, -0x0df9, 0x358e, 0x0a2c, 0xc678, 0xc06b, 0xc05f, 0xd849, 0xe170, 0x02e1, 0x3324, -0x4bd0, 0x2fc8, 0x13c8, 0x3314, 0x0029, 0xbf2e, 0xb455, 0xc1d3, 0xe027, 0xe480, -0x0a7f, 0x2c7a, 0x5506, 0x634d, 0x2129, 0xfadf, 0xe1b5, 0xb620, 0x8bd2, 0xbfae, -0x0a2a, 0x0d5d, 0x5240, 0x8109, 0x4e83, 0x15cf, 0xf367, 0xba2c, 0x9d5f, 0xcd2e, -0xbdc8, 0xf85d, 0x6f35, 0x4484, 0x29e8, 0x54f0, 0x2a04, 0xcc06, 0xd6d5, 0xe253, -0xc387, 0x09da, 0xff4a, 0xebc6, 0x4eb3, 0x2edb, 0xcfcc, 0x0b9a, 0x3d1b, 0xdc1f, -0xf4a1, 0x3fae, 0xeb9b, 0xe915, 0x13be, 0xcb86, 0xb940, 0x1643, 0x18ee, 0xf7d9, -0x4acf, 0x30df, 0xe6dc, 0x16fe, 0xf4d5, 0x9c55, 0xcc79, 0x10aa, 0xe384, 0x0496, -0x4c2c, 0x0504, 0xff4c, 0x2d7e, 0xd93d, 0xacb4, 0x00e4, 0xf5af, 0xc18e, 0x2289, -0x2a64, 0xe0a9, 0x2089, 0x21b8, 0xbaf3, 0xdd89, 0x1ea4, 0xd2e4, 0xe648, 0x37ea, -0xec35, 0xe993, 0x35d6, 0xed2e, 0xbadd, 0x15b4, 0x0a9d, 0xc841, 0x1a7c, 0x191c, -0xcaef, 0x0f4e, 0x1fff, 0xbfae, 0xe155, 0x3460, 0xeb55, 0xe0b6, 0x3048, 0xf2f2, -0xddca, 0x235a, 0xee7f, 0xb7cc, 0x15dd, 0x2097, 0xce52, 0x180f, 0x2dcf, 0xd499, -0x0857, 0x29b8, 0xc4c2, 0xd000, 0x28ff, 0xe652, 0xde94, 0x43c5, 0x05e6, 0xe425, -0x356a, 0xfee7, 0xb2c1, 0x0914, 0x1584, 0xbe7b, 0x0e5a, 0x368a, 0xe276, 0x1274, -0x3391, 0xd008, 0xd357, 0x26c2, 0xec06, 0xdd61, 0x39e2, 0x0868, 0xe6f9, 0x3207, -0x091c, 0xbc0e, 0x0582, 0x1f6d, 0xd133, 0x1cab, 0x4d57, 0xeb81, 0x02e3, 0x3712, -0xde41, 0xc71f, 0x212b, 0xfb67, 0xe7a1, 0x504a, 0x23ac, 0xedd8, 0x3eb6, 0x157e, -0xad36, 0xfc30, 0x2995, 0xcb86, 0x10c5, 0x529b, 0xf7a7, 0x15fe, 0x4546, 0xdc21, -0xcaba, 0x26eb, 0xe984, 0xd493, 0x4c8e, 0x16e6, 0xe56c, 0x463b, 0x1cf9, 0xb4a9, -0xfd71, 0x24ab, 0xc8a4, 0x09c8, 0x41c1, 0xe4ff, 0x0a9c, 0x3d28, 0xd226, 0xc16f, -0x2d0a, 0xf732, 0xcb2f, 0x42b2, 0x1d8f, 0xd5f3, 0x2c26, 0x1649, 0xa7c7, 0xed21, -0x286f, 0xc688, 0x04e2, 0x51dd, 0xe73b, 0x0013, 0x46f0, 0xd1e8, 0xab29, 0x260f, -0xf7aa, 0xbdee, 0x402d, 0x25c0, 0xda8b, 0x3989, 0x21df, 0xa95c, 0xf0ed, 0x290b, -0xbd3d, 0xfb44, 0x4eba, 0xe63a, 0xfecd, 0x4a1d, 0xe177, 0xbc6f, 0x2af3, 0xfdf2, -0xc4cf, 0x3b3d, 0x1ebb, 0xd4a0, 0x319d, 0x221e, 0xaf94, 0xf1b0, 0x3313, 0xcaf9, -0xf7f2, 0x4fd1, 0xeb5b, 0xf54e, 0x3faa, 0xd925, 0xb016, 0x2624, 0x012e, 0xc2f3, -0x3e16, 0x255d, 0xce61, 0x2b67, 0x1e8d, 0xa020, 0xe075, 0x2e2f, 0xc930, 0xf3f3, -0x4f96, 0xe6da, 0xef8a, 0x43fb, 0xdd85, 0xab7b, 0x2022, 0xfe5f, 0xba39, 0x346d, -0x27b4, 0xd20a, 0x2bfd, 0x2882, 0xae6f, 0xe3d3, 0x2b38, 0xc9c6, 0xef8e, 0x49d8, -0xeade, 0xf2c2, 0x46de, 0xe8ca, 0xb2fe, 0x208e, 0x0855, 0xc5c4, 0x338e, 0x29eb, -0xd645, 0x257e, 0x260c, 0xb7e2, 0xebef, 0x3365, 0xd6d8, 0xf811, 0x518d, 0xf457, -0xf134, 0x4558, 0xf41a, 0xb66e, 0x1a28, 0x0bd1, 0xcaa3, 0x31f9, 0x3045, 0xe17a, -0x2ad4, 0x2f2d, 0xbd2b, 0xe13e, 0x2cfe, 0xd3bd, 0xea52, 0x4fb4, 0x020e, 0xf40a, -0x4278, 0xf8f7, 0xb45e, 0x127c, 0x0af1, 0xc2d1, 0x2b03, 0x36f1, 0xdd10, 0x20d2, -0x35ec, 0xc074, 0xd7bd, 0x2eef, 0xd9db, 0xe543, 0x52c9, 0x05cf, 0xec53, 0x41bb, -0xfa65, 0xaf2a, 0x15c6, 0x1274, 0xbe0e, 0x2c97, 0x448e, 0xdd59, 0x1c74, 0x3817, -0xbb2b, 0xcf5b, 0x2f9a, 0xdc0c, 0xe4f0, 0x586d, 0x096c, 0xe913, 0x42c2, 0xf921, -0xa4d2, 0x0f94, 0x157d, 0xbee7, 0x2a97, 0x46c2, 0xe0bf, 0x1d38, 0x3786, 0xb9af, -0xcb2a, 0x2dd9, 0xd952, 0xdcbe, 0x5596, 0x0bab, 0xea4b, 0x4531, 0xffe2, 0xa78b, -0x0c61, 0x136f, 0xb532, 0x2148, 0x44ae, 0xd96e, 0x195c, 0x392c, 0xb898, 0xc8e9, -0x3388, 0xef92, 0xcd85, 0x0ef6, 0xf796, 0x13e1, 0x506a, 0x028d, 0xcd42, 0x14f5, -0xf58e, 0x9d81, 0xe29f, 0xfb3c, 0xcd66, 0x1bbf, 0x6302, 0x30d7, 0x14e4, 0x29bc, -0xdf14, 0xae5e, 0xce80, 0xabdc, 0xca7e, 0x3503, 0x1ee4, 0xf688, 0x5aac, 0x62a7, -0xd87d, 0xd4d5, 0xfc76, 0xb6dd, 0xa5b5, 0xf6e7, 0x0b99, 0x0665, 0x381b, 0x1f19, -0x1206, 0x2ed5, 0xebdd, 0xb56d, 0xde2e, 0xf87e, 0xce4d, 0xed47, 0x2439, 0x121c, -0x1266, 0x1483, 0x16c8, 0x10fd, 0x0650, 0xd754, 0xbaff, 0xf7e2, 0xda39, 0xcd45, -0x2986, 0x40dc, 0x0e53, 0x182a, 0x50a1, 0x01de, 0xcb6e, 0xdc62, 0xb781, 0xcfc4, -0xee54, 0xf542, 0x2240, 0x5981, 0x2c5e, 0xf8e5, 0x3e3b, 0x0d29, 0xaf98, 0xc3b7, -0xd787, 0xd3b1, 0xe2e2, 0x19c0, 0x28df, 0x3943, 0x2fe3, 0x081e, 0x2922, 0x0f78, -0xc962, 0xb6cc, 0xd979, 0xe6a6, 0xd121, 0x07cf, 0x3500, 0x3ad0, 0x2c2a, 0x2624, -0x2c95, 0xfb6f, 0xd7be, 0xb61f, 0xc05e, 0xe300, 0xd931, 0x0c0c, 0x4eae, 0x4878, -0x15a7, 0x2a43, 0x31b1, 0xdd24, 0xc4ea, 0xbda7, 0xc680, 0xe6be, 0xf0c6, 0x13f8, -0x45f0, 0x4cdc, 0x09ee, 0x185b, 0x3039, 0xdd40, 0xc562, 0xd19d, 0xd51e, 0xdcc7, -0xfbf1, 0x1f9a, 0x3311, 0x4108, 0x10a0, 0x1d6d, 0x368a, 0xebc0, 0xbacd, 0xc61c, -0xe6be, 0xd8c6, 0xecc7, 0x2b4f, 0x3ad6, 0x3234, 0x16aa, 0x312b, 0x2c20, 0xe5cf, -0xbf0c, 0xc2d3, 0xef02, 0xde96, 0xe42b, 0x3264, 0x4f6e, 0x2b87, 0x1502, 0x434e, -0x2169, 0xd824, 0xcd4a, 0xcbe5, 0xe67d, 0xe8bc, 0xf5fe, 0x2bd2, 0x4fbf, 0x2b2a, -0x05aa, 0x4482, 0x2857, 0xcb20, 0xc28b, 0xdaa2, 0xe5a8, 0xd616, 0xfaa0, 0x2fc3, -0x4640, 0x2ce5, 0x0f5a, 0x3ab7, 0x1944, 0xcda3, 0xbbcb, 0xcda1, 0xe22a, 0xd491, -0x0143, 0x3873, 0x3fbe, 0x22bb, 0x1736, 0x3ae6, 0x0407, 0xc3a8, 0xb9c4, 0xc437, -0xdc67, 0xd7ba, 0x00f1, 0x3801, 0x41a0, 0x1951, 0x11c6, 0x35de, 0xf7fb, 0xbeac, -0xb811, 0xc658, 0xdc21, 0xd8e4, 0x060e, 0x39e5, 0x4146, 0x14d2, 0x16dd, 0x36f4, -0xed6d, 0xba86, 0xb9b4, 0xcb20, 0xdd7e, 0xdfe1, 0x0f15, 0x3b82, 0x3e9b, 0x1158, -0x1b8a, 0x323f, 0xe8e2, 0xbdfb, 0xb835, 0xd09f, 0xddf2, 0xdd36, 0x148a, 0x40d3, -0x3e5f, 0x13a7, 0x2794, 0x2f4a, 0xde17, 0xbd25, 0xb6e3, 0xcb99, 0xdc56, 0xe6b9, -0x1ce9, 0x4836, 0x40a4, 0x1189, 0x2c70, 0x2966, 0xd436, 0xb74c, 0xb722, 0xd074, -0xdc0f, 0xf37b, 0x2f67, 0x4c6c, 0x3aa1, 0x13df, 0x2e82, 0x1863, 0xcd4e, 0xbc3f, -0xbce0, 0xd9c4, 0xe1be, 0xfb8d, 0x359d, 0x4c01, 0x3625, 0x17b8, 0x32ce, 0x1032, -0xcc89, 0xbc30, 0xbdba, 0xe2ec, 0xe81c, 0x005e, 0x3db9, 0x512c, 0x2c97, 0x17fc, -0x380c, 0x06f5, 0xcdb1, 0xc0d4, 0xbe6b, 0xe241, 0xead9, 0x05a4, 0x3a27, 0x518a, -0x2c10, 0x187d, 0x3809, 0xfd0c, 0xc4ac, 0xbff0, 0xc939, 0xe3de, 0xe907, 0x0ded, -0x3e36, 0x4e75, 0x2456, 0x1759, 0x31b3, 0xf547, 0xc449, 0xba76, 0xcb7c, 0xe629, -0xeb17, 0x17cc, 0x43ae, 0x4970, 0x1dfb, 0x1c5c, 0x2c1b, 0xe97c, 0xc40d, 0xbedd, -0xd492, 0xe90c, 0xea14, 0x18aa, 0x44ec, 0x43bf, 0x15aa, 0x2421, 0x2f68, 0xe453, -0xc2c4, 0xbef4, 0xd4c2, 0xe5c8, 0xf22d, 0x2430, 0x475e, 0x4461, 0x187f, 0x2916, -0x2d8a, 0xe382, 0xc1ee, 0xc2fa, 0xe144, 0xe6ea, 0xf400, 0x30a7, 0x50eb, 0x4265, -0x1b39, 0x2f67, 0x2260, 0xde78, 0xc61b, 0xc3e2, 0xe4c5, 0xea6e, 0xf9b7, 0x32e4, -0x4b24, 0x330a, 0x1529, 0x377b, 0x1ad4, 0xd298, 0xc471, 0xc39e, 0xdfcf, 0xe493, -0xf83e, 0x339f, 0x5169, 0x3178, 0x0fe4, 0x3634, 0x10e7, 0xcad8, 0xc188, 0xc0cb, -0xd97a, 0xe36b, 0x01cf, 0x3255, 0x49ca, 0x2dc9, 0x1019, 0x33a3, 0x059a, 0xbd42, -0xb33f, 0xbe30, 0xd9b3, 0xdc31, 0x0338, 0x37ee, 0x44ae, 0x224f, 0x0cf2, 0x27ab, -0xf5dc, 0xbd67, 0xaf02, 0xbe02, 0xde1c, 0xd738, 0x02b2, 0x3eba, 0x4074, 0x174f, -0x1829, 0x2c82, 0xe72a, 0xbf61, 0xb6b3, 0xbe85, 0xe2b1, 0xe25f, 0x05c1, 0x4181, -0x4a2b, 0x1512, 0x1a96, 0x326a, 0xe3c7, 0xbc8c, 0xb7af, 0xbd6f, 0xd849, 0xe90a, -0x150e, 0x3ed0, 0x469e, 0x176f, 0x1b23, 0x2908, 0xdb26, 0xb2f3, 0xb1f8, 0xca6a, -0xdb06, 0xe6a5, 0x1fb9, 0x4383, 0x3e5d, 0x1596, 0x1e94, 0x1cb0, 0xd8cf, 0xba95, -0xaec4, 0xcef4, 0xe43f, 0xeaf7, 0x2443, 0x4766, 0x336a, 0x0e32, 0x27a3, 0x1356, -0xcd5d, 0xc150, 0xb6ba, 0xd1d8, 0xe528, 0xee84, 0x2426, 0x4adf, 0x3667, 0x10cd, -0x310e, 0x1388, 0xcbbb, 0xc47e, 0xbd1f, 0xd491, 0xe98e, 0x0244, 0x3289, 0x53b3, -0x3eb9, 0x1566, 0x3290, 0x11e3, 0xcc07, 0xc004, 0xc4fd, 0xe223, 0xed0a, 0x10ae, -0x3ff0, 0x5037, 0x36e6, 0x164f, 0x29a1, 0x0284, 0xcdb8, 0xbdcd, 0xc637, 0xed96, -0xeeb1, 0x0cd0, 0x4050, 0x49bb, 0x239a, 0x1780, 0x2eab, 0xf6b6, 0xce3d, 0xbc38, -0xc8a0, 0x00e6, 0xefad, 0x0021, 0x33f9, 0x3ae3, 0x3cd3, 0x3fb1, 0x1838, 0xd924, -0xd541, 0xaecf, 0xa5de, 0xf7be, 0xfc4c, 0x140b, 0x790a, 0x7937, 0x1616, 0xfecc, -0xe9f4, 0x93de, 0xa330, 0xc0f0, 0xcf7e, 0x2cbc, 0x6286, 0x4ccf, 0x462d, 0x450f, -0xe74f, 0xa99c, 0xd6b1, 0xc669, 0xba55, 0xfefe, 0x25a9, 0x3149, 0x43ec, 0x1f26, -0xede2, 0x0adf, 0xff6f, 0xbdad, 0xf121, 0x2c23, 0xf18d, 0xf0cc, 0x2718, 0xe6c1, -0xbbba, 0x1d92, 0x14c7, 0xde85, 0x3e57, 0x31f4, 0xe295, 0x0f8d, 0xf992, 0xa267, -0xd117, 0x1bec, 0xe179, 0x07c9, 0x5af9, 0x03a7, 0x02e9, 0x3014, 0xd04d, 0xa794, -0xfb7e, 0xf282, 0xc715, 0x36b9, 0x3764, 0xea25, 0x307a, 0x1cb0, 0xb2ec, 0xd406, -0x117c, 0xd2a9, 0xea54, 0x43e9, 0xfc21, 0xfaa3, 0x3fc1, 0xeafd, 0xb060, 0x0b4c, -0x0ff9, 0xc461, 0x1954, 0x3040, 0xd984, 0x1601, 0x2825, 0xbc3f, 0xdbce, 0x3875, -0xe248, 0xdd2e, 0x4e02, 0xfd2c, 0xd91c, 0x3749, 0xf658, 0xaa69, 0x13e1, 0x2498, -0xcc14, 0x21ba, 0x3a26, 0xdb15, 0x1623, 0x2c3d, 0xba40, 0xcd2e, 0x2cf5, 0xe4ae, -0xe186, 0x52e0, 0x0d31, 0xe5cf, 0x3778, 0xffc1, 0xac3d, 0xfddf, 0x1bac, 0xc8ec, -0x14d4, 0x4029, 0xe79d, 0x15d6, 0x3792, 0xcc34, 0xca86, 0x3225, 0xf50a, 0xcf32, -0x3e28, 0x12b9, 0xe181, 0x364b, 0x1002, 0xb4c9, 0x031c, 0x26d6, 0xd0a9, 0x1e6a, -0x443a, 0xd350, 0x08d3, 0x41ed, 0xc7a2, 0xb99c, 0x2fe3, 0xff21, 0xdc75, 0x4839, -0x19bb, 0xe84c, 0x32f7, 0x01b7, 0xaddf, 0xfef1, 0x1e1c, 0xcae8, 0x16e4, 0x4bda, -0xecbb, 0x0caf, 0x3f24, 0xe0dc, 0xc4bc, 0x18da, 0xf67e, 0xdd77, 0x3908, 0x10f4, -0xed5b, 0x4369, 0x1b8d, 0xb980, 0x0190, 0x297a, 0xc6e3, 0x009e, 0x4462, 0xea33, -0x0155, 0x3cba, 0xe27f, 0xcbef, 0x2bda, 0xf9a0, 0xd4bc, 0x439f, 0x150b, 0xd559, -0x344d, 0x1a5b, 0xaf57, 0xf935, 0x2de0, 0xcf9a, 0x0979, 0x49a9, 0xea95, 0x051a, -0x3cdb, 0xd6df, 0xbc25, 0x2174, 0xf28b, 0xc89b, 0x4222, 0x2645, 0xdfc1, 0x315e, -0x201e, 0xb2fc, 0xe3d4, 0x181b, 0xc442, 0xfd80, 0x4a43, 0xed31, 0xff1f, 0x4381, -0xdf06, 0xb4dc, 0x1fd7, 0xf6dc, 0xbffe, 0x3a30, 0x24f3, 0xd6d6, 0x297b, 0x1c5d, -0xaf37, 0xedb8, 0x286b, 0xc61d, 0xfe95, 0x515b, 0xe559, 0xf3c9, 0x4090, 0xd830, -0xae85, 0x1db8, 0xf7ec, 0xc607, 0x3f9f, 0x264d, 0xd94a, 0x2a8a, 0x1485, 0xa002, -0xdeaf, 0x235b, 0xc381, 0xfa49, 0x5796, 0xefa6, 0xf6b9, 0x4056, 0xd904, 0xa813, -0x17bf, 0xf931, 0xbf26, 0x3e31, 0x2c1d, 0xd50a, 0x2d55, 0x22b9, 0xa846, 0xdf9f, -0x28c5, 0xc598, 0xef6b, 0x51e5, 0xf17d, 0xfa6e, 0x46ce, 0xddcb, 0xac63, 0x1bcf, -0xff42, 0xc08e, 0x3b8a, 0x30ab, 0xd540, 0x2b2a, 0x2b14, 0xb01e, 0xe003, 0x2eb4, -0xd207, 0xf705, 0x5a04, 0xf5f1, 0xf4f2, 0x49c1, 0xe735, 0xac7d, 0x1ff2, 0x0bc1, -0xc150, 0x3a15, 0x3cd0, 0xdc44, 0x29ee, 0x3079, 0xb504, 0xdcbb, 0x2cd7, 0xcfca, -0xeed8, 0x5c84, 0xfe19, 0xf346, 0x4ec0, 0xf24e, 0xa9a2, 0x1b01, 0x120e, 0xbf61, -0x31bd, 0x3ed0, 0xdca8, 0x27d7, 0x3553, 0xb79f, 0xddc0, 0x376a, 0xd743, 0xea45, -0x592a, 0xf9f4, 0xe94c, 0x4a1d, 0xf552, 0xa9a1, 0x19d2, 0x14c6, 0xbc9b, 0x2b11, -0x3913, 0xd2dc, 0x1f02, 0x340a, 0xb6b6, 0xd426, 0x33f8, 0xd9a8, 0xdc7f, 0x5123, -0xfd3a, 0xde46, 0x40ce, 0xfa10, 0xa997, 0x14a8, 0x1bb4, 0xc08d, 0x2376, 0x3d24, -0xd503, 0x166b, 0x35f1, 0xbc86, 0xd0fa, 0x36e8, 0xf1a1, 0xd628, 0x16ed, 0xf145, -0x0d1a, 0x55e9, 0x09b3, 0xd0ea, 0x189e, 0xfae5, 0xa1d9, 0xe581, 0xfd1f, 0xd241, -0x1ffa, 0x5b9f, 0x2d05, 0x1f94, 0x316b, 0xe330, 0xba22, 0xd9ab, 0xb354, 0xcfaa, -0x3059, 0x1e34, 0xfcfc, 0x565e, 0x623a, 0xe738, 0xe027, 0xfe57, 0xc099, 0xb327, -0xf470, 0x0c3c, 0x0e38, 0x38fd, 0x1a11, 0x0892, 0x3339, 0xf5c3, 0xbab1, 0xe297, -0xf843, 0xce95, 0xe620, 0x1c2a, 0x09ee, 0x1283, 0x1b02, 0x1187, 0x188b, 0x0e86, -0xd87e, 0xb652, 0xeca9, 0xdb2d, 0xc7dd, 0x1fe5, 0x379e, 0x0fd2, 0x1c45, 0x4c2e, -0x1316, 0xd85d, 0xdfc8, 0xb6df, 0xc87f, 0xeb35, 0xe54a, 0x1628, 0x57e4, 0x3419, -0xff6c, 0x4156, 0x1c74, 0xb5b4, 0xca06, 0xd49b, 0xc6db, 0xdff3, 0x0f42, 0x1c9b, -0x38c2, 0x3cc3, 0x059b, 0x2a27, 0x2699, 0xce85, 0xb4f9, 0xd393, 0xdea9, 0xcdb3, -0x03e7, 0x3281, 0x3d54, 0x3c61, 0x2583, 0x2ce2, 0x0c86, 0xdb4d, 0xb3bf, 0xbb9c, -0xe353, 0xd3fa, 0x034f, 0x4cdb, 0x4ab4, 0x21fa, 0x2b59, 0x391f, 0xeb27, 0xc6cb, -0xb8e4, 0xba9a, 0xe811, 0xec0e, 0x0c31, 0x4bdb, 0x5772, 0x163d, 0x1a19, 0x3f4d, -0xe9e8, 0xc3a2, 0xce2a, 0xc788, 0xd9f4, 0xf83e, 0x1bc6, 0x3ce8, 0x5548, 0x1db0, -0x1a55, 0x4521, 0xf1e2, 0xb3ab, 0xc2fd, 0xdbe1, 0xd800, 0xed52, 0x2c30, 0x402d, -0x430b, 0x23ff, 0x260b, 0x2f76, 0xea68, 0xb3d7, 0xb28e, 0xe14a, 0xdd06, 0xe066, -0x33b3, 0x51ec, 0x33b4, 0x1667, 0x3052, 0x1b77, 0xd41e, 0xc1bd, 0xb6c4, 0xd7a4, -0xeae0, 0xe9c9, 0x2119, 0x50ee, 0x3348, 0x0504, 0x35a7, 0x2224, 0xc555, 0xbad4, -0xc362, 0xd0c4, 0xdade, 0xf6c3, 0x247a, 0x463c, 0x3726, 0x098e, 0x2ae9, 0x1a2f, -0xc9d7, 0xb0fe, 0xc012, 0xdaac, 0xd5e1, 0xf9b0, 0x351f, 0x47da, 0x2cc6, 0x10fb, -0x2d9f, 0x068e, 0xc5e3, 0xb7fe, 0xc297, 0xe2b0, 0xe422, 0x01db, 0x36ef, 0x48cb, -0x23b7, 0x10de, 0x3507, 0x0307, 0xc7bf, 0xbff3, 0xc77c, 0xe128, 0xe56e, 0x0857, -0x3924, 0x4aaf, 0x2249, 0x103e, 0x31eb, 0xfa7b, 0xc42a, 0xbff2, 0xca69, 0xdf50, -0xe715, 0x1070, 0x37d6, 0x4303, 0x1eac, 0x16ba, 0x3184, 0xf739, 0xc4f5, 0xba46, -0xcd7e, 0xe4d0, 0xe592, 0x10ee, 0x3d09, 0x4044, 0x17ce, 0x2016, 0x2f3f, 0xe9e5, -0xc633, 0xbad5, 0xc6f9, 0xdeac, 0xe624, 0x121c, 0x413b, 0x4301, 0x1783, 0x29fd, -0x2ba5, 0xdaa4, 0xbe2e, 0xbb8e, 0xcbc8, 0xdde4, 0xf1e9, 0x21db, 0x439b, 0x4190, -0x172e, 0x27a0, 0x21f8, 0xd636, 0xbad8, 0xb8bf, 0xd096, 0xdf64, 0xf8a8, 0x2b93, -0x443b, 0x3b96, 0x185e, 0x26da, 0x10a6, 0xd167, 0xbdb5, 0xb977, 0xdb3a, 0xe708, -0xfa86, 0x2f52, 0x4806, 0x3265, 0x17a3, 0x31bc, 0x0e05, 0xd510, 0xc461, 0xbd66, -0xe192, 0xed77, 0x0119, 0x32ba, 0x50ed, 0x31ea, 0x16d3, 0x36ec, 0x0732, 0xcfc7, -0xc460, 0xc184, 0xdf83, 0xea58, 0x0626, 0x3550, 0x5246, 0x2def, 0x16cd, 0x3427, -0xfd3a, 0xc953, 0xbd3c, 0xc544, 0xe4ec, 0xf153, 0x166b, 0x3e10, 0x4e6d, 0x26d4, -0x1968, 0x2f16, 0xf428, 0xcae0, 0xbedd, 0xccf8, 0xe956, 0xefa2, 0x1950, 0x4297, -0x4a75, 0x1de5, 0x1955, 0x29ba, 0xeb91, 0xc61c, 0xbb12, 0xce33, 0xe7ce, 0xefe6, -0x18c6, 0x3e32, 0x43c5, 0x1922, 0x1cc3, 0x20fd, 0xde2b, 0xbf55, 0xb70b, 0xd16f, -0xe788, 0xef8e, 0x20c4, 0x4654, 0x3d93, 0x11d7, 0x1d2e, 0x15c5, 0xd810, 0xc122, -0xb7df, 0xd5bd, 0xe934, 0xf5a0, 0x24cd, 0x4321, 0x356b, 0x10be, 0x2522, 0x0e25, -0xcdbf, 0xc120, 0xbd1c, 0xd9ef, 0xe950, 0xf8ec, 0x2940, 0x4a04, 0x31e9, 0x09bb, -0x2935, 0x0de2, 0xcd32, 0xc3e0, 0xc0ad, 0xd96f, 0xebee, 0x0617, 0x2f65, 0x4a9d, -0x32b8, 0x104d, 0x2b20, 0x042c, 0xc6fe, 0xc0fc, 0xccb1, 0xe4c6, 0xe7e5, 0x0a2f, -0x3646, 0x44a9, 0x27ed, 0x0f84, 0x2482, 0xf9ba, 0xc9c9, 0xbc46, 0xc6f1, 0xe7c9, -0xe7b4, 0x0935, 0x38ab, 0x3dfb, 0x17f4, 0x1202, 0x2366, 0xe8cf, 0xc894, 0xc02b, -0xc4e7, 0xe682, 0xe9b4, 0x07dc, 0x39bc, 0x4323, 0x1255, 0x11a3, 0x2383, 0xde38, -0xc201, 0xc28c, 0xc797, 0xe30e, 0xf319, 0x11aa, 0x3329, 0x3e07, 0x11d9, 0x1242, -0x2173, 0xdd6c, 0xbc12, 0xbfc4, 0xd3cc, 0xe301, 0xf14f, 0x1ed7, 0x3c0b, 0x3bbe, -0x150a, 0x16d9, 0x1504, 0xded6, 0xc844, 0xc0c3, 0xdedd, 0xf0d7, 0xf666, 0x25d8, -0x4424, 0x33d0, 0x130e, 0x2876, 0x1370, 0xd7a6, 0xcf17, 0xc604, 0xdfb9, 0xf3d2, -0xfde9, 0x29bc, 0x4a3a, 0x328f, 0x0b59, 0x293f, 0x0f84, 0xd398, 0xd04b, 0xc938, -0xdc96, 0xf077, 0x05ff, 0x2a1d, 0x46e9, 0x33e3, 0x0e06, 0x27af, 0x084b, 0xcbee, -0xc5ed, 0xce50, 0xe4ec, 0xee95, 0x0fc4, 0x3481, 0x4291, 0x2ab8, 0x0ee7, 0x217a, -0xfbca, 0xd072, 0xc584, 0xcdc2, 0xeeae, 0xf284, 0x0beb, 0x2a91, 0x499c, 0x4ab9, -0x1751, 0xfb4e, 0xdff4, 0xc548, 0xaa11, 0xcb25, 0x079b, 0x0c5f, 0x3e98, 0x6247, -0x3e07, 0x0f43, 0xf0e4, 0xca5f, 0xb34f, 0xd401, 0xc893, 0xf3d1, 0x4c26, 0x308b, -0x22b3, 0x41c0, 0x2279, 0xdc8b, 0xdff8, 0xe310, 0xcceb, 0x027f, 0xf615, 0xee06, -0x3db0, 0x2392, 0xe01d, 0x1366, 0x3415, 0xe34c, 0xf6fc, 0x29c3, 0xe8c4, 0xee7a, -0x0fa2, 0xddee, 0xd84b, 0x1d1b, 0x1722, 0xff58, 0x3ac2, 0x1f74, 0xf03f, 0x1870, -0xfcd6, 0xbff1, 0xe68f, 0x1180, 0xed1f, 0x0a12, 0x3895, 0x07ec, 0x0a31, 0x24b3, -0xe648, 0xc9fc, 0x0734, 0xf757, 0xd412, 0x1f4f, 0x1e8b, 0xee37, 0x1f0e, 0x1be3, -0xd43a, 0xefa3, 0x194b, 0xddce, 0xf237, 0x287d, 0xeedf, 0xf88e, 0x2f7f, 0xf704, -0xd874, 0x1c88, 0x0972, 0xd8d5, 0x1702, 0x0f28, 0xe05e, 0x15f4, 0x1a7c, 0xd9ff, -0xf6eb, 0x29b0, 0xf002, 0xf068, 0x23d5, 0xf4b8, 0xf046, 0x1d23, 0xf157, 0xd110, -0x1519, 0x14cc, 0xdede, 0x142d, 0x1a12, 0xe515, 0x0b1c, 0x1636, 0xd4d5, 0xe629, -0x1cf8, 0xe7c6, 0xea58, 0x2b1f, 0xfc3e, 0xeeea, 0x236a, 0xfb53, 0xcfca, 0x089d, -0x0488, 0xd160, 0x0a55, 0x141d, 0xe5cd, 0x107d, 0x186d, 0xd8c8, 0xeaf7, 0x1870, -0xe826, 0xe955, 0x18d7, 0xf4b0, 0xf2f4, 0x198f, 0xf637, 0xd898, 0x0a60, 0x099d, -0xe121, 0x112c, 0x19f0, 0xe9f0, 0x0257, 0x16f3, 0xea68, 0xe825, 0x11db, 0xf73d, -0xf784, 0x22c2, 0x01a7, 0xfa94, 0x2329, 0xff98, 0xd3ac, 0x066b, 0x0f20, 0xe092, -0x0cc3, 0x1ddc, 0xf6f5, 0x1320, 0x1de5, 0xe877, 0xf111, 0x167b, 0xeabe, 0xf59b, -0x2682, 0xf99e, 0xf763, 0x2689, 0x0359, 0xdfbd, 0x0e98, 0x0da2, 0xe78d, 0x0e20, -0x0ddb, 0xeff0, 0x11e2, 0x1312, 0xe459, 0xf4b0, 0x1704, 0xee92, 0xf4ab, 0x1ec2, -0xfc20, 0xf450, 0x169f, 0xfcad, 0xdbac, 0x0468, 0x089e, 0xe794, 0x0e53, 0x118e, -0xefe9, 0x0e4a, 0x169a, 0xe1da, 0xebc0, 0x15eb, 0xefcb, 0xf2ee, 0x1beb, 0xfce8, -0xfa9c, 0x1c17, 0xffdb, 0xe6b1, 0x0fc5, 0x065c, 0xe6be, 0x10a6, 0x0c31, 0xefee, -0x1306, 0x13f9, 0xe94c, 0xfe45, 0x19f0, 0xf32a, 0xfe85, 0x1905, 0xf62a, 0xfd6b, -0x1747, 0xf729, 0xeaea, 0x11d1, 0x0593, 0xf301, 0x1786, 0x0b5f, 0xf124, 0x0940, -0x0668, 0xe6ec, 0xfe96, 0x1506, 0xf474, 0x04f3, 0x1923, 0xf708, 0xfe00, 0x1197, -0xf0a5, 0xe784, 0x0dcb, 0xff73, 0xf084, 0x1476, 0x091e, 0xf640, 0x0af0, 0x0286, -0xe773, 0xfd6b, 0x0efa, 0xf175, 0xf89a, 0x07af, 0xf9a6, 0x0516, 0x128d, 0x00ff, -0xfb4e, 0x0ed0, 0xfc70, 0xe60e, 0xf53d, 0xf46c, 0xf494, 0x0bff, 0x1551, 0x06e1, -0x0c9f, 0x0f55, 0xefab, 0xed70, 0xf731, 0xf0fe, 0xfd13, 0x0d56, 0x068f, 0x0174, -0x0fee, 0xffe4, 0xea15, 0xfb9a, 0xffd4, 0xf166, 0xfe33, 0x0e6f, 0xfeb8, 0x0068, -0x0cad, 0xf543, 0xef47, 0x0118, 0xf5be, 0xeb4f, 0x04dc, 0x09b3, 0xf586, 0x0081, -0x05bb, 0xf123, 0xf60d, 0x03d9, 0xf8d9, 0xfe28, 0x0dac, 0xfb79, 0xf27c, 0xfe7f, -0xf2c5, 0xeeb0, 0x04d2, 0x030d, 0xfb07, 0x0e9e, 0x0d11, 0xf686, 0xfc94, 0xffbf, -0xed59, 0xf589, 0x05ab, 0xfa48, 0xffa7, 0x10c1, 0x014b, 0xfa25, 0x09af, 0xfdfc, -0xf0ef, 0x03b9, 0x0400, 0xf635, 0x063f, 0x0b0b, 0xf9ca, 0x03dd, 0x0d8d, 0xfce6, -0x00df, 0x0f4b, 0x024e, 0xff59, 0x0dc5, 0x0159, 0xf654, 0x067a, 0x0580, 0xfe5c, -0x0e74, 0x0f97, 0x0220, 0x099e, 0x09f1, 0xf6cc, 0xfa19, 0x04a0, 0xfb69, 0x0199, -0x10a2, 0x0726, 0x02f2, 0x0c0d, 0x00c5, 0xf7e4, 0x056d, 0x020c, 0xf921, 0x0880, -0x0a05, 0xfc9b, 0x05b1, 0x0ba8, 0xfd73, 0x0126, 0x0afa, 0xfedb, 0xfe8e, 0x0754, -0xff08, 0x010e, 0x0a12, 0xff2a, 0xfc7a, 0x0965, 0x0306, 0xfbf9, 0x0735, 0x05c2, -0xfdbe, 0x020b, 0x01d4, 0xfd23, 0x035d, 0x0690, 0x0006, 0x0536, 0x0b42, 0x02fd, -0x0048, 0x04d9, 0xffac, 0xfb96, 0x0522, 0x06ea, 0x01a3, 0x0640, 0x0721, 0x02e7, -0x04ad, 0x0494, 0xfe70, 0x009e, 0x0380, 0xfafb, 0xfecf, 0x0890, 0x0224, 0xffd6, -0x0613, 0x005f, 0xfada, 0x0129, 0xfdf3, 0xf949, 0x014d, 0x006d, 0xfa91, 0x0029, -0x002c, 0xf7d8, 0xff02, 0x0615, 0xfbc4, 0xfc2b, 0x035b, 0xfb89, 0xf601, 0xfa4f, -0xfabf, 0xfbd9, 0x00a3, 0xfe0a, 0xfbd4, 0x0009, 0xfe8b, 0xf866, 0xf96c, 0xfcbd, -0xf750, 0xf6d5, 0xfee5, 0xfea6, 0xfc47, 0x00a5, 0x013f, 0xfaa4, 0xf910, 0xf98a, -0xf6f0, 0xfa55, 0xfc01, 0xfac1, 0xff53, 0x001d, 0xfac1, 0xfb9d, 0xfef2, 0xf9c9, -0xf9ce, 0xff10, 0xfabf, 0xfab8, 0xfe59, 0xfa05, 0xfa90, 0x00a1, 0xff54, 0xfdbe, -0x0243, 0xff6b, 0xfac6, 0xfde2, 0xfc78, 0xf927, 0xfc12, 0xfe2f, 0xfc8a, 0xfe15, -0x00a9, 0xff55, 0x0011, 0x0049, 0xfbfb, 0xfa18, 0xfd23, 0xfbc7, 0xf7ac, 0xfd25, -0x019e, 0x0030, 0x02a9, 0x0344, 0x0053, 0x0036, 0x003f, 0xfc42, 0xfd77, 0x047f, -0x022f, 0xffd5, 0x0747, 0x065b, 0xffcd, 0x058c, 0x0801, 0x00b8, 0x029f, 0x057c, -0x0228, 0x02a9, 0x03ae, 0x0336, 0x052e, 0x06d3, 0x0355, 0x0367, 0x097b, 0x0767, -0x040b, 0x0708, 0x062b, 0x00f3, 0x010e, 0x0624, 0x0661, 0x0641, 0x0870, 0x08cf, -0x095c, 0x0672, 0x0114, 0x0064, 0x0450, 0x0372, 0x00f0, 0x074e, 0x0927, 0x0375, -0x04d0, 0x06fa, 0x0278, 0x00e0, 0x023e, 0x0105, 0x0392, 0x0478, 0x01dc, 0x0633, -0x06ad, 0x0137, 0x035b, 0x071e, 0x039a, 0x00b9, 0x0238, 0x0257, 0x03b3, 0x032c, -0x00b5, 0x062b, 0x0920, 0x0425, 0x05d7, 0x09b0, 0x0457, 0x011e, 0x02cb, 0x0112, -0x01e7, 0x03e0, 0x04a0, 0x09f0, 0x0993, 0x025d, 0x03ab, 0x06f0, 0x01ce, 0xffa9, -0x0343, 0x03bf, 0x02bc, 0x0192, 0x0175, 0x03f8, 0x025f, 0xfe13, 0xffaf, 0x037b, -0x017f, 0xff0d, 0x010c, 0x01cc, 0xff47, 0xfda7, 0xff79, 0xffc8, 0xfd08, 0xfdcd, -0x01e5, 0x03c0, 0x00fa, 0xfdf8, 0xfdb9, 0xff87, 0xff9b, 0xfbe2, 0xfeae, 0x0380, -0x0014, 0xfe6f, 0x0115, 0x0048, 0xfe1d, 0xff3b, 0xff7b, 0xff0a, 0x0012, 0xfed0, -0xfed6, 0xffe0, 0xfcbf, 0xfbdb, 0x005d, 0xffb1, 0xf9ae, 0xfb2b, 0x0004, 0xff44, -0xfc6c, 0xfb62, 0xfdf8, 0xff0d, 0xfbbb, 0xfae7, 0xfd8a, 0xfd70, 0xfaee, 0xfbe3, -0xfdf3, 0xfc89, 0xfa9a, 0xfb6e, 0xfd82, 0xfcb8, 0xfaa3, 0xfc2a, 0xfeb9, 0xfc5c, -0xf8a1, 0xfb85, 0x000c, 0xfee7, 0xfbc5, 0xfc1f, 0xfee8, 0xfdac, 0xfae0, 0xfc8b, -0xfef5, 0xfebd, 0xfdf5, 0xfec1, 0x0023, 0xff0f, 0xfc4a, 0xfdd7, 0x00f5, 0xfea6, -0xfd0c, 0x002f, 0x0087, 0xfc77, 0xfc93, 0x0024, 0x013b, 0x00dc, 0xfdb0, 0xfcbd, -0x0060, 0xfed8, 0xfc65, 0xfff5, 0x0160, 0xfef8, 0x0045, 0x0243, 0x0065, 0xfff6, -0x0124, 0x00f9, 0x00f5, 0x00ae, 0xff8e, 0x00df, 0x02e1, 0xffa3, 0xfea2, 0x0390, -0x035d, 0xff35, 0xff1f, 0x009b, 0x0048, 0xffed, 0x0005, 0xfff7, 0x0019, 0xff23, -0xfe36, 0xff91, 0x0112, 0x0088, 0xfff6, 0x00fa, 0x00a3, 0xfe18, 0xfe82, 0x01b6, -0x00ae, 0xfead, 0x018f, 0x02ef, 0x0126, 0x002b, 0xffb6, 0x01e3, 0x0382, 0x00b0, -0x00bd, 0x0402, 0x024e, 0x0002, 0x02e3, 0x0327, 0x00b6, 0x01cf, 0x02ca, 0x0250, -0x0280, 0x01bd, 0x021d, 0x04f6, 0x0340, 0xfee9, 0x0095, 0x0305, 0x00bc, 0x012c, -0x04fc, 0x0469, 0x0257, 0x027e, 0x0242, 0x01ad, 0x014b, 0x00c3, 0x0147, 0x037a, -0x036a, 0x00b5, 0x0068, 0x0121, 0xff9a, 0xfec8, 0x0143, 0x0151, 0xfd18, 0xfced, -0xffbd, 0x0066, 0x007d, 0xff3b, 0xfdd4, 0xfe9a, 0xff0d, 0xfdc1, 0xfe33, 0xffd7, -0xfd45, 0xfbe9, 0xffc6, 0xff2d, 0xfb3e, 0xfd69, 0x0057, 0xff59, 0xffc4, 0x00ad, -0x0017, 0xffc4, 0xfde4, 0xfc22, 0xfe08, 0x004b, 0xffd4, 0x0028, 0x0265, 0x00fa, -0xfdc5, 0xfe0b, 0xff0e, 0xfe78, 0xfdca, 0xfe74, 0xff9b, 0x005c, 0x0106, 0x00eb, -0x015c, 0x01a8, 0xff52, 0xfee2, 0x00ee, 0xffbe, 0xfec8, 0x010d, 0x01ab, 0x00d9, -0x0106, 0x010d, 0x00e8, 0x0118, 0x00e8, 0x012b, 0x02b4, 0x0211, 0xff7a, 0xff8e, -0x0115, 0x0100, 0x00de, 0x02dd, 0x0379, 0x00f9, 0xffd1, 0x0018, 0xfff6, 0xfffa, -0x000c, 0xfff1, 0x0004, 0x0012, 0xffc4, 0x009c, 0x010c, 0xfffb, 0xffe4, 0x001a, -0xfff2, 0xfffc, 0x0012, 0xffe2, 0x0015, 0x015a, 0x0257, 0x01c9, 0x004d, 0xfff9, -0xffdd, 0x0059, 0x019b, 0x004f, 0x0095, 0x030f, 0x0191, 0xff96, 0x015d, 0x0296, -0x01ee, 0x0205, 0x01f5, 0x0220, 0x0303, 0x0276, 0x01b6, 0x02a2, 0x02f4, 0x01f9, -0x0209, 0x01e3, 0x0073, 0x00ad, 0x0219, 0x0205, 0x00f2, 0x000a, 0xffc0, 0x00c9, -0x0105, 0xffac, 0x007c, 0x0198, 0x0051, 0xffcf, 0x001b, 0xfff4, 0x0001, 0x0002, -0xfffe, 0xfffb, 0x0005, 0xfffd, 0xfff3, 0x0025, 0xff14, 0xfe3b, 0xffa5, 0xfffc, -0xfee0, 0xff17, 0xffe8, 0x0010, 0xffec, 0x0017, 0xffe5, 0xff21, 0xfef3, 0xfef8, -0xff4b, 0x002c, 0xffc0, 0xfee9, 0xffc3, 0x001f, 0xff65, 0xffbc, 0x001d, 0xfff2, -000000, 0x0003, 0xfffc, 0xfffc, 0x000a, 0xffec, 0x0015, 0x0095, 0x002c, 0xffc9, -0x006a, 0x0078, 0xfff2, 0xfffb, 0x0006, 0xfffa, 0x0002, 0xfffd, 0x0004, 0xfff4, -0x0010, 0xfff2, 0xfff7, 0x003a, 0xfeb1, 0xfe3a, 0xfff4, 0x0020, 0xffde, 0x0015, -0xfff6, 000000, 0x0002, 0xfffc, 0x0001, 0xfffe, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, -000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000, 000000 }; diff --git a/libs/libiax2/src/ringtone.h b/libs/libiax2/src/ringtone.h deleted file mode 100644 index 637021d3412b5db0682113e57de9ddc8d463576d..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/ringtone.h +++ /dev/null @@ -1,30 +0,0 @@ -/* ringtone.h: Generated from frequencies 440 and 480 - by gensound. 200 samples */ -static short ringtone[200] = { - 0, 11581, 21659, 28927, 32445, 31764, 26981, 18727, - 8084, -3559, -14693, -23875, -29927, -32083, -30088, -24228, - -15290, -4453, 6864, 17195, 25212, 29902, 30693, 27526, - 20856, 11585, 944, -9673, -18899, -25560, -28837, -28357, - -24244, -17089, -7868, 2192, 11780, 19667, 24872, 26779, - 25212, 20450, 13179, 4396, -4731, -13019, -19421, -23164, - -23839, -21446, -16384, -9384, -1408, 6484, 13281, 18145, - 20517, 20182, 17286, 12301, 5951, -887, -7314, -12519, - -15886, -17068, -16017, -12983, -8458, -3109, 2327, 7142, - 10750, 12757, 13007, 11585, 8793, 5095, 1044, -2800, - -5951, -8053, -8921, -8560, -7141, -4967, -2421, 104, - 2260, 3791, 4567, 4589, 3977, 2941, 1733, 600, - -257, -722, -772, -481, 0, 481, 772, 722, - 257, -600, -1733, -2941, -3977, -4589, -4567, -3791, - -2260, -104, 2421, 4967, 7141, 8560, 8921, 8053, - 5951, 2800, -1044, -5095, -8793, -11585, -13007, -12757, - -10750, -7142, -2327, 3109, 8458, 12983, 16017, 17068, - 15886, 12519, 7314, 887, -5951, -12301, -17286, -20182, - -20517, -18145, -13281, -6484, 1408, 9384, 16384, 21446, - 23839, 23164, 19421, 13019, 4731, -4396, -13179, -20450, - -25212, -26779, -24872, -19667, -11780, -2192, 7868, 17089, - 24244, 28357, 28837, 25560, 18899, 9673, -944, -11585, - -20856, -27526, -30693, -29902, -25212, -17195, -6864, 4453, - 15290, 24228, 30088, 32083, 29927, 23875, 14693, 3559, - -8084, -18727, -26981, -31764, -32445, -28927, -21659, -11581, - -}; diff --git a/libs/libiax2/src/winiphone.c b/libs/libiax2/src/winiphone.c deleted file mode 100644 index 0bc3147b7ce2130ff5ff6c7ca3987cf434b4e76d..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/winiphone.c +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Miniphone: A simple, command line telephone - * - * IAX Support for talking to Asterisk and other Gnophone clients - * - * Copyright (C) 1999, Linux Support Services, Inc. - * - * Mark Spencer <markster@linux-support.net> - * - * This program is free software, distributed under the terms of - * the GNU General Public License - */ - -/* #define PRINTCHUCK /* enable this to indicate chucked incomming packets */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <io.h> -#include <conio.h> -#include <stdio.h> -#include <errno.h> -#include <time.h> -#include <process.h> -#include <windows.h> -#include <winsock.h> -#include <mmsystem.h> -#include <malloc.h> -#include "gsm.h" -#include "iax-client.h" -#include "frame.h" -#include "miniphone.h" - - -struct peer { - int time; - gsm gsmin; - gsm gsmout; - - struct iax_session *session; - struct peer *next; -}; - -static struct peer *peers; -static int answered_call = 0; - -/* stuff for wave audio device */ -HWAVEOUT wout; -HWAVEIN win; - -typedef struct whout { - WAVEHDR w; - short data[160]; - struct whout *next; -} WHOUT; - -WHOUT *outqueue = NULL; - -/* parameters for audio in */ -#define NWHIN 8 /* number of input buffer entries */ -/* NOTE the OUT_INTERVAL parameter *SHOULD* be more around 18 to 20 or so, since the packets should -be spaced by 20 milliseconds. However, in practice, especially in Windoze-95, setting it that high -caused underruns. 10 is just ever so slightly agressive, and the receiver has to chuck a packet -every now and then. Thats about the way it should be to be happy. */ -#define OUT_INTERVAL 10 /* number of ms to wait before sending more data to peer */ -/* parameters for audio out */ -#define OUT_DEPTH 12 /* number of outbut buffer entries */ -#define OUT_PAUSE_THRESHOLD 2 /* number of active entries needed to start output (for smoothing) */ - -/* audio input buffer headers */ -WAVEHDR whin[NWHIN]; -/* audio input buffers */ -char bufin[NWHIN][320]; - -/* initialize the sequence variables for the audio in stuff */ -unsigned int whinserial = 1,nextwhin = 1; - -static struct peer *find_peer(struct iax_session *); -static void parse_args(FILE *, unsigned char *); -void do_iax_event(FILE *); -void call(FILE *, char *); -void answer_call(void); -void reject_call(void); -static void handle_event(FILE *, struct iax_event *e, struct peer *p); -void parse_cmd(FILE *, int, char **); -void issue_prompt(FILE *); -void dump_array(FILE *, char **); - -static char *help[] = { -"Welcome to the miniphone telephony client, the commands are as follows:\n", -"Help\t\t-\tDisplays this screen.", -"Call <Number>\t-\tDials the number supplied.", -"Answer\t\t-\tAnswers an Inbound call.", -"Reject\t\t-\tRejects an Inbound call.", -"Dump\t\t-\tDumps (disconnects) the current call.", -"Dtmf <Digit>\t-\tSends specified DTMF digit.", -"Status\t\t-\tLists the current sessions and their current status.", -"Quit\t\t-\tShuts down the client.", -"", -0 -}; - -static struct peer *most_recent_answer; -static struct iax_session *newcall = 0; - -/* holder of the time, relative to startup in system ticks. See our -gettimeofday() implementation */ -time_t startuptime; - -/* routine called at exit to shutdown audio I/O and close nicely. -NOTE: If all this isnt done, the system doesnt not handle this -cleanly and has to be rebooted. What a pile of doo doo!! */ -void killem(void) -{ - waveInStop(win); - waveInReset(win); - waveInClose(win); - waveOutReset(wout); - waveOutClose(wout); - WSACleanup(); /* dont forget socket stuff too */ - return; -} - -/* Win-doze doenst have gettimeofday(). This sux. So, what we did is -provide some gettimeofday-like functionality that works for our purposes. -In the main(), we take a sample of the system tick counter (into startuptime). -This function returns the relative time since program startup, more or less, -which is certainly good enough for our purposes. */ -void gettimeofday(struct timeval *tv, struct timezone *tz) -{ - long l = startuptime + GetTickCount(); - - tv->tv_sec = l / 1000; - tv->tv_usec = (l % 1000) * 1000; - return; -} - - -static struct peer *find_peer(struct iax_session *session) -{ - struct peer *cur = peers; - while(cur) { - if (cur->session == session) - return cur; - cur = cur->next; - } - return NULL; -} - -void -parse_args(FILE *f, unsigned char *cmd) -{ - static char *argv[MAXARGS]; - unsigned char *parse = cmd; - int argc = 0, t = 0; - - // Don't mess with anything that doesn't exist... - if(!*parse) - return; - - memset(argv, 0, sizeof(argv)); - while(*parse) { - if(*parse < 33 || *parse > 128) { - *parse = 0, t++; - if(t > MAXARG) { - fprintf(f, "Warning: Argument exceeds maximum argument size, command ignored!\n"); - return; - } - } else if(t || !argc) { - if(argc == MAXARGS) { - fprintf(f, "Warning: Command ignored, too many arguments\n"); - return; - } - argv[argc++] = parse; - t = 0; - } - - parse++; - } - - if(argc) - parse_cmd(f, argc, argv); -} - -/* handle all network requests, and a pending scheduled event, if any */ -void service_network(int netfd, FILE *f) -{ - fd_set readfd; - struct timeval dumbtimer; - - /* set up a timer that falls-through */ - dumbtimer.tv_sec = 0; - dumbtimer.tv_usec = 0; - - - for(;;) /* suck everything outa network stuff */ - { - FD_ZERO(&readfd); - FD_SET(netfd, &readfd); - if (select(netfd + 1, &readfd, 0, 0, &dumbtimer) > 0) - { - if (FD_ISSET(netfd,&readfd)) - { - do_iax_event(f); - (void) iax_time_to_next_event(); - } else break; - } else break; - } - do_iax_event(f); /* do pending event if any */ -} - - -int -main(int argc, char *argv[]) -{ - int port; - int netfd; - int c, i; - FILE *f; - char rcmd[RBUFSIZE]; - gsm_frame fo; - WSADATA foop; - time_t t; - WAVEFORMATEX wf; - WHOUT *wh,*wh1,*wh2; - unsigned long lastouttick = 0; - - - - /* get time of day in milliseconds, offset by tick count (see our - gettimeofday() implementation) */ - time(&t); - startuptime = ((t % 86400) * 1000) - GetTickCount(); - - f = stdout; - _dup2(fileno(stdout),fileno(stderr)); - - /* start up the windoze-socket layer stuff */ - if (WSAStartup(0x0101,&foop)) { - fprintf(stderr,"Fatal error: Falied to startup windows sockets\n"); - return -1; - } - - - /* setup the format for opening audio channels */ - wf.wFormatTag = WAVE_FORMAT_PCM; - wf.nChannels = 1; - wf.nSamplesPerSec = 8000; - wf.nAvgBytesPerSec = 16000; - wf.nBlockAlign = 2; - wf.wBitsPerSample = 16; - wf.cbSize = 0; - /* open the audio out channel */ - if (waveOutOpen(&wout,0,&wf,0,0,CALLBACK_NULL) != MMSYSERR_NOERROR) - { - fprintf(stderr,"Fatal Error: Failed to open wave output device\n"); - return -1; - } - /* open the audio in channel */ - if (waveInOpen(&win,0,&wf,0,0,CALLBACK_NULL) != MMSYSERR_NOERROR) - { - fprintf(stderr,"Fatal Error: Failed to open wave input device\n"); - waveOutReset(wout); - waveOutClose(wout); - return -1; - } - /* activate the exit handler */ - atexit(killem); - /* initialize the audio in buffer structures */ - memset(&whin,0,sizeof(whin)); - - if ( (port = iax_init(0) < 0)) { - fprintf(stderr, "Fatal error: failed to initialize iax with port %d\n", port); - return -1; - } - - - iax_set_formats(AST_FORMAT_GSM); - netfd = iax_get_fd(); - - fprintf(f, "Text Based Telephony Client.\n\n"); - issue_prompt(f); - - /* main tight loop */ - while(1) { - /* service the network stuff */ - service_network(netfd,f); - if (outqueue) /* if stuff in audio output queue, free it up if its available */ - { - /* go through audio output queue */ - for(wh = outqueue,wh1 = wh2 = NULL,i = 0; wh != NULL; wh = wh->next) - { - service_network(netfd,f); /* service network here for better performance */ - /* if last one was removed from queue, zot it here */ - if (i && wh1) - { - free(wh1); - wh1 = wh2; - } - i = 0; /* reset "last one removed" flag */ - if (wh->w.dwFlags & WHDR_DONE) /* if this one is done */ - { - /* prepare audio header */ - if ((c = waveOutUnprepareHeader(wout,&wh->w,sizeof(WAVEHDR))) != MMSYSERR_NOERROR) - { - fprintf(stderr,"Cannot unprepare audio out header, error %d\n",c); - exit(255); - } - if (wh1 != NULL) /* if there was a last one */ - { - wh1->next = wh->next; - } - if (outqueue == wh) /* is first one, so set outqueue to next one */ - { - outqueue = wh->next; - } - i = 1; /* set 'to free' flag */ - } - wh2 = wh1; /* save old,old wh pointer */ - wh1 = wh; /* save the old wh pointer */ - } - } - /* go through all audio in buffers, and prepare and queue ones that are currently idle */ - for(i = 0; i < NWHIN; i++) - { - service_network(netfd,f); /* service network stuff here for better performance */ - if (!(whin[i].dwFlags & WHDR_PREPARED)) /* if not prepared, do so */ - { - /* setup this input buffer header */ - memset(&whin[i],0,sizeof(WAVEHDR)); - whin[i].lpData = bufin[i]; - whin[i].dwBufferLength = 320; - whin[i].dwUser = whinserial++; /* set 'user data' to current serial number */ - /* prepare the buffer */ - if (waveInPrepareHeader(win,&whin[i],sizeof(WAVEHDR))) - { - fprintf(stderr,"Unable to prepare header for input\n"); - return -1; - } - /* add it to device (queue) */ - if (waveInAddBuffer(win,&whin[i],sizeof(WAVEHDR))) - { - fprintf(stderr,"Unable to prepare header for input\n"); - return -1; - } - } - waveInStart(win); /* start it (if not already started) */ - } - - /* if key pressed, do command stuff */ - if(_kbhit()) - { - if ( ( fgets(&*rcmd, 256, stdin))) { - rcmd[strlen(rcmd)-1] = 0; - parse_args(f, &*rcmd); - } else fprintf(f, "Fatal error: failed to read data!\n"); - - issue_prompt(f); - } - /* do audio input stuff for buffers that have received data from audio in device already. Must - do them in serial number order (the order in which they were originally queued). */ - if(answered_call) /* send audio only if call answered */ - { - for(;;) /* loop until all are found */ - { - for(i = 0; i < NWHIN; i++) /* find an available one that's the one we are looking for */ - { - service_network(netfd,f); /* service network here for better performance */ - /* if not time to send any more, dont */ - if (GetTickCount() < (lastouttick + OUT_INTERVAL)) - { - i = NWHIN; /* set to value that WILL exit loop */ - break; - } - if ((whin[i].dwUser == nextwhin) && (whin[i].dwFlags & WHDR_DONE)) { /* if audio is ready */ - - /* must have read exactly 320 bytes */ - if (whin[i].dwBytesRecorded != whin[i].dwBufferLength) - { - fprintf(stderr,"Short audio read, got %d bytes, expected %d bytes\n", whin[i].dwBytesRecorded, - whin[i].dwBufferLength); - return -1; - } - if(!most_recent_answer->gsmout) - most_recent_answer->gsmout = gsm_create(); - - service_network(netfd,f); /* service network here for better performance */ - /* encode the audio from the buffer into GSM format */ - gsm_encode(most_recent_answer->gsmout, (short *) ((char *) whin[i].lpData), fo); - if(iax_send_voice(most_recent_answer->session, - AST_FORMAT_GSM, (char *)fo, sizeof(gsm_frame)) == -1) - puts("Failed to send voice!"); - lastouttick = GetTickCount(); /* save time of last output */ - - /* unprepare (free) the header */ - waveInUnprepareHeader(win,&whin[i],sizeof(WAVEHDR)); - /* initialize the buffer */ - memset(&whin[i],0,sizeof(WAVEHDR)); - /* bump the serial number to look for the next time */ - nextwhin++; - /* exit the loop so that we can start at lowest buffer again */ - break; - } - } - if (i >= NWHIN) break; /* if all found, get out of loop */ - } - } - - } - return 0; -} - -void -do_iax_event(FILE *f) { - int sessions = 0; - struct iax_event *e = 0; - struct peer *peer; - - while ( (e = iax_get_event(0))) { - peer = find_peer(e->session); - if(peer) { - handle_event(f, e, peer); - } else { - if(e->etype != IAX_EVENT_CONNECT) { - fprintf(stderr, "Huh? This is an event for a non-existant session?\n"); - } - sessions++; - - if(sessions >= MAX_SESSIONS) { - fprintf(f, "Missed a call... too many sessions open.\n"); - } - - - if(e->event.connect.callerid && e->event.connect.dnid) - fprintf(f, "Call from '%s' for '%s'", e->event.connect.callerid, - e->event.connect.dnid); - else if(e->event.connect.dnid) { - fprintf(f, "Call from '%s'", e->event.connect.dnid); - } else if(e->event.connect.callerid) { - fprintf(f, "Call from '%s'", e->event.connect.callerid); - } else printf("Call from"); - fprintf(f, " (%s)\n", inet_ntoa(iax_get_peer_addr(e->session).sin_addr)); - - if(most_recent_answer) { - fprintf(f, "Incoming call ignored, there's already a call waiting for answer... \ -please accept or reject first\n"); - iax_reject(e->session, "Too many calls, we're busy!"); - } else { - if ( !(peer = malloc(sizeof(struct peer)))) { - fprintf(f, "Warning: Unable to allocate memory!\n"); - return; - } - - peer->time = time(0); - peer->session = e->session; - peer->gsmin = 0; - peer->gsmout = 0; - - peer->next = peers; - peers = peer; - - iax_accept(peer->session); - iax_ring_announce(peer->session); - most_recent_answer = peer; - fprintf(f, "Incoming call!\n"); - } - iax_event_free(e); - issue_prompt(f); - } - } -} - -void -call(FILE *f, char *num) -{ - struct peer *peer; - - if(!newcall) - newcall = iax_session_new(); - else { - fprintf(f, "Already attempting to call somewhere, please cancel first!\n"); - return; - } - - if ( !(peer = malloc(sizeof(struct peer)))) { - fprintf(f, "Warning: Unable to allocate memory!\n"); - return; - } - - peer->time = time(0); - peer->session = newcall; - peer->gsmin = 0; - peer->gsmout = 0; - - peer->next = peers; - peers = peer; - - most_recent_answer = peer; - - iax_call(peer->session, num, 10); -} - -void -answer_call(void) -{ - if(most_recent_answer) - iax_answer(most_recent_answer->session); - printf("Answering call!\n"); - answered_call = 1; -} - -void -dump_call(void) -{ - if(most_recent_answer) - { - iax_hangup(most_recent_answer->session,""); - free(most_recent_answer); - } - printf("Dumping call!\n"); - answered_call = 0; - most_recent_answer = 0; - answered_call = 0; - peers = 0; - newcall = 0; -} - -void -reject_call(void) -{ - iax_reject(most_recent_answer->session, "Call rejected manually."); - most_recent_answer = 0; -} - -void -handle_event(FILE *f, struct iax_event *e, struct peer *p) -{ - int len,n; - WHOUT *wh,*wh1; - short fr[160]; - static paused_xmit = 0; - - - switch(e->etype) { - case IAX_EVENT_HANGUP: - iax_hangup(most_recent_answer->session, "Byeee!"); - fprintf(f, "Call disconnected by peer\n"); - free(most_recent_answer); - most_recent_answer = 0; - answered_call = 0; - peers = 0; - newcall = 0; - - break; - - case IAX_EVENT_REJECT: - fprintf(f, "Authentication was rejected\n"); - break; - case IAX_EVENT_ACCEPT: - fprintf(f, "Waiting for answer... RING RING\n"); - issue_prompt(f); - break; - case IAX_EVENT_ANSWER: - answer_call(); - break; - case IAX_EVENT_VOICE: - switch(e->event.voice.format) { - case AST_FORMAT_GSM: - if(e->event.voice.datalen % 33) { - fprintf(stderr, "Weird gsm frame, not a multiple of 33.\n"); - break; - } - - if (!p->gsmin) - p->gsmin = gsm_create(); - - len = 0; - while(len < e->event.voice.datalen) { - if(gsm_decode(p->gsmin, (char *) e->event.voice.data + len, fr)) { - fprintf(stderr, "Bad GSM data\n"); - break; - } else { /* its an audio packet to be output to user */ - - /* get count of pending items in audio output queue */ - n = 0; - if (outqueue) - { /* determine number of pending out queue items */ - for(wh = outqueue; wh != NULL; wh = wh->next) - { - if (!(wh->w.dwFlags & WHDR_DONE)) n++; - } - } - /* if not too many, send to user, otherwise chuck packet */ - if (n <= OUT_DEPTH) /* if not to chuck packet */ - { - /* malloc the memory for the queue item */ - wh = (WHOUT *) malloc(sizeof(WHOUT)); - if (wh == (WHOUT *) NULL) /* if error, bail */ - { - fprintf(stderr,"Outa memory!!!!\n"); - exit(255); - } - /* initialize the queue entry */ - memset(wh,0,sizeof(WHOUT)); - /* copy the PCM data from the gsm conversion buffer */ - memcpy((char *)wh->data,(char *)fr,sizeof(fr)); - /* set parameters for data */ - wh->w.lpData = (char *) wh->data; - wh->w.dwBufferLength = 320; - - /* prepare buffer for output */ - if (waveOutPrepareHeader(wout,&wh->w,sizeof(WAVEHDR))) - { - fprintf(stderr,"Cannot prepare header for audio out\n"); - exit(255); - } - /* if not currently transmitting, hold off a couple of packets for - smooth sounding output */ - if ((!n) && (!paused_xmit)) - { - /* pause output (before starting) */ - waveOutPause(wout); - /* indicate as such */ - paused_xmit = 1; - } - /* queue packet for output on audio device */ - if (waveOutWrite(wout,&wh->w,sizeof(WAVEHDR))) - { - fprintf(stderr,"Cannot output to wave output device\n"); - exit(255); - } - /* if we are paused, and we have enough packets, start audio */ - if ((n > OUT_PAUSE_THRESHOLD) && paused_xmit) - { - /* start the output */ - waveOutRestart(wout); - /* indicate as such */ - paused_xmit = 0; - } - /* insert it onto tail of outqueue */ - if (outqueue == NULL) /* if empty queue */ - outqueue = wh; /* point queue to new entry */ - else /* otherwise is non-empty queue */ - { - wh1 = outqueue; - while(wh1->next) wh1 = wh1->next; /* find last entry in queue */ - wh1->next = wh; /* point it to new entry */ - } - } -#ifdef PRINTCHUCK - else printf("Chucking packet!!\n"); -#endif - } - len += 33; - } - break; - default : - fprintf(f, "Don't know how to handle that format %d\n", e->event.voice.format); - } - break; - case IAX_EVENT_RINGA: - break; - default: - fprintf(f, "Unknown event: %d\n", e->etype); - break; - } -} - -void -parse_cmd(FILE *f, int argc, char **argv) -{ - _strupr(argv[0]); - if(!strcmp(argv[0], "HELP")) { - if(argc == 1) - dump_array(f, help); - else if(argc == 2) { - if(!strcmp(argv[1], "HELP")) - fprintf(f, "Help <Command>\t-\tDisplays general help or specific help on command if supplied an arguement\n"); - else if(!strcmp(argv[1], "QUIT")) - fprintf(f, "Quit\t\t-\tShuts down the miniphone\n"); - else fprintf(f, "No help available on %s\n", argv[1]); - } else { - fprintf(f, "Too many arguements for command help.\n"); - } - } else if(!strcmp(argv[0], "STATUS")) { - if(argc == 1) { - int c = 0; - struct peer *peerptr = peers; - - if(!peerptr) - fprintf(f, "No session matches found.\n"); - else while(peerptr) { - fprintf(f, "Listing sessions:\n\n"); - fprintf(f, "Session %d\n", ++c); - fprintf(f, "Session existed for %d seconds\n", (int)time(0)-peerptr->time); - if(answered_call) - fprintf(f, "Call answered.\n"); - else fprintf(f, "Call ringing.\n"); - - peerptr = peerptr->next; - } - } else fprintf(f, "Too many arguments for command status.\n"); - } else if(!strcmp(argv[0], "ANSWER")) { - if(argc > 1) - fprintf(f, "Too many arguements for command answer\n"); - else answer_call(); - } else if(!strcmp(argv[0], "REJECT")) { - if(argc > 1) - fprintf(f, "Too many arguements for command reject\n"); - else { - fprintf(f, "Rejecting current phone call.\n"); - reject_call(); - } - } else if(!strcmp(argv[0], "CALL")) { - if(argc > 2) - fprintf(f, "Too many arguements for command call\n"); - else { - call(f, argv[1]); - } - } else if(!strcmp(argv[0], "DUMP")) { - if(argc > 1) - fprintf(f, "Too many arguements for command dump\n"); - else { - dump_call(); - } - } else if(!strcmp(argv[0], "DTMF")) { - if(argc > 2) - { - fprintf(f, "Too many arguements for command dtmf\n"); - return; - } - if (argc < 1) - { - fprintf(f, "Too many arguements for command dtmf\n"); - return; - } - if(most_recent_answer) - iax_send_dtmf(most_recent_answer->session,*argv[1]); - } else if(!strcmp(argv[0], "QUIT")) { - if(argc > 1) - fprintf(f, "Too many arguements for command quit\n"); - else { - fprintf(f, "Good bye!\n"); - exit(1); - } - } else fprintf(f, "Unknown command of %s\n", argv[0]); -} - -void -issue_prompt(FILE *f) -{ - fprintf(f, "TeleClient> "); - fflush(f); -} - -void -dump_array(FILE *f, char **array) { - while(*array) - fprintf(f, "%s\n", *array++); -} diff --git a/libs/libiax2/src/winpoop.h b/libs/libiax2/src/winpoop.h deleted file mode 100644 index 3089a5ffaf6248a821e851f98843299411e25695..0000000000000000000000000000000000000000 --- a/libs/libiax2/src/winpoop.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Functions Windows doesn't have... but should - * Copyright(C) 2001, Linux Support Services, Inc. - * - * Distributed under GNU LGPL. - * - * These are NOT fully compliant with BSD 4.3 and are not - * threadsafe. - * - */ - -#ifndef _winpoop_h -#define _winpoop_h - -#if defined(_MSC_VER) -#define INLINE __inline -#else -#define INLINE inline -#endif - -#include <winsock.h> - -void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz); - -static INLINE int inet_aton(char *cp, struct in_addr *inp) -{ - int a1, a2, a3, a4; - unsigned int saddr; - - if (sscanf(cp, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) != 4) - return 0; - a1 &= 0xff; - a2 &= 0xff; - a3 &= 0xff; - a4 &= 0xff; - saddr = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4; - inp->s_addr = htonl(saddr); - return 1; -} - -#endif diff --git a/platform/debian/files b/platform/debian/files deleted file mode 100644 index 1680c5532bf096dde001cd54ec088e176d5292d0..0000000000000000000000000000000000000000 --- a/platform/debian/files +++ /dev/null @@ -1 +0,0 @@ -sflphoned_0.8-2_i386.deb diff --git a/platform/debian/package b/platform/debian/package deleted file mode 100644 index a36f1b17b4cfd6ed527fe618447af18c10ec12dd..0000000000000000000000000000000000000000 --- a/platform/debian/package +++ /dev/null @@ -1 +0,0 @@ -sflphone_0.8.2-3 diff --git a/platform/debian/upload.sh b/platform/debian/upload.sh deleted file mode 100755 index d71df16f30a965065d9de237f743876d3388d715..0000000000000000000000000000000000000000 --- a/platform/debian/upload.sh +++ /dev/null @@ -1,3 +0,0 @@ -!#/bin/sh - -scp $1 sflphone_org@gpl.savoirfairelinux.net:/var/www/vhosts/sflphone.org/htdocs/debian/dists/unstable/main/binary-i386 diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac index dbd986daa348ea3198ae7b7c4a8f371852a524b4..f1baaa4301bcbfd0cb7d9254761e8a1d7c8ead22 100644 --- a/sflphone-gtk/configure.ac +++ b/sflphone-gtk/configure.ac @@ -27,8 +27,6 @@ PKG_CHECK_MODULES(DEPS, \ libnotify >= 0.4 \ gtk+-2.0 >= 2.2 \ glib-2.0 >= 2.2 \ - gtkglext-1.0 >= 1.0.0 \ - libgnomeui-2.0 >= 2.20 \ ) diff --git a/sflphone-gtk/pixmaps/Makefile.am b/sflphone-gtk/pixmaps/Makefile.am index e793ae5ccec70d627aaa0f5f41b6031e0a3d40ec..6bc3b742a3c28c61992dc068cd4d87a60262acfd 100644 --- a/sflphone-gtk/pixmaps/Makefile.am +++ b/sflphone-gtk/pixmaps/Makefile.am @@ -1,6 +1,6 @@ icondir = $(datadir)/pixmaps -icon_DATA = sflphone.png +#icon_DATA = sflphone2.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 history.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 buttonsdir = $(datadir)/sflphone EXTRA_DIST = $(icon_DATA) $(buttons_DATA) diff --git a/sflphone-gtk/pixmaps/sflphone.png b/sflphone-gtk/pixmaps/sflphone.png index d40cbdb2a827b91e537d23e4282520e5008f2427..50c1483ac152972fa6d993b6823b5d247dd258bc 100644 Binary files a/sflphone-gtk/pixmaps/sflphone.png and b/sflphone-gtk/pixmaps/sflphone.png differ diff --git a/sflphone-gtk/src/Makefile.am b/sflphone-gtk/src/Makefile.am index f532ee9009342000e4eb61bedbab5c4cf8680cd2..87ae408ce346bfce2ecb9241622802b3f3bc517f 100644 --- a/sflphone-gtk/src/Makefile.am +++ b/sflphone-gtk/src/Makefile.am @@ -21,7 +21,6 @@ sflphone_gtk_SOURCES = \ sliders.c \ statusicon.c \ codeclist.c \ - glwidget.c \ MemManager.c noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h codeclist.h assistant.h\ @@ -32,12 +31,11 @@ sflphone_gtk_LDADD = $(DEPS_LIBS) -lnotify AM_CPPFLAGS = $(DEPS_CFLAGS) \ -DICONS_DIR=\""$(datadir)/sflphone"\" \ - -DICON_DIR=\""$(datadir)/pixmaps"\" \ - -DCODECS_DIR=\""$(libdir)/sflphone/codecs"\" + -DCODECS_DIR=\""$(libdir)/sflphone/codecs"\" # add symbolic link -install-exec-hook: - ln -s $(bindir)/sflphone-gtk $(bindir)/sflphone +install-exec-local: + ln -sf $(bindir)/sflphone-gtk $(bindir)/sflphone uninstall-local: -test -h $(bindir)/sflphone && rm $(bindir)/sflphone diff --git a/sflphone-gtk/src/accountlist.c b/sflphone-gtk/src/accountlist.c index bbf398b190c36a14dd128e66c7fde6f413c5104c..34d482e3333c04d161a72c02c469d3eb813173f8 100644 --- a/sflphone-gtk/src/accountlist.c +++ b/sflphone-gtk/src/accountlist.c @@ -138,7 +138,7 @@ account_list_get_current( ) void account_list_set_current_id(const gchar * accountID) { - g_print("set current id = %d\n" , accountID); + g_print("set current id = %s\n", accountID); __CURRENT_ACCOUNT_ID = g_strdup(accountID); } diff --git a/sflphone-gtk/src/accountwindow.c b/sflphone-gtk/src/accountwindow.c index 32160fa8369231f011ea1c5965a6d458b887e7c8..823e6b05cc2ecc9a82437cb2816f2f1c0dc43109 100644 --- a/sflphone-gtk/src/accountwindow.c +++ b/sflphone-gtk/src/accountwindow.c @@ -155,7 +155,6 @@ show_account_window (account_t * a) table = gtk_table_new ( 8, 2 , FALSE/* homogeneous */); gtk_table_set_row_spacings( GTK_TABLE(table), 10); gtk_table_set_col_spacings( GTK_TABLE(table), 10); - gtk_box_pack_start(GTK_BOX (frame), table, TRUE, TRUE, 0); gtk_widget_show(table); gtk_container_add( GTK_CONTAINER( frame) , table ); @@ -256,7 +255,6 @@ show_account_window (account_t * a) tableNat = gtk_table_new ( 2, 2 , FALSE/* homogeneous */); gtk_table_set_row_spacings( GTK_TABLE(tableNat), 10); gtk_table_set_col_spacings( GTK_TABLE(tableNat), 10); - gtk_box_pack_end(GTK_BOX (frameNat), tableNat, TRUE, TRUE, 0); gtk_widget_show(tableNat); gtk_container_add( GTK_CONTAINER( frameNat) , tableNat ); @@ -353,7 +351,7 @@ show_account_window (account_t * a) /** @todo Verify if it's the best condition to check */ if (currentAccount->accountID == NULL) { dbus_add_account(currentAccount); - account_list_set_current_id( currentAccount->accountID); + account_list_set_current_id( currentAccount->accountID ); } else { dbus_set_account_details(currentAccount); diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index 14ea9e77b580656d91423aeedce80662b905fa29..b59d58dc6daf7d4ab009734e53f2abc8f359f4a7 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2007 Savoir-Faire Linux inc. - * Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> + * Copyright (C) 2007 - 2008 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 @@ -123,11 +123,12 @@ sflphone_hung_up( call_t * c) c->state = CALL_STATE_DIALING; update_menus(); status_tray_icon_blink( FALSE ); + stop_notification(); } /** Internal to actions: Fill account list */ -void -sflphone_fill_account_list() + void +sflphone_fill_account_list(gboolean toolbarInitialized) { account_list_clear ( ); @@ -184,8 +185,9 @@ sflphone_fill_account_list() } - //toolbar_update_buttons(); - + // Prevent update being called when toolbar is not yet initialized + if(toolbarInitialized) + toolbar_update_buttons(); } gboolean @@ -205,7 +207,7 @@ sflphone_init() else { dbus_register(getpid(), "Gtk+ Client"); - sflphone_fill_account_list(); + sflphone_fill_account_list(FALSE); sflphone_fill_codec_list(); sflphone_set_current_account(); return TRUE; @@ -601,14 +603,12 @@ sflphone_place_call ( call_t * c ) if( account_list_get_size() == 0 ) { notify_no_accounts(); - call_list_remove(current_calls , c->callID); - update_call_tree_remove(current_calls, c); + sflphone_fail(c); } else if( account_list_get_by_state( ACCOUNT_STATE_REGISTERED ) == NULL ) { notify_no_registered_accounts(); - call_list_remove(current_calls , c->callID); - update_call_tree_remove(current_calls, c); + sflphone_fail(c); } else { @@ -651,7 +651,6 @@ sflphone_place_call ( call_t * c ) // Update history c->history_state = OUTGOING; call_list_add(history, c); - //update_call_tree_add(history, c); } } @@ -708,10 +707,9 @@ sflphone_fill_codec_list() } } if( codec_list_get_size() == 0) { - gchar* markup = malloc(1000); - sprintf(markup , _("<b>Error: No audio codecs found.\n\n</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</b> directory in your home( <i>%s</i> )"), CODECS_DIR , g_get_home_dir()); + + gchar* markup = g_markup_printf_escaped(_("<b>Error: No audio codecs found.\n\n</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</b> directory in your home( <i>%s</i> )") , CODECS_DIR , g_get_home_dir()); main_window_error_message( markup ); - g_free( markup ); dbus_unregister(getpid()); exit(0); } diff --git a/sflphone-gtk/src/actions.h b/sflphone-gtk/src/actions.h index f364b639ae2d102299e7aec2997e572e8f8359aa..cdc7d0053e475fed0cae2e31a2337f59fecaea67 100644 --- a/sflphone-gtk/src/actions.h +++ b/sflphone-gtk/src/actions.h @@ -152,7 +152,7 @@ void sflphone_place_call ( call_t * c ); /** * Initialize the accounts data structure */ -void sflphone_fill_account_list(); +void sflphone_fill_account_list(gboolean toolbarInitialized); /** * Set an account as current. The current account is to one used to place calls with by default diff --git a/sflphone-gtk/src/assistant.c b/sflphone-gtk/src/assistant.c index a318f0d1adbd3e8c3efc8fbe4da2e76d7778636c..f32529e4e486a1ec1b6d093e7ebf3030e137ed42 100644 --- a/sflphone-gtk/src/assistant.c +++ b/sflphone-gtk/src/assistant.c @@ -44,11 +44,12 @@ static void cancel_callback( void ) gtk_widget_destroy(wiz->assistant); } - static void -apply_callback( void ) + static void +sip_apply_callback( void ) { if( account_type == _SIP ) { + g_print("SIP APPLY CALLBACK\n"); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ALIAS), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_alias)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ENABLED), g_strdup("TRUE")); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_MAILBOX), g_strdup("888")); @@ -56,11 +57,20 @@ apply_callback( void ) g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_HOST), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_server)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_PASSWORD), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_password)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_USER), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_username)))); - g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_STUN_ENABLED), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->enable)))); + g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_STUN_ENABLED), g_strdup((gchar *)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->enable))? "TRUE":"FALSE")); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_STUN_SERVER), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->addr)))); + + dbus_add_account( current ); + account_list_set_current_id( current->accountID ); + g_print( "ACCOUNT ID = %s\n" , current->accountID ); } - else - { +} + static void +iax_apply_callback( void ) +{ + if( account_type == _IAX) + { + g_print("IAX APPLY CALLBACK\n"); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ALIAS), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_alias)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ENABLED), g_strdup("TRUE")); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_MAILBOX), g_strdup("888")); @@ -68,9 +78,11 @@ apply_callback( void ) g_hash_table_insert(current->properties, g_strdup(ACCOUNT_IAX_USER), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_username)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_IAX_HOST), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_server)))); g_hash_table_insert(current->properties, g_strdup(ACCOUNT_IAX_PASSWORD), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_password)))); - } - dbus_add_account( current ); + dbus_add_account( current ); + account_list_set_current_id( current->accountID ); + g_print( "ACCOUNT ID = %s\n" , current->accountID ); + } } void @@ -85,7 +97,7 @@ build_wizard( void ) wiz = ( struct _wizard* )g_malloc( sizeof( struct _wizard)); current = g_new0(account_t, 1); current->properties = g_hash_table_new(NULL, g_str_equal); - current ->accountID = "test"; + //current ->accountID = "test"; wiz->assistant = gtk_assistant_new( ); gtk_window_set_title( GTK_WINDOW(wiz->assistant), _("SFLphone account configuration wizard") ); @@ -243,7 +255,7 @@ build_iax_account_configuration( void ) current -> state = ACCOUNT_STATE_UNREGISTERED; - g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( apply_callback ), NULL); + g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( iax_apply_callback ), NULL); return wiz->iax_account; } @@ -278,7 +290,7 @@ build_nat_settings( void ) gtk_table_attach ( GTK_TABLE( table ), wiz->addr, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_set_sensitive( GTK_WIDGET( wiz->addr ), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->enable))); - g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( apply_callback ), NULL); + g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( sip_apply_callback ), NULL); return wiz->nat; } @@ -327,9 +339,9 @@ forward_page_func( gint current_page , gpointer data ) case 2: return 3; case 3: - return 6; + return 6; case 4: - return 6; + return 6; default: return -1; } @@ -355,7 +367,7 @@ create_vbox(GtkAssistantPageType type, const gchar *title, const gchar *section) gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant), vbox, TRUE); - wiz->logo = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); + wiz->logo = gdk_pixbuf_new_from_file(ICONS_DIR "/sflphone.png", NULL); gtk_assistant_set_page_header_image(GTK_ASSISTANT(wiz->assistant),vbox, wiz->logo); g_object_unref(wiz->logo); diff --git a/sflphone-gtk/src/assistant.h b/sflphone-gtk/src/assistant.h index f18a71910e947bd496c78189166c079f78182d0b..1e70135bdf0057c2fb533ea8131af8dec2aa6999 100644 --- a/sflphone-gtk/src/assistant.h +++ b/sflphone-gtk/src/assistant.h @@ -90,7 +90,8 @@ static void close_callback( void ); * Callback when the button apply is clicked * Action : Set the account parameters with the entries values and called dbus_add_account */ -static void apply_callback( void ); +static void sip_apply_callback( void ); +static void iax_apply_callback( void ); void enable_stun( GtkWidget *widget ); diff --git a/sflphone-gtk/src/calllist.c b/sflphone-gtk/src/calllist.c index c2aabae7b11d90a1a3f66e9c629a73bb5c328af4..7e45c4b3f6c7d9e96477ea83175a07b1378f4774 100644 --- a/sflphone-gtk/src/calllist.c +++ b/sflphone-gtk/src/calllist.c @@ -175,6 +175,12 @@ call_get_number (const call_t * c) return number; } +gchar * +call_get_recipient( const call_t * c ) +{ + return c->to; +} + call_t * call_list_get (calltab_t* tab, const gchar * callID ) diff --git a/sflphone-gtk/src/calltree.c b/sflphone-gtk/src/calltree.c index 79bfda86ccd214966c116f59f42ff6716ecb9f87..6fbf48230f7a090cc0b4fc0a487aad5d51b56f19 100644 --- a/sflphone-gtk/src/calltree.c +++ b/sflphone-gtk/src/calltree.c @@ -167,6 +167,7 @@ call_mailbox( GtkWidget* widget , gpointer data ) g_sprintf(mailboxCall->callID, "%d", rand()); mailboxCall->to = g_strdup(g_hash_table_lookup(current->properties, ACCOUNT_MAILBOX)); mailboxCall->accountID = g_strdup(current->accountID); + g_print("TO : %s\n" , mailboxCall->to); call_list_add( current_calls , mailboxCall ); update_call_tree_add( current_calls , mailboxCall ); update_menus(); @@ -176,12 +177,11 @@ call_mailbox( GtkWidget* widget , gpointer data ) void toolbar_update_buttons () { - gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(holdButton), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(transfertButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , TRUE ); + gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , FALSE); gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE); g_object_ref(holdButton); g_object_ref(unholdButton); @@ -206,6 +206,7 @@ toolbar_update_buttons () { case CALL_STATE_INCOMING: gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); + //gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); g_object_ref(callButton); gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); @@ -218,13 +219,14 @@ toolbar_update_buttons () g_object_ref(holdButton); gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton)); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), unholdButton, 3); + //gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), TRUE); break; case CALL_STATE_RINGING: gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); break; case CALL_STATE_DIALING: - gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); + if( active_calltree != history ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); g_object_ref(callButton); gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); @@ -258,12 +260,12 @@ toolbar_update_buttons () { if( account_list_get_size() > 0 ) { - gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); + gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE ); + gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), TRUE ); } else { gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE); - gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), FALSE); } } } @@ -274,7 +276,6 @@ selected(GtkTreeSelection *sel, void* data) GtkTreeIter iter; GValue val; GtkTreeModel *model = (GtkTreeModel*)active_calltree->store; - printf("Select !\n"); if (! gtk_tree_selection_get_selected (sel, &model, &iter)) return; @@ -362,7 +363,8 @@ create_toolbar () gtk_widget_set_state( GTK_WIDGET(unholdButton), GTK_STATE_INSENSITIVE); g_signal_connect (G_OBJECT (unholdButton), "clicked", G_CALLBACK (unhold), NULL); - gtk_widget_show_all(GTK_WIDGET(unholdButton)); + //gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(unholdButton), -1); + //gtk_widget_show_all(GTK_WIDGET(unholdButton)); image = gtk_image_new_from_file( ICONS_DIR "/hold.svg"); holdButton = gtk_tool_button_new (image, _("On Hold")); @@ -604,6 +606,7 @@ update_call_tree (calltab_t* tab, call_t * c) pixbuf = gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR); } } + g_print("MARKUP UPDATE = %s\n" , markup ); gtk_list_store_set(store, &iter, 0, pixbuf, // Icon 1, markup, // Description diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c index c6c07458e61efe3e31a3b321896fa82be5c15757..f0f0cc1cac79e601d1a6a0ce170cdcbcc485da9f 100644 --- a/sflphone-gtk/src/configwindow.c +++ b/sflphone-gtk/src/configwindow.c @@ -330,13 +330,13 @@ update_combo_box( gchar* plugin ) // set insensitive the devices widget if the selected plugin is default if( g_strcasecmp( plugin , "default" ) == 0) { - gtk_widget_set_sensitive( GTK_WIDGET ( outputDeviceComboBox ) , FALSE ); - gtk_widget_set_sensitive( GTK_WIDGET ( inputDeviceComboBox ) , FALSE ); + //gtk_widget_set_sensitive( GTK_WIDGET ( outputDeviceComboBox ) , FALSE ); + //gtk_widget_set_sensitive( GTK_WIDGET ( inputDeviceComboBox ) , FALSE ); } else { - gtk_widget_set_sensitive( GTK_WIDGET ( outputDeviceComboBox ) , TRUE ); - gtk_widget_set_sensitive( GTK_WIDGET ( inputDeviceComboBox ) , TRUE ); + //gtk_widget_set_sensitive( GTK_WIDGET ( outputDeviceComboBox ) , TRUE ); + //gtk_widget_set_sensitive( GTK_WIDGET ( inputDeviceComboBox ) , TRUE ); } } /** @@ -358,7 +358,7 @@ select_output_audio_plugin(GtkComboBox* widget, gpointer data) gtk_combo_box_get_active_iter(widget, &iter); gtk_tree_model_get(model, &iter, 0, &pluginName, -1); dbus_set_output_audio_plugin(pluginName); - update_combo_box( pluginName); + //update_combo_box( pluginName); } } @@ -386,7 +386,7 @@ select_active_output_audio_plugin() { // Set current iteration the active one gtk_combo_box_set_active_iter(GTK_COMBO_BOX(pluginComboBox), &iter); - update_combo_box( plugin ); + //update_combo_box( plugin ); return; } } while(gtk_tree_model_iter_next(model, &iter)); @@ -394,7 +394,7 @@ select_active_output_audio_plugin() // No index was found, select first one g_print("Warning : No active output device found\n"); gtk_combo_box_set_active(GTK_COMBO_BOX(pluginComboBox), 0); - update_combo_box("default"); + //update_combo_box("default"); } @@ -1078,7 +1078,6 @@ create_audio_tab () // Main device widget deviceBox = gtk_hbox_new(FALSE, 10); - gtk_box_pack_start(GTK_BOX(deviceFrame), deviceBox, FALSE, FALSE, 0); gtk_widget_show( deviceBox ); gtk_container_add( GTK_CONTAINER(deviceFrame) , deviceBox); @@ -1086,7 +1085,6 @@ create_audio_tab () // Main device widget deviceTable = gtk_table_new(4, 3, FALSE); gtk_table_set_col_spacing(GTK_TABLE(deviceTable), 0, 40); - gtk_box_set_spacing(GTK_BOX(deviceTable), 0); gtk_box_pack_start(GTK_BOX(deviceBox), deviceTable, TRUE, TRUE, 0); gtk_widget_show(deviceTable); @@ -1184,13 +1182,11 @@ create_audio_tab () //select_active_output_audio_plugin(); // Codec section label codecFrame = gtk_frame_new(_("Codecs")); - gtk_misc_set_alignment(GTK_MISC(codecFrame), 0, 0.5); gtk_box_pack_start(GTK_BOX(ret), codecFrame, FALSE, FALSE, 0); gtk_widget_show(codecFrame); // Main codec widget codecBox = gtk_hbox_new(FALSE, 10); - gtk_box_pack_start(GTK_BOX(codecFrame), codecBox, FALSE, FALSE, 0); gtk_widget_show(codecBox); gtk_container_add( GTK_CONTAINER( codecFrame ) , codecBox ); @@ -1256,7 +1252,6 @@ create_general_settings () gtk_widget_show( notifFrame ); notifBox = gtk_vbox_new(FALSE, 10); - gtk_box_pack_start(GTK_BOX(notifFrame), notifBox, FALSE, FALSE, 0); gtk_widget_show( notifBox ); gtk_container_add( GTK_CONTAINER(notifFrame) , notifBox); @@ -1276,7 +1271,6 @@ create_general_settings () gtk_widget_show( trayFrame ); trayBox = gtk_vbox_new(FALSE, 10); - gtk_box_pack_start(GTK_BOX(trayFrame), trayBox, FALSE, FALSE, 0); gtk_widget_show( trayBox ); gtk_container_add( GTK_CONTAINER(trayFrame) , trayBox); @@ -1299,7 +1293,6 @@ create_general_settings () gtk_widget_show( historyFrame ); historyBox = gtk_vbox_new(FALSE, 10); - gtk_box_pack_start(GTK_BOX(historyFrame), historyBox, TRUE, TRUE, 0); gtk_widget_show( historyBox ); gtk_container_add( GTK_CONTAINER(historyFrame) , historyBox); diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index 33e9063a75e58898641d768a7c1b127bdc58a78b..4aff28c2006cc23671f6c7b62cf7c6ef632f481a 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -151,7 +151,7 @@ accounts_changed_cb (DBusGProxy *proxy, void * foo ) { g_print ("Accounts changed\n"); - sflphone_fill_account_list(); + sflphone_fill_account_list(TRUE); config_window_fill_account_list(); } @@ -458,7 +458,7 @@ dbus_account_details(gchar * accountID) } void -dbus_send_register ( gchar* accountID , int expire) +dbus_send_register ( gchar* accountID , const guint expire) { GError *error = NULL; org_sflphone_SFLphone_ConfigurationManager_send_register ( configurationManagerProxy, accountID, expire ,&error); diff --git a/sflphone-gtk/src/dbus.h b/sflphone-gtk/src/dbus.h index aa414876c21983242650750f0cf6d137dbbad5e7..d902bd17ebd4273b7bf94bc1af6c9e1df2e9f7ed 100644 --- a/sflphone-gtk/src/dbus.h +++ b/sflphone-gtk/src/dbus.h @@ -111,7 +111,7 @@ void dbus_set_account_details(account_t *a); * 0 for unregistration request * 1 for registration request */ -void dbus_send_register( gchar* accountID , int expire ); +void dbus_send_register( gchar* accountID , const guint expire ); /** * ConfigurationManager - Add an account to the list diff --git a/sflphone-gtk/src/mainwindow.c b/sflphone-gtk/src/mainwindow.c index 42d4ce48840adb480d6b6d9d19d6f09cedae4749..bd9d30ded7188f833b8ddd419675e515f2891bd5 100644 --- a/sflphone-gtk/src/mainwindow.c +++ b/sflphone-gtk/src/mainwindow.c @@ -41,13 +41,14 @@ GtkWidget * mic_control = NULL; GtkWidget * statusBar = NULL; /** - * Terminate the main loop. + * Minimize the main window. */ static gboolean on_delete (GtkWidget * widget, gpointer data) { - /* Must return FALSE to have the window destroyed */ - return !sflphone_quit(); + gtk_widget_hide(GTK_WIDGET( get_main_window() )); + set_minimized( TRUE ); + return TRUE; } /** Ask the user if he wants to hangup current calls */ diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c index 82b3ca69b111483243cebe0d2b0fa4bad4624d6c..0b9be32f43b64d1bed703b9eec7de1d6b2417f36 100644 --- a/sflphone-gtk/src/menus.c +++ b/sflphone-gtk/src/menus.c @@ -1,5 +1,6 @@ /* * 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 @@ -52,7 +53,6 @@ void update_menus() gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),FALSE); gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE); gtk_widget_set_sensitive( GTK_WIDGET(copyMenu), FALSE); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(holdMenu), FALSE); call_t * selectedCall = call_get_selected(active_calltree); if (selectedCall) @@ -68,7 +68,7 @@ void update_menus() gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(holdMenu), TRUE); + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg")); break; case CALL_STATE_RINGING: gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), TRUE); @@ -83,6 +83,7 @@ void update_menus() gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(newCallMenu),TRUE); + gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg")); break; case CALL_STATE_BUSY: case CALL_STATE_FAILURE: @@ -143,9 +144,6 @@ create_help_menu() menu = gtk_menu_new (); - /*menu_items = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items); - */ 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", @@ -498,7 +496,7 @@ create_edit_menu() } /* ----------------------------------------------------------------- */ static void -view_dialpad (GtkCheckMenuItem *checkmenuitem, +view_dialpad (GtkImageMenuItem *imagemenuitem, void* foo) { gboolean state; @@ -516,7 +514,7 @@ view_dialpad (GtkCheckMenuItem *checkmenuitem, } static void -view_volume_controls (GtkCheckMenuItem *checkmenuitem, +view_volume_controls (GtkImageMenuItem *imagemenuitem, void* foo) { gboolean state; diff --git a/sflphone-gtk/src/sflnotify.c b/sflphone-gtk/src/sflnotify.c index fcfca766d381d13ec5f3fca950c03220e4108972..8d108d485ff44d85ce3d4887fb9e80863ef1833b 100644 --- a/sflphone-gtk/src/sflnotify.c +++ b/sflphone-gtk/src/sflnotify.c @@ -98,7 +98,7 @@ notify_voice_mails( guint count , account_t* acc ) (gchar*) g_hash_table_lookup(acc->properties , ACCOUNT_ALIAS) ) ; body = g_markup_printf_escaped(_("%d voice mails"), count); - pixbuf = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/sflphone.png", NULL); notification = notify_notification_new( title, body, @@ -133,7 +133,7 @@ notify_current_account( account_t* acc ) title = g_markup_printf_escaped(_("Current account")); - pixbuf = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/sflphone.png", NULL); notification = notify_notification_new( title, body, @@ -162,7 +162,7 @@ notify_no_accounts( ) title = g_markup_printf_escaped(_("Error")); - pixbuf = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/sflphone.png", NULL); notification = notify_notification_new( title, body, @@ -199,7 +199,7 @@ notify_no_registered_accounts( ) title = g_markup_printf_escaped(_("Error")); - pixbuf = gdk_pixbuf_new_from_file(ICON_DIR "/sflphone.png", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/sflphone.png", NULL); notification = notify_notification_new( title, body, @@ -219,9 +219,12 @@ notify_no_registered_accounts( ) void stop_notification( void ) { - if(notify_notification_show( notification , NULL)) + if( notification != NULL ) { - notify_notification_close( notification , NULL); - g_object_unref( notification ); + if(notify_notification_show( notification , NULL)) + { + notify_notification_close( notification , NULL); + g_object_unref( notification ); + } } } diff --git a/src/Makefile.am b/src/Makefile.am index a64dc124321d666697ed4d339f881096eb82b7db..2110acbfc94473c031e2aae029063f323fe88f2f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,7 @@ endif ALSAFLAG= -lasound -SUBDIRS = audio config contact dbus memmanager video mixer $(ZEROCONFDIR) +SUBDIRS = audio config dbus $(ZEROCONFDIR) contact memmanager video mixer sflphoned_SOURCES = eventthread.cpp main.cpp voiplink.cpp \ managerimpl.cpp observer.cpp \ diff --git a/src/audio/audiolayer.cpp b/src/audio/audiolayer.cpp index c893eb95cf12bc314d72d7ca12c5f9d64c5bf4c3..fa93ee08f6064271a5ac60c772350fed3e2d7c70 100644 --- a/src/audio/audiolayer.cpp +++ b/src/audio/audiolayer.cpp @@ -97,28 +97,34 @@ AudioLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize void AudioLayer::startStream(void) { - _talk = true ; - _debugAlsa(" Start stream\n"); - int err; - //ost::MutexLock lock( _mutex ); - snd_pcm_prepare( _CaptureHandle ); - snd_pcm_start( _CaptureHandle ) ; + if( _CaptureHandle && _PlaybackHandle ) + { + _talk = true ; + _debugAlsa(" Start stream\n"); + int err; + //ost::MutexLock lock( _mutex ); + snd_pcm_prepare( _CaptureHandle ); + snd_pcm_start( _CaptureHandle ) ; - snd_pcm_prepare( _PlaybackHandle ); - if( err = snd_pcm_start( _PlaybackHandle) < 0 ) _debugAlsa(" Cannot start (%s)\n", snd_strerror(err)); -} + snd_pcm_prepare( _PlaybackHandle ); + if( err = snd_pcm_start( _PlaybackHandle) < 0 ) _debugAlsa(" Cannot start (%s)\n", snd_strerror(err)); + } +} void AudioLayer::stopStream(void) { - //ost::MutexLock lock( _mutex ); - _debugAlsa(" Stop Stream\n "); - _talk = false; - snd_pcm_drop( _CaptureHandle ); - snd_pcm_prepare( _CaptureHandle ); - snd_pcm_drop( _PlaybackHandle ); - snd_pcm_prepare( _PlaybackHandle ); - _urgentBuffer.flush(); + if( _CaptureHandle && _PlaybackHandle ) + { + //ost::MutexLock lock( _mutex ); + _debugAlsa(" Stop Stream\n "); + _talk = false; + snd_pcm_drop( _CaptureHandle ); + snd_pcm_prepare( _CaptureHandle ); + snd_pcm_drop( _PlaybackHandle ); + snd_pcm_prepare( _PlaybackHandle ); + _urgentBuffer.flush(); + } } void AudioLayer::AlsaCallBack( snd_async_handler_t* pcm_callback ) @@ -295,7 +301,6 @@ AudioLayer::open_device(std::string pcm_p, std::string pcm_c, int flag) snd_pcm_uframes_t period_size_out = getFrameSize() * getSampleRate() / 1000 * 2;//1024 ; snd_pcm_uframes_t buffer_size_out = period_size_out * 4 ; - int fragment_size = 6144; unsigned int buffer_time = 80000; //80ms unsigned int period_time = buffer_time / 4; //20ms @@ -322,6 +327,8 @@ AudioLayer::open_device(std::string pcm_p, std::string pcm_c, int flag) if( err = snd_pcm_hw_params_get_period_size( hwParams, &period_size_in , &dir) < 0) _debugAlsa(" Cannot get period size (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_get_buffer_size( hwParams, &buffer_size_in ) < 0) _debugAlsa(" Cannot get buffer size (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params( _CaptureHandle, hwParams ) < 0) _debugAlsa(" Cannot set hw parameters (%s)\n", snd_strerror(err)); + _debug("buffer size = %d\n" , period_size_in); + _debug("period size = %d\n" , buffer_size_in); snd_pcm_hw_params_free( hwParams ); deviceClosed = false; } @@ -340,13 +347,10 @@ AudioLayer::open_device(std::string pcm_p, std::string pcm_c, int flag) return false; } if( err = snd_pcm_hw_params_any( _PlaybackHandle,hwParams) < 0) _debugAlsa(" Cannot initialize hardware parameter structure (%s)\n", snd_strerror(err)); - //if( err = snd_pcm_hw_params_set_access( _PlaybackHandle, hwParams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) _debugAlsa(" Cannot set access type (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_access( _PlaybackHandle, hwParams, SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) _debugAlsa(" Cannot set access type (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_format( _PlaybackHandle, hwParams, SND_PCM_FORMAT_S16_LE) < 0) _debugAlsa(" Cannot set sample format (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_rate( _PlaybackHandle, hwParams, rate_out, dir) < 0) _debugAlsa(" Cannot set sample rate (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_channels( _PlaybackHandle, hwParams, 1) < 0) _debugAlsa(" Cannot set channel count (%s)\n", snd_strerror(err)); - //if( err = snd_pcm_hw_params_set_period_size_near( _PlaybackHandle, hwParams, &period_size_out , &dir) < 0) _debugAlsa(" Cannot set period size (%s)\n", snd_strerror(err)); - //if( err = snd_pcm_hw_params_set_buffer_size_near( _PlaybackHandle, hwParams, &buffer_size_out ) < 0) _debugAlsa(" Cannot set buffer size (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_buffer_time_near( _PlaybackHandle, hwParams, &buffer_time , &dir) < 0) _debugAlsa(" Cannot set buffer time (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_set_period_time_near( _PlaybackHandle, hwParams, &period_time , &dir) < 0) _debugAlsa(" Cannot set period time (%s)\n", snd_strerror(err)); if( err = snd_pcm_hw_params_get_period_size( hwParams, &_periodSize , &dir) < 0) _debugAlsa(" Cannot get period size (%s)\n", snd_strerror(err)); @@ -427,7 +431,10 @@ AudioLayer::read( void* buffer, int toCopy) return 0; int err; if(snd_pcm_state( _CaptureHandle ) == SND_PCM_STATE_XRUN) + { snd_pcm_prepare( _CaptureHandle ); + snd_pcm_start( _CaptureHandle ); + } snd_pcm_uframes_t frames = snd_pcm_bytes_to_frames( _CaptureHandle, toCopy ); if( err = snd_pcm_mmap_readi( _CaptureHandle, buffer, frames) < 0 ) { switch(err){ diff --git a/src/iaxcall.h b/src/iaxcall.h index 1fdf5d75e68c78ba1b0721fa39bd532bff355e28..b572a7418bb9fc7b24153a10f8938f2b27afa3ae 100644 --- a/src/iaxcall.h +++ b/src/iaxcall.h @@ -21,8 +21,8 @@ #define IAXCALL_H #include "call.h" -#include <iax/iax-client.h> -#include <iax/frame.h> +#include <iax2/iax-client.h> +#include <iax2/frame.h> /** * @file: iaxcall.h diff --git a/src/iaxvoiplink.cpp b/src/iaxvoiplink.cpp index a63b26f9d1ac2fd55e85d3e47a4f2a2cbd7ceb76..1cc5a5d26404bfddf3848f6279e82961acc1e4c0 100644 --- a/src/iaxvoiplink.cpp +++ b/src/iaxvoiplink.cpp @@ -26,7 +26,7 @@ #include "audio/audiolayer.h" #include <samplerate.h> -#include <iax/iax-client.h> +//#include <iax/iax-client.h> #include <math.h> #include <dlfcn.h> @@ -165,6 +165,7 @@ IAXVoIPLink::terminate() void IAXVoIPLink::terminateIAXCall() { + std::string reason = "Dumped Call"; ost::MutexLock m(_callMapMutex); CallMap::iterator iter = _callMap.begin(); IAXCall *call; @@ -172,7 +173,7 @@ IAXVoIPLink::terminateIAXCall() call = dynamic_cast<IAXCall*>(iter->second); if (call) { _mutexIAX.enterMutex(); - iax_hangup(call->getSession(), "Dumped Call"); + iax_hangup(call->getSession(), (char*)reason.c_str()); _mutexIAX.leaveMutex(); call->setSession(NULL); delete call; call = NULL; @@ -480,11 +481,11 @@ bool IAXVoIPLink::hangup(const CallID& id) { IAXCall* call = getIAXCall(id); - + std::string reason = "Dumped Call"; CHK_VALID_CALL; _mutexIAX.enterMutex(); - iax_hangup(call->getSession(), "Dumped Call"); + iax_hangup(call->getSession(), (char*) reason.c_str()); _mutexIAX.leaveMutex(); call->setSession(NULL); if (Manager::instance().isCurrentCall(id)) { @@ -549,11 +550,12 @@ bool IAXVoIPLink::refuse(const CallID& id) { IAXCall* call = getIAXCall(id); + std::string reason = "Call rejected manually."; CHK_VALID_CALL; _mutexIAX.enterMutex(); - iax_reject(call->getSession(), "Call rejected manually."); + iax_reject(call->getSession(), (char*) reason.c_str()); _mutexIAX.leaveMutex(); removeCall(id); } @@ -849,6 +851,7 @@ IAXVoIPLink::iaxHandlePrecallEvent(iax_event* event) { IAXCall* call = NULL; CallID id; + std::string reason = "Error ringing user."; switch(event->etype) { case IAX_EVENT_REGACK: @@ -910,7 +913,7 @@ IAXVoIPLink::iaxHandlePrecallEvent(iax_event* event) addCall(call); } else { // reject call, unable to add it - iax_reject(event->session, "Error ringing user."); + iax_reject(event->session, (char*)reason.c_str()); delete call; call = NULL; } diff --git a/src/iaxvoiplink.h b/src/iaxvoiplink.h index 6cc9ab339ac66a341a5a9dec431b72ad52187850..ea67145ede0534d38fd60a0dca6d392dd3b04250 100644 --- a/src/iaxvoiplink.h +++ b/src/iaxvoiplink.h @@ -22,7 +22,7 @@ #define IAXVOIPLINK_H #include "voiplink.h" -#include <iax/iax-client.h> +#include <iax2/iax-client.h> #include "global.h" #include <samplerate.h> diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index f26e54f7bcbc5aa8ace6853796a4a9e72c3d7203..29a641ff5f49a4350a950ad71a69478be3a68e4f 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -608,6 +608,7 @@ ManagerImpl::peerHungupCall(const CallID& id) _debug("peerHungupCall: Call doesn't exists\n"); return; } + if (_dbus) _dbus->getCallManager()->callStateChanged(id, "HUNGUP"); if (isCurrentCall(id)) { stopTone(true); @@ -615,7 +616,7 @@ ManagerImpl::peerHungupCall(const CallID& id) } removeWaitingCall(id); removeCallAccount(id); - + } //THREAD=VoIP @@ -1876,14 +1877,14 @@ ManagerImpl::setAccountDetails( const ::DBus::String& accountID, } void -ManagerImpl::sendRegister( const ::DBus::String& accountID , bool expire ) +ManagerImpl::sendRegister( const ::DBus::String& accountID , const DBus::Int32& expire ) { // Update the active field setConfig( accountID, CONFIG_ACCOUNT_ENABLE, expire ); Account* acc = getAccount(accountID); acc->loadConfig(); - // Test on the value freshly updated + // Test on the freshly updated value if ( acc->isEnabled() ) { // Verify we aren't already registered, then register _debug("Send register for account %s\n" , accountID.c_str()); diff --git a/src/managerimpl.h b/src/managerimpl.h index c26a62fe8925ae4696d5c005d9d22c6b18755477..5fa813b9061597a4a26c99ca63f99cab681ff783 100644 --- a/src/managerimpl.h +++ b/src/managerimpl.h @@ -292,7 +292,7 @@ class ManagerImpl { * 0 for unregistration request * 1 for registration request */ - void sendRegister( const ::DBus::String& accountId , bool expire ); + void sendRegister( const ::DBus::String& accountId , const DBus::Int32& expire ); bool getZeroconf(const std::string& sequenceId); bool attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer); diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index 2741665193f6db14b0bdefcb866798e767ac89c9..8cfafdcaad06645d5335bc9c613a14a6afd2ae34 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -227,6 +227,7 @@ SIPVoIPLink::getEvent() if ( event == NULL ) { return; } + _debug("> SIP Event: [cdt=%4d:%4d:%4d] type=#%03d %s \n", event->cid, event->did, event->tid, event->type, event->textinfo); switch (event->type) { @@ -513,9 +514,6 @@ bool SIPVoIPLink::sendSIPAuthentification() { std::string login = _authname; - if (login.empty()) { - return false; - } if (login.empty()) { /** @todo Ajouter ici un call à setRegistrationState(Error, "Fill balh") ? */ return false; @@ -562,6 +560,7 @@ SIPVoIPLink::sendUnregister() _eXosipRegID = EXOSIP_ERROR_STD; eXosip_unlock(); + return true; } @@ -1433,7 +1432,8 @@ SIPVoIPLink::SIPRegistrationFailure( eXosip_event_t* event ) setRegistrationState(Error); break; default: - _debug("Unknown error: %s\n" , event->response->status_code); + setRegistrationState(ErrorAuth); + //_debug("Unknown error: %s\n" , event->response->status_code); } } diff --git a/src/sipvoiplink.h b/src/sipvoiplink.h index 9ad395025188b0511eed00c1049e23c50683e57a..fe4c6690eb601a9ff02cfa1202be76a75c65add9 100644 --- a/src/sipvoiplink.h +++ b/src/sipvoiplink.h @@ -421,9 +421,6 @@ class SIPVoIPLink : public VoIPLink /** SIP Proxy URL */ std::string _proxy; - /** SIP UserPart */ - std::string _userpart; - /** SIP Authenfication name */ std::string _authname;